views:

12

answers:

0

I have a Windows service with an Installer. In the constructor of the Installer, I am setting the ServiceName and DisplayName dynamically using the version number of another assembly that the service references. I also set the ServiceName property of the ServiceBase to the same value in its constructor.

When I use Installutil from the command line this works fine. Every time I rev my dependent assembly and rebuild the service, when I install, I get a new, separate installation of the service with previous installations remaining intact.

However, when I use a setup project to install the service, the setup application requires that I uninstall other instances of the service first. I don't know that much about setup projects - but appearently it is not instantiating the Installer class, therefore it is not seeing the new, unique names?

Is there a way to make this work with a setup project?