VS2015 使用 TFS2013 构建

VS2015 build with TFS2013

我正在尝试使用 TFS2013 为 VS2015 解决方案进行团队构建。 在构建服务器上安装了 VS2015,我更改了构建模板,因此 msbuild 有一个参数 \tv:14.0,但是当开始构建时,我收到以下错误:

C:\Program Files (x86)\MSBuild.0\bin\Microsoft.Common.CurrentVersion.targets (96): Invalid static method invocation syntax: "[Microsoft.Build.Utilities.ToolLocationHelper]::GetPlatformSDKDisplayName($(TargetPlatformIdentifier), $(TargetPlatformVersion))". Method 'Microsoft.Build.Utilities.ToolLocationHelper.GetPlatformSDKDisplayName' not found. Static method invocation should be of the form: $([FullTypeName]::Method()), e.g. $([System.IO.Path]::Combine(a, b)).

构建服务器已重启,但我仍然收到错误。 我还检查了这个线程:Build failed in TFS 但那里没有给出真正的答案。有没有人知道如何解决这个问题。

您需要通过找到 all 运行 MSBuild for Project MSBuild [=27= 来自定义生成过程模板],然后将 ToolVersion 设置为“14.0”并将 ToolPath 设置为目标 MSBuild14(默认情况下:“C:\程序文件 (x86)\MSBuild.0\Bin")。之后,签入构建过程模板并重新排队构建。

在此处查看解决方案:

我遇到了完全相同的错误。我确定 TFS2013 是 RTM 版本,所以我们安装了 TFS2013 更新 5。现在,如果我 运行 使用 *.12.xaml 过程模板和 /tv:14.0 /p:VisualStudioVersion=14.0 参数,构建成功.我还制作了 *.12.xaml 构建过程的副本并将其命名为 *.14.xaml 并将 运行 MSBuild 步骤 ToolVersion 属性 更改为“14.0”和此构建没有参数也能正常工作。