clickonce引导程序和msbuild的问题 [英] Issue with clickonce bootstrapper and msbuild

查看:241
本文介绍了clickonce引导程序和msbuild的问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个在Windows Server 2003上运行的CruiseControl .NET构建服务器,并且我正在尝试使用msbuild构建和发布ClickOnce应用程序.

I have a CruiseControl .NET build server running on Windows Server 2003, and I am trying to build and publish my ClickOnce application using msbuild.

一切正常,除非启用了ClickOnce应用程序的引导程序.发生这种情况时,我在 DeploymentGenerateBootstrapper 目标中得到以下错误:

Everything is working fine, except when I enable the bootstrapper of my ClickOnce application. When this happens, I get the following error in the DeploymentGenerateBootstrapper target:

C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets (3939,9):

error MSB3147: 

Could not find required file 'setup.bin' in 'E:\Projects\src\TestProject\Engine'.

.NET Framework 3.5 SP1和4和最新的Windows SDK都安装在服务器上,但是C:\ Program Files \ Microsoft SDKs \ Windows \ versionNo \中的bootstrapper文件夹不存在.我尝试从我的工作站计算机复制文件时没有运气.

.NET Framework 3.5 SP1 and 4 and latest Windows SDK for both are installed on the server, but the bootstrapper folder in C:\Program Files\Microsoft SDKs\Windows\versionNo\ does not exist. I tried copying the files from my workstation machine with no luck.

我不想在服务器上安装Visual Studio,而只安装必要的SDK.

I do not want to install Visual Studio on server and only install the necessary SDKs.

我也尝试过从计算机中复制bootsrapper文件夹

I have also tried copying the bootsrapper folder from my machine

C:\Program Files\Microsoft SDKs\Windows\v6.0A\Bootstrapper

C:\Program Files\Microsoft SDKs\Windows\v7.0A\Bootstrapper

建造服务器,但没有运气.

to build server but no luck.

有什么想法吗?

推荐答案

您还必须将关联的键和值添加到注册表中,以允许MSBuild查找Bootstrapper文件夹的路径.我可以使用以下regedit确认对我有用.

You will also have to add the associated key and value to the registry to allow MSBuild to find the path to the Bootstrapper folder. I can confirm that this has worked for me using the following regedit.

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\GenericBootstrapper\4.0]
@="0"
"Path"="C:\\Program Files\\Microsoft SDKs\\Windows\\v7.1\\Bootstrapper\\"

更新:根据Emma的TFS博客,似乎检查了以下注册表值以查找引导程序路径,如果找不到,则在Engine子文件夹下的本地项目文件夹中查找,然后保释如果在该处找不到MSB3147错误.

Update: According to Emma's TFS Blog it appears the following registry values are checked in order to find the bootstrapper path and if not found looks in your local project folder under the Engine sub folder and then bails with the MSB3147 error if not found there.

  1. HKLM \ Software \ Microsoft \ GenericBootstrapper \< .NET工具版本> \
  2. HKLM \ Software \ Microsoft.NetFramework \ SDKInstallRoot \ Bootstrapper
  3. HKLM \ Software \ Microsoft \ VisualStudio \\ InstallDir \ Bootstrapper

提醒:另外请记住,有32位和64位注册表,因此请确保将此值添加到您的工具将要访问的同一注册表中.

Reminder: Also remember that there is a 32-bit and a 64-bit registry so be sure to add this value to the same registry that your tools will be accessing.

同时,我还创建了一个功能请求以获取针对此问题的更合理的解决方案.请对我的功能请求进行投票,以使Microsoft进行查看.

In the meantime I've also created a feature request to get a more reasonable solution for this issue. Please vote on my feature request to get Microsoft to take a look at it.

顺便说一句,这里有一些有关此问题的链接:

BTW, here are a few more links about this issue:

  • http://social.msdn.microsoft.com/Forums/en-US/msbuild/thread/7672078f-f2bd-4142-b8a9-740c2a8a5ae7
  • http://social.msdn.microsoft.com/Forums/en/msbuild/thread/6964ba78-5b66-4cd1-bdd1-b31edb76b96a
  • http://social.msdn.microsoft.com/Forums/en-US/winformssetup/thread/97ac8717-daf7-4554-8dfa-8a63da47a17d
  • MSBuild: error MSB3147: Could not find required file 'setup.bin'
  • https://connect.microsoft.com/VisualStudio/feedback/details/361924/remove-bootstrapper-from-microsoft-sdks-directory
  • http://blogs.msdn.com/b/emmamou/archive/2009/04/08/team-build-for-clickonce-application-with-bootstrapper.aspx?CommentPosted=true#commentmessage

这篇关于clickonce引导程序和msbuild的问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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