CI 服务器上的 MSBuild 找不到 AL.exe [英] MSBuild on CI Server can't find AL.exe

查看:23
本文介绍了CI 服务器上的 MSBuild 找不到 AL.exe的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的 TeamCity CI 构建服务器出现问题,在编译期间出现以下错误:

<块引用>

C:WINDOWSMicrosoft.NETFrameworkv4.0.30319Microsoft.Common.targets(2342, 9): 错误 MSB3086: 任务无法使用 SdkToolsPath "" 或注册表项找到 "AL.exe"HKEY_LOCAL_MACHINESOFTWAREMicrosoftMicrosoft SDKsWindowsv7.0A".确保 SdkToolsPath 已设置且该工具位于 SdkToolsPath 下正确的处理器特定位置,并且已安装 Microsoft Windows SDK

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

的文件夹中<块引用>

C:WINDOWSMicrosoft.NETFrameworkv4.0.30319

和AL.exe存在于

<块引用>

C:Program FilesMicrosoft SDKsWindowsv7.1BinNETFX 4.0 工具

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

解决方案

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

<块引用>

  1. 从开始"菜单转到Microsoft Windows SDK v7.1"
  2. 选择Windows SDK 7.1 命令提示符"并输入
  3. 光盘设置

  4. 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:WINDOWSMicrosoft.NETFrameworkv4.0.30319Microsoft.Common.targets(2342, 9): error MSB3086: Task could not find "AL.exe" using the SdkToolsPath "" or the registry key "HKEY_LOCAL_MACHINESOFTWAREMicrosoftMicrosoft SDKsWindowsv7.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:WINDOWSMicrosoft.NETFrameworkv4.0.30319

and AL.exe exists in

C:Program FilesMicrosoft SDKsWindowsv7.1BinNETFX 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)

  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

This will tell msbuild to use that version of the tools without needing to do any scary registry editing.

这篇关于CI 服务器上的 MSBuild 找不到 AL.exe的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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