简体   繁体   中英

VS2015 build with TFS2013

I'm trying to do a teambuild for a VS2015 solution with TFS2013. 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:

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))". Method 'Microsoft.Build.Utilities.ToolLocationHelper.GetPlatformSDKDisplayName' not found. Static method invocation should be of the form: $([FullTypeName]::Method()), eg $([System.IO.Path]::Combine( a , b )).

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. 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. 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.

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 "). 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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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