失败构建,因为它找不到AL.exe

这是一个有趣的问题,真的让我摸不着头脑。 我有一个正在TeamCity中构建的项目。 它一直工作正常,直到开发人员将资源文件添加到其中一个项目中,并为另一个语言环境添加了一些字符串。 他将.resx文件添加到默认文件旁边的Properties文件夹下。 这是构建日志中的错误消息:

C:\WINDOWS\Microsoft.NET\Framework\v3.5\Microsoft.Common.targets(2105, 9): error MSB3091: Task failed because "AL.exe" was not found, or the correct Microsoft Windows SDK is not installed. The task is looking for "AL.exe" in the "bin" subdirectory beneath the location specified in the InstallationFolder value of the registry key HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SDKs\Windows\v6.0A. You may be able to solve the problem by doing one of the following: 1) Install the Microsoft Windows SDK for Windows Server 2008 and .NET Framework 3.5. 2) Install Visual Studio 2008. 3) Manually set the above registry key to the correct location. 4) Pass the correct location into the "ToolPath" parameter of the task. 

这里有很多我无法解决的问题。 – 为什么它可以找到默认.resx文件的AL.exe,但不能找到这个新文件? – 当构建在Server 2003上运行时,为什么它会查找看起来特定于Vista的注册表项?

有任何想法吗?

通过安装Windows SDK for Windows Server 2008和.NET Framework 3.5 SP1解决了问题。

我不明白MSBuild如何与其工具脱节,也许我永远不会发现原因,但安装该SDK为我解决了问题。

使用从x86检查msbuild。 TeamCity构建运行器中应该有一个选项。

VS2008安装在机器上了吗?

确保Windows SDK已完全安装在服务器上。 AL.exe(程序集链接器)包含在.NET SDK中(不是运行时)。

(我在使用ClickOnce的TFS服务器上遇到同样的问题,但是懒得修复)