Windows服务安装项目的问题将来自VS.NET 2008至2010年项目、问题、Windows、VS

2023-09-06 23:49:43 作者:婊砸的世道我不懂

我试图转换VS.NET 2008的解决方案,以2010年该解决方案包括一个Windows服务项目和安装Windows服务安装项目。我无法编译安装项目。我已经尝试了几次,开始此过从无到有,下面的教程这里在标题为要为您的服务创建一个安装项目

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.

(这里是我的Windows服务项目的名称)。一个搜索这个错误带来了此页面MSDN上告诉我,将 InstallerClass 为假。我这样做,为每个4自定义操作。进行此更改和建筑后,我收到以下错误:

(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?

推荐答案

它看起来像问题是,当我将 InstallerClass 为假。很显然,我没有内置Windows服务为x86目标。我从提示这个讨论。我改变了所有的项目目标正确的平台,离开的 InstallerClass 设置为真的每个在设置文件中的自定义操作,它的建筑了。

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.