The builds tools for v120 (Platform Toolset = 'v120') cannot be found

前端 未结 16 1445
后悔当初
后悔当初 2020-12-04 09:47

Using visual studio 2012 on windows 8 x64 aparantly this is caused by msbuild being moved into .net but I havn\'t seen how to fix it yet.

4>C:\\Program Fi         


        
相关标签:
16条回答
  • 2020-12-04 10:37

    If you use make generators like cmake, JUCE, etc. try to set a correct VS version target (2013, 2015, 2017) and regenerate the solution again.

    0 讨论(0)
  • 2020-12-04 10:38

    http://en.wikipedia.org/wiki/Visual_C++

    You are using Visual C++ 2012 which is v110. v120 means Visual C++ 2013.

    So either you change the project settings to use toolset v110, or you install Visual Studio 2013 on this machine and use VS2013 to compile it.

    0 讨论(0)
  • 2020-12-04 10:45

    To add up to Kevin and Lex's answers:

    We had a similar situation at work where both the developers and the build server had Visual Studio 2013. Our solution had a VS 2013 C++ project and compiled fine when built on developer's machine or on the build server within the IDE. The issue was when triggering builds using TFS build definitions. We were still using an old build template (version 11.1) instead of 12.0. Fortunately, a simple attribute addition to the template xaml file solved the issue. In the Sequence portion "Compile the Project", there is a xaml node that starts with

    mtbwa:MSBuild CommandLineArgument=....
    

    You can add a "ToolPath" attribute and point it to the right path of the MSBuild.exe you wish to invoke, based on Kevin's answer. For instance:

    ToolPath="C:\Program Files (x86)\MSBuild\12.0\Bin"
    
    0 讨论(0)
  • 2020-12-04 10:45

    To add up to Louis answer:

    Alternatively you can use the attribute ToolVersion="12.0" if you are using Visual Studio 2013 instead of using the ToolPath Attribute. Details visit http://msdn.microsoft.com/en-us/library/dd647548.aspx

    So you are not forced to use absolute path.

    0 讨论(0)
  • 2020-12-04 10:45

    Wasted 4+ hours on this.

    I have Visual Studio 2017 Enterprise, one of the projects has below error:

    The builds tools for v120 (Platform Toolset = 'v120') cannot be found

    To resolve above error, I tried to install all below:

    • Microsoft Build Tools 2013 (v120 tools) https://www.microsoft.com/en-US/download/details.aspx?id=40760
    • Microsoft Build Tools 2015 https://www.microsoft.com/en-in/download/details.aspx?id=48159
    • Build Tools for Visual Studio 2017 https://visualstudio.microsoft.com/downloads/#build-tools-for-visual-studio-2017

    However, none of the above worked.

    Later, installed Visual Studio 2013 Ultimate, then all worked fine.

    Looks like, the older Visual studio is a must to resolve this.

    Hope it helps.

    0 讨论(0)
  • 2020-12-04 10:45

    I had a similar problem. VS 2015 Community (MSBuild 14) building a c++ app, wanted to use VS 2010 (v100) tools. It all came down giving msbuild an invalid configuration option. Strange.

    So, recheck all those options and parameters.

    0 讨论(0)
提交回复
热议问题