winapi - CI 服务器上的 MSBuild 找不到 AL.exe

标签 winapi .net-4.0 msbuild teamcity

我的 TeamCity CI 构建服务器遇到问题,在编译过程中出现以下错误:

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

我在一年前发现了类似的报告,当时人们升级到 .NET 3.5,例如 this one 。在这种情况下,安装最新的 SDK 解决了问题,但是我已经在构建服务器上安装了最新的 SDK ( Microsoft Windows SDK for Windows 7 and .NET Framework 4 )。 MSBuild 工具都位于服务器上名为

的文件夹中

C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319

并且 AL.exe 存在于

C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\NETFX 4.0 Tools

但是错误消息中提到的注册表项不存在。因此,MSBuild 的安装/配置似乎有问题。此错误仅发生在需要 AL.exe 的嵌入资源的项目中。

最佳答案

因为您已经安装了最新的 SDK(我假设是 v7.1)

  1. Go to "Microsoft Windows SDK v7.1" from the Start menu
  2. Select "Windows SDK 7.1 Command Prompt" and enter
  3. cd Setup

  4. WindowsSdkVer -version:v7.1

这将告诉 msbuild 使用该版本的工具,而无需进行任何可怕的注册表编辑。

关于winapi - CI 服务器上的 MSBuild 找不到 AL.exe,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2986440/

相关文章:

c++ - 在 Win32 API 中指定两次 LWA COLORKEY

winapi - 确定Windows系统宽字体

c# - WPF - 组样式 : Can we only bind to the "Name" property?

c# - 我的 Visual Studio C# 编译需要多长时间?

jenkins - 通过MSDeploy.exe进行Web部署

visual-studio - 错误 MSB6006 : "lc.exe" exited with code -1

windows - 为什么 EM_SETMARGINS 在 Windows 7 下不起作用?

python - 使 Tkinter 窗口成为非 Tkinter 窗口的子窗口

asp.net - 找不到方法 : 'Void System.Web.UI.ScriptResourceDefinition.set_LoadSuccessExpression(System.String)'

c# - IronPython 中是否有小数的文字符号?