问题描述
我在 x32 Server2008 windows 机器上安装了 TeamCity.我已经运行了 .net 4.5 网络安装.我还根据这篇文章从我的 x64 机器上复制了文件,这样我就不需要安装 vs2012(不过,我确实更改了在 32 位机器上删除 x86 的路径):
I have a TeamCity install on x32 Server2008 windows machine. I've run the .net 4.5 web install. I've also copied over the files from my x64 machine based on this article so that I didn't need to install vs2012 (though, I did have the change the path to remove x86 on the 32bit machine):
MSBuild in TeamCity 的 Visual Studio 2012 解决方案
我似乎无法让本地代理运行我在 vs2012 或 vs2010 项目上为 msbuild 设置的构建.我不断得到:
I can't seem to get the local agent to run the build that I've setup for msbuild on a vs2012 or vs2010 project. I keep getting:
未满足的要求:MSBuildTools12.0_x86_Path 存在
Unmet requirements: MSBuildTools12.0_x86_Path exists
我已经多次重启了服务器,也重启了代理.我尝试过稍微弄乱路径变量,但无法弄清楚我缺少什么.我也查看了配置参数,并且可以看到这些:
I've restarted the server multiple times, and restarted the agent as well. I've tried messing with the path variables a little, but can't figure out what I'm missing. I've looked as well in the Configuration Parameters, and can see these:
MSBuildTools2.0_x86_PathC:WindowsMicrosoft.NETFrameworkv2.0.50727
MSBuildTools2.0_x86_Path C:WindowsMicrosoft.NETFrameworkv2.0.50727
MSBuildTools3.5_x86_PathC:WindowsMicrosoft.NETFrameworkv3.5
MSBuildTools3.5_x86_Path C:WindowsMicrosoft.NETFrameworkv3.5
MSBuildTools4.0_x86_PathC:WindowsMicrosoft.NETFrameworkv4.0.30319
MSBuildTools4.0_x86_Path C:WindowsMicrosoft.NETFrameworkv4.0.30319
我如何在其中获得 12.0?
How do I get 12.0 in there?
推荐答案
我需要单独安装MSBuild,然后重新启动代理后变量就在那里.
I needed to install MSBuild separately, then after restarting the agent the variable was there.
(来自 MSDN 文章)MSBuild 现在作为 Visual Studio 的一部分安装,而不是作为 .NET Framework 的一部分.当前的 MSBuild 版本号是 12.0.如果要单独安装 MSBuild,请从 MSBuild 下载中下载安装包.
(From MSDN article) MSBuild is now installed as part of Visual Studio rather than as part of the .NET Framework. The current MSBuild version number is 12.0. If you want to install MSBuild separately, download the installation package from MSBuild Download.
答案链接已损坏.这是 Microsoft Build Tools 2015 的链接(最近直到今天):https://www.microsoft.com/en-us/download/details.aspx?id=48159
edit: the answer link was broken. Here is the link for Microsoft Build Tools 2015 (most recently until today): https://www.microsoft.com/en-us/download/details.aspx?id=48159