的MSBuild的CI服务器无法找到Al.exe工具 [英] MSBuild on CI Server can't find AL.exe
问题描述
我有我的TeamCity CI构建服务器的编译过程中出现了以下错误的一个问题:
C:\ WINDOWS \ Microsoft.NET \框架\ v4.0.30319 \ Microsoft.Common.targets(2342,9):错误MSB3086:任务找不到使用SdkToolsPath或注册表项Al.exe工具 HKEY_LOCAL_MACHINE \ SOFTWARE \微软\微软的SDK \的Windows \ v7.0A。确保SdkToolsPath设置并经SdkToolsPath正确的处理器具体位置和已安装的Microsoft Windows SDK工具存在
我发现从一年前类似的报道,当人们都升级到.NET 3.5,例如的这个。在这种情况下,安装最新的SDK解决了这个问题,但是我已经安装了最新的SDK(<一href="http://www.microsoft.com/downloads/details.aspx?familyid=6B6C21D2-2006-4AFA-9702-529FA782D63B&displaylang=en">Microsoft Windows SDK的Windows 7和.NET Framework 4 )我的生成服务器上。该MSBuild的工具都没有在服务器上,一个名为文件夹
C:\ WINDOWS \ Microsoft.NET \框架\ v4.0.30319
和存在Al.exe工具在
C:\ Program Files文件\微软的SDK \的Windows \ V7.1 \ BIN \ NETFX 4.0工具
然而,在错误消息中提到的注册表项不存在。因此,它看起来有一些错误的MSBuild的安装/配置。该错误仅发生于那些有嵌入的资源,这就需要项目Al.exe工具。
当你安装最新的SDK(我假设这是V7.1)
- 从开始菜单进入的Microsoft Windows SDK V7.1
- 选择Windows SDK的7.1命令提示符,输入
- >光盘安装
- > WindowsSdkVer -version:V7.1
这将告诉的MSBuild使用该版本的工具,而不需要做任何可怕的注册表编辑。
I'm having a problem on my TeamCity CI build server where during compilation I get the following error:
C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets(2342, 9): error MSB3086: Task could not find "AL.exe" using the SdkToolsPath "" 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
I've found similar reports from a year ago when people were upgrading to .NET 3.5, for example this one. In that case, installing the latest SDK solved the issue, however I have already installed the latest SDK (Microsoft Windows SDK for Windows 7 and .NET Framework 4) on my build server. The MSBuild tools are all there on the server, in a folder called
C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319
and AL.exe exists in
C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\NETFX 4.0 Tools
However the registry key mentioned in the error message does not exist. So, it seems like there is something wrong with the installation/configuration of MSBuild. This error only happens for projects that have embedded resources, which require AL.exe.
As you have install the latest SDK (I'm assuming that's v7.1)
- Go to "Microsoft Windows SDK v7.1" from the Start menu
- Select "Windows SDK 7.1 Command Prompt" and enter
- > cd Setup
- > WindowsSdkVer -version:v7.1
This will tell msbuild to use that version of the tools without needing to do any scary registry editing.
这篇关于的MSBuild的CI服务器无法找到Al.exe工具的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!