Windows服务安装项目的问题将来自VS.NET 2008至2010年 [英] Windows Service Setup Project Problems Converting From VS.NET 2008 to 2010

查看:432
本文介绍了Windows服务安装项目的问题将来自VS.NET 2008至2010年的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图转换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目标。我从提示<一href="http://social.msdn.microsoft.com/Forums/en-US/winformssetup/thread/49aab885-26fc-4c49-b370-0f56570a2f2b"相对=nofollow>这个讨论。我改变了所有的项目目标正确的平台,离开的 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.

这篇关于Windows服务安装项目的问题将来自VS.NET 2008至2010年的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆