Using VS2008 TFS I have created a setup application that installs two Window Services. The first service is always installed and uninstalled (and works fine--I'm using the installer class). The second service is optional. Depending a custom condition I set up determines whether the 2nd service is installed. If requested the install works fine (using the installer class also). However, I cannot get the service to uninstalled during the uninstall process. The service exe is deleted, but the uninstall fails to uninstall the service. I have set the Condition property on my assembly file (in the File System) and on all the custom actions associated with this assembly. I suspect it is the custom action on the uninstall that is incorrect. I am unable to remove the condition on the uninstall custom action--I get an error if I do (Unable to build custom action name because it uses a conditionally installed file.) I have tried other conditions but they too fail to uninstall the service.
To ensure my installer class is working okay, as a test, I removed all conditions and forced the 2nd service to install. The install and uninstalled worked fine in this case. Hope someone can help. Thanks in advance.