.netvisual-studio-2008visual-studio-2010windows-servicesinstallation

Windows Service Setup Project Problems Converting From VS.NET 2008 to 2010


I'm trying to convert a solution from VS.NET 2008 to 2010. The solution includes a Windows Service project and a Setup project that installs the Windows Service. I'm having trouble compiling the Setup project. I've tried starting this over from scratch a few times, following the tutorial here under the section titled To create a setup project for your service.

When I simply follow these steps and build the project, I get this error:

Unable to build custom action named 'Primary output from <name> (Release x86)', InstallerClass property is only valid for assemblies.

(where is the name of my Windows Service project). A search for this error brings up this page on MSDN which tells me to set InstallerClass to False. I do so for each of the 4 Custom Actions. After making this change and building, I get the following error:

Unable to build custom action named 'Primary output from <name> (Release x86)' from project output group 'Primary output' because the project output group does not have a key file.

Googling for that, I only get a single hit. Don't even bother clicking the link, the full text is: "Remove the custom action and replace it with a custom action pointing to a project output group that has a key file."

What the h does that mean? Can anyone help me figure out what I'm doing wrong here?


Solution

  • It looks like the problem was when I set InstallerClass to False. Apparently, I hadn't built the Windows Service for the x86 target. I got the hint from this discussion. I changed all of the projects to target the correct platform and left InstallerClass set to True for each of the Custom Actions in the setup file and it's building now.