运行的MSBuild无法读取SDKToolsPath [英] Running MSBuild fails to read SDKToolsPath

查看:1746
本文介绍了运行的MSBuild无法读取SDKToolsPath的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,我有一个有点问题的其他计算机用于正确建立我的.Net 2.0型网站,与VS2008编译时南特脚本和它的相关工具。我最近升级所有的项目/解决方案文件到VS2010,现在我的生成失败,出现以下错误:

Howdy, I'm having a bit of an issue runnning a NAnt script that used to properly build my .Net 2.0 based website, when compiling with VS2008 and it's associated tools. I've recently upgraded all the project/solution files to VS2010, and now my build fails with the following error:

[执行]   C:\ WINDOWS \ Microsoft.NET \ Framework64 \ v4.0.30319 \ Microsoft.Common.targets(2249,9):   错误MSB3086:任务找不到   sgen.exe使用S dkToolsPath   或注册表项   HKEY_LOCAL_MACHINE \ SOFTWARE \微软\微软   的SDK \的Windows \ v7.0A,确保   SdkToolsPath设置和工具   存在于正确的处理器   下的具体位置   SdkToolsPath并且Microsoft   安装了Windows SDK

[exec] C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Microsoft.Common.targets(2249,9): error MSB3086: Task could not find "sgen.exe" using the S dkToolsPath "" or the registry key "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SDKs\Windows\v7.0A". Make sure the SdkToolsPath is set and the tool exists in the correct processor specific location under the SdkToolsPath and that the Microsoft Windows SDK is installed

现在,我有Windows的SDK安装在构建服务器上以前的版本(.NET 3.5),并安装了完整的.NET 4.0框架,但我还没有穿过的一个.NET 4.0中特定的版本上运行Windows SDK的。

Now, I DO have prior versions (.Net 3.5) of the Windows SDK installed on the build server, and the full .Net 4.0 framework is installed, but I've not run across a .Net 4.0 specific version of the Windows SDK.

在有些实验和研究,我最后只设置一个新的环境变量SDKToolsPath,并指出它sgen.exe的副本在我的Windows 6.0 SDK文件夹。这产生了同样的错误,但它让我注意到,即使SDKToolsPath环境变量设置(证实,我可以回声是在命令行中,它具有预期值),错误信息似乎表明,它的不被读取(注意空引号)。

After a bit of experimentation and research, I finally just setup a new environmental variable "SDKToolsPath" and pointed it to the copy of sgen.exe in my windows 6.0 sdk folder. This generated the same error, but it got me to notice that even though the SDKToolsPath environmental variable IS set (confirmed that I can "echo" it at the command line and it has the expected value), the error message seems to indicated that it's not being read (note the empty quotes).

大部分时间我已经找到了信息的.Net 3.5(或更早)具体。没有太多4.0相关的在那里呢。搜索错误code MSB3086产生任何有用无论是。任何想法,这可能是?

Most of the information I've found is .Net 3.5 (or earlier) specific. Not much 4.0 related out there yet. Searching for error code MSB3086 generated nothing useful either. Any idea what this might be?

斯科特

推荐答案

我只好硬着头皮我们构建服务器上安装Visual Studio 2010来解决这个问题。据我所看到的,是在Windows SDK可在任何地方对MSDN没有7.0A版本。但是,在安装VS 2010似乎安装它,创造一个7.0A REGKEY和程序Files \ Microsoft的SDK \ Windows中的一个7.0A的文件夹。

I had to bite the bullet and install VS 2010 on our build server to fix this issue. As far as I can see, there's no 7.0A version of the Windows SDK available anywhere on MSDN. However, installing VS 2010 appears to install it, creating a 7.0A regkey and a 7.0A folder in Program Files\Microsoft SDKs\Windows.

这篇关于运行的MSBuild无法读取SDKToolsPath的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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