简体   繁体   English

使用TFS2013构建VS2015

[英]VS2015 build with TFS2013

I'm trying to do a teambuild for a VS2015 solution with TFS2013. 我正在尝试使用TFS2013为VS2015解决方案进行团队建设。 On the buildserver VS2015 is installed and I changed the buildtemplate so msbuild has an argument \\tv:14.0, but when a start a build I get the following error: 在构建服务器上安装了VS2015,并且我更改了构建模板,因此msbuild的参数为\\ tv:14.0,但是在开始构建时,出现以下错误:

C:\\Program Files (x86)\\MSBuild\\14.0\\bin\\Microsoft.Common.CurrentVersion.targets (96): Invalid static method invocation syntax: "[Microsoft.Build.Utilities.ToolLocationHelper]::GetPlatformSDKDisplayName($(TargetPlatformIdentifier), $(TargetPlatformVersion))". C:\\ Program Files(x86)\\ MSBuild \\ 14.0 \\ bin \\ Microsoft.Common.CurrentVersion.targets(96):无效的静态方法调用语法:“ [Microsoft.Build.Utilities.ToolLocationHelper] :: GetPlatformSDKDisplayName($(TargetPlatformIdentifier) ,$(TargetPlatformVersion))”。 Method 'Microsoft.Build.Utilities.ToolLocationHelper.GetPlatformSDKDisplayName' not found. 找不到方法“ Microsoft.Build.Utilities.ToolLocationHelper.GetPlatformSDKDisplayName”。 Static method invocation should be of the form: $([FullTypeName]::Method()), eg $([System.IO.Path]::Combine( a , b )). 静态方法调用应采用以下形式:$([FullTypeName] :: Method()),例如$([System.IO.Path] :: Combine( ab ))。

The buildserver has been restarted but I still get the error. 生成服务器已重新启动,但仍然出现错误。 I also checked this thread: Build failed in TFS but no real answer was given there. 我还检查了这个线程: 在TFS中构建失败,但是没有给出真正的答案。 Is there anyone that knows how to solve this. 有谁知道如何解决这个问题。

I was experiencing the exact same error. 我遇到了完全相同的错误。 I determined that TFS2013 was the RTM version so we installed TFS2013 Update 5. Now if I run using the *.12.xaml process template with the /tv:14.0 /p:VisualStudioVersion=14.0 parameters the build succeeds. 我确定TFS2013是RTM版本,因此我们安装了TFS2013 Update5。现在,如果我将* .12.xaml流程模板与/tv:14.0 /p:VisualStudioVersion=14.0参数一起使用,则构建成功。 I have also made a copy of the *.12.xaml build process and named it *.14.xaml and changed the Run MSBuild steps ToolVersion property to "14.0" and this build works as well, without the parameters. 我还制作了* .12.xaml构建过程的副本,并将其命名为* .14.xaml,并将“运行MSBuild步骤” ToolVersion属性更改为“ 14.0”,并且该构建也可以正常工作,而无需使用参数。

You need to customize the build process template by finding all the Run MSBuild for Project MSBuild activity, then set the ToolVersion to "14.0" and set ToolPath to target to MSBuild14 (by default: " C:\\Program Files (x86)\\MSBuild\\14.0\\Bin "). 您需要通过查找所有运行MSBuild for Project MSBuild”活动来自定义生成过程模板,然后将ToolVersion设置为“ 14.0”,并将ToolPath设置为以MSBuild14为目标(默认情况下:“ C:\\ Program Files(x86)\\ MSBuild \\ 14.0 \\ Bin “)。 After that, check in the build process template and re-queue the build. 之后,检入构建过程模板并重新排队构建。

Check the solutions here: TFS 2013 building .NET 4.6 / C# 6.0 在此处检查解决方案: TFS 2013 Building .NET 4.6 / C#6.0

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM