none
Build VS 2013 WinRT projects using TFS 2010 Build - Error The builds tools for v120 (Platform Toolset = 'v120') cannot be found.

    Question

  • I'm using TFS 2010.  I have Visual Studio 2012 and Visual Studio 2013 installed on my build agent machine.

    I'm trying to build a Visual Studio 2013 project that is targeting WinRT (Windows 8.1).

    The build error is:

    C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V110\Microsoft.Cpp.Platform.targets (44): The builds tools for v120 (Platform Toolset = 'v120') cannot be found. To build using the v120 build tools, either click the Project menu or right-click the solution, and then select "Update VC++ Projects...". Install v120 to build using the v120 build tools.

    What is the solution here?

    Do I need to create two separate Build Definitions, one for my 2012 projects (8.0) and one for my 2013 projects (8.1)?

    Note that the 2013 projects build fine from the VS 2013 IDE.

    Wednesday, December 11, 2013 4:35 PM

Answers

  • Hi Ike,

    Thanks for your reply.

    For how to set the property as ToolsVersion 12.0 when build your project using MSBuild manually, please contact MSBuild experts for the better response: http://social.msdn.microsoft.com/Forums/vstudio/en-US/home?forum=msbuild.

    After you can build your project using MSBuild, TFS will build it fine using the default build process template too.


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Tuesday, December 17, 2013 2:18 AM
  • I had this same issue, as was able to resolve it by adding /p:VisualStudioVersion=12.0 to the MSBuild Arguments in my build definition's process property. You may need to also add /p:ToolsVersion=12.0. It seems that the build agent (TFS 2010 for me) is not auto-selecting the right VS version.

    Thursday, January 09, 2014 4:35 PM

All replies

  • Hi Ike, 

    Thanks for your post.

    TFS 2010 invoke MSBuild v4.0 to build project on build agent machine by default. Please logon build agent machine, then try to build your project using MSBuild command manually, ensure your project can be built correctly. You can find TFS 2010 invoked which detailed MSBuild command line to build your project in detailed TFS build log.

    Yes, we suggest you create separate build definitions for your 2012 and 2013 projects.


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Thursday, December 12, 2013 7:28 AM
  • In the diagnostic log, I see this:

    Built $/xxxxxxxxx.vcxproj for default targets.
     C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V110\Microsoft.Cpp.Platform.targets (44): The builds tools for v120 (Platform Toolset = 'v120') cannot be found. To build using the v120 build tools, either click the Project menu or right-click the solution, and then select "Update VC++ Projects...". Install v120 to build using the v120 build tools.
    C:\Windows\Microsoft.NET\Framework64\v4.0.30319\MSBuild.exe /nologo /noconsolelogger "D:\BLD\34\171\Sources\LEAD15\BATCH\SLN\18\WinRT\CoreLic81.sln" /m:1 /fl /flp:"logfile=D:\BLD\34\171\Sources\LEAD15\BATCH\SLN\18\WinRT\CoreLic81.log;encoding=Unicode;verbosity=diagnostic" /p:SkipInvalidConfigurations=true  /p:Configuration="Debug18" /p:Platform="Win32"  /dl:WorkflowCentralLogger,"C:\Program Files\Microsoft Team Foundation Server 2010\Tools\Microsoft.TeamFoundation.Build.Server.Logger.dll";"Verbosity=Diagnostic;BuildUri=vstfs:///Build/Build/23642;InformationNodeId=5854861;TargetsNotLogged=GetNativeManifest,GetCopyToOutputDirectoryItems,GetTargetPath;TFSUrl=http://leadtfs:8080/tfs/Toolkit;"*WorkflowForwardingLogger,"C:\Program Files\Microsoft Team Foundation Server 2010\Tools\Microsoft.TeamFoundation.Build.Server.Logger.dll";"Verbosity=Diagnostic;"
     Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch.


    I have confirmed that I can build succesfully on the same machine from a VS2013 command prompt using MSBuild:

    C:\Windows\Microsoft.NET\Framework64\v4.0.30319\MSBuild.exe "xxxx.sln" /m:1 /fl /flp:"logfile=D:\xxxx.log;encoding=Unicode;verbosity=diagnostic" /p:SkipInvalidConfigurations=true  /p:Configuration="Debug18" /p:Platform="Win32"

    • Edited by Ike Starnes Thursday, December 12, 2013 5:15 PM
    Thursday, December 12, 2013 4:36 PM
  • Hi Ike, 

    Thanks for your reply.

    What’s the run MSBuild.exe command log in your TFS diagnostic log?  It should look like below:

    Run MSBuild for Project

    Initial Property Values
    AdditionalVCOverrides =
    AllowUntrustedCertificate = False
    CommandLineArguments = /p:SkipInvalidConfigurations=true
    Configuration =
    CreatePackageOnPublish = False
    DeployIisAppPath =
    DeployOnBuild = False
    DeployTarget =
    GenerateVSPropsFile = True
    LogFile =
    LogFileDropLocation = \\TFSAT\TFSDropFolder\TestCaseProject\TestCaseProject_20131114.2\logs
    MaxProcesses = 0
    MSDeployPublishMethod =
    MSDeployServiceUrl =
    NodeReuse = False
    OutDir = C:\Builds\9\DemoProjectForXin\TestCaseProject\bin\TestCaseProject
    Password =
    Platform =
    Project = C:\Builds\9\DemoProjectForXin\TestCaseProject\src\TestCaseProject\TestCaseProject.sln
    ResponseFile =
    RunCodeAnalysis = AsConfigured
    Targets =
    TargetsNotLogged = String[] Array
    ToolPath =
    ToolPlatform = Auto
    UserName =
    Verbosity = Diagnostic

    C:\Windows\Microsoft.NET\Framework64\v4.0.30319\MSBuild.exe /nologo /noconsolelogger "C:\Builds\9\DemoProjectForXin\TestCaseProject\src\TestCaseProject\TestCaseProject.sln" /nr:False /fl /flp:"logfile=C:\Builds\9\DemoProjectForXin\TestCaseProject\src\TestCaseProject\TestCaseProject.log;encoding=Unicode;verbosity=diagnostic" /p:SkipInvalidConfigurations=true  /m /p:OutDir="C:\Builds\9\DemoProjectForXin\TestCaseProject\bin\TestCaseProject\\" /p:VCBuildOverride="C:\Builds\9\DemoProjectForXin\TestCaseProject\src\TestCaseProject\TestCaseProject.sln.vsprops"  /dl:WorkflowCentralLogger,"C:\Program Files\Microsoft Team Foundation Server 11.0\Tools\Microsoft.TeamFoundation.Build.Server.Logger.dll";"Verbosity=Diagnostic;BuildUri=vstfs:///Build/Build/236;InformationNodeId=42785;TargetsNotLogged=GetNativeManifest,GetCopyToOutputDirectoryItems,GetTargetPath;TFSUrl=http://tfsat:8080/tfs/defaultcollection;"*WorkflowForwardingLogger,"C:\Program Files\Microsoft Team Foundation Server 11.0\Tools\Microsoft.TeamFoundation.Build.Server.Logger.dll";"Verbosity=Diagnostic;"

    When you get the MSBuild.exe run command log in your TFS build diagnostic log, compare this command line with your manually MSBuild command line, check the differences.  


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Friday, December 13, 2013 5:12 AM
  • With the exception of the logging options, it's the same.

    It's running MSBuild:

    C:\Windows\Microsoft.NET\Framework64\v4.0.30319\MSBuild.exe

    Friday, December 13, 2013 6:29 PM
  • If I start a VS 2012 command prompt and try to build (using MS Build), I get the same error.

    So, it looks like the environment vars are not set properly when the build agent starts.

    Is there a way to call vsvars32.bat from my exsiting build template?

    Or is there another build template that can be used to set the environment for VS2013/VC12?

    Friday, December 13, 2013 8:13 PM
  • Hi Ike, 

    Thanks for your reply.

    To invoke another compiler in default build process template, we can add the InvokeProcess activity in build process template to achieve that. Please refer to the example(invoke VS 2010 devenv.exe) in this blog here: http://geekswithblogs.net/jakob/archive/2010/05/14/building-visual-studio-setup-projects-with-tfs-2010-team-build.aspx.


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Monday, December 16, 2013 4:50 AM
  • >> To invoke another compiler ...

    I don't want to invoke another compiler.  Doesn't MS Build decide what compiler to invoke from the .vcxproj file?

    <

    ProjectDefaultTargets="Build"ToolsVersion="12.0"xmlns="http://schemas.microsoft.com/developer/msbuild/2003">

    What I need, is a way to tell the build process to set the environment property for ToolsVersion 12.0, because it seems MS Build is NOT already doing that.

    Monday, December 16, 2013 3:17 PM
  • I am having the same issue. Just upgraded all of our projects to .Net 4.5.1. Upgraded our C++ projects to PlatformToolset v120 and received the same build error.

    We are using TFS 2010.

    I have installed VS 2013 on our build agent machine.

    Thank you.

     
    Monday, December 16, 2013 5:03 PM
  • Hi Ike,

    Thanks for your reply.

    For how to set the property as ToolsVersion 12.0 when build your project using MSBuild manually, please contact MSBuild experts for the better response: http://social.msdn.microsoft.com/Forums/vstudio/en-US/home?forum=msbuild.

    After you can build your project using MSBuild, TFS will build it fine using the default build process template too.


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Tuesday, December 17, 2013 2:18 AM
  • I had this same issue, as was able to resolve it by adding /p:VisualStudioVersion=12.0 to the MSBuild Arguments in my build definition's process property. You may need to also add /p:ToolsVersion=12.0. It seems that the build agent (TFS 2010 for me) is not auto-selecting the right VS version.

    Thursday, January 09, 2014 4:35 PM