TFS构建机找不到v14.0平台工具集



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

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

构建代理现在不能构建解决方案,说

C:Program Files (x86)MSBuildMicrosoft.Cppv4.0V120Microsoft.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",结果相同。

任何想法?

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

/p:VCTargetsPath="C:Program Files (x86)MSBuildMicrosoft.Cppv4.0V140"

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

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

最新更新