TFS Build机器找不到v14.0平台工具集

时间:2015-08-18 09:14:47

标签: visual-studio-2013 tfs msbuild visual-studio-2015

起始情况: TFS 2013构建机器(代理),安装了VS2013。这成功地构建了我的解决方案。

然后: 我已将我的解决方案中的项目升级到VS2015项目,即使用v14.0平台工具集。该解决方案使用VS2015在本地构建,没有任何问题。 我在构建代理上安装了VS2015。

构建代理现在无法构建解决方案,说

C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V120\Microsoft.Cpp.Platform.targets (64): The build tools for v140 (Platform Toolset = 'v140') cannot be found. To build using the v140 build tools, please install v140 build tools.  Alternatively, you may upgrade to the current Visual Studio tools by selecting the Project menu or right-click the solution, and then selecting "Upgrade Solution...".

我尝试自定义构建模板,将MSBuild中的ToolVersion设置为"14.0",结果相同。

有什么想法吗?

1 个答案:

答案 0 :(得分:0)

编辑构建定义并在MSBuild arguments帮助中手动提供:

/p:VCTargetsPath="C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140"

在此之后,构建运行正常。

虽然现在有了这个答案,但我不喜欢这个解决方案。为什么我要在构建定义中提供绝对路径?