Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

I am unable to compile/build anything within Visual Studio C++ 2012 because I am getting an error that states either I have an inappropriate ToolsVersion or that the ToolSet is missing.

Here is the error in the console:

Project file contains ToolsVersion="12.0". This toolset may be unknown or missing, in which case you may be able to resolve this by installing the appropriate version of MSBuild, or the build may have been forced to a particular ToolsVersion for policy reasons. Treating the project as if it had ToolsVersion="4.0".

1>C:Program Files (x86)MSBuildMicrosoft.Cppv4.0V110Microsoft.Cpp.Platform.targets(44,5): error MSB8020: 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.

I have installed Microsoft SDK. This may be relevant also - I downgraded from 2013 VSRC to 2012 MSVC recently but I made a clean uninstallation.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
530 views
Welcome To Ask or Share your Answers For Others

1 Answer

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

Project -> Properties -> General -> Platform Toolset (as IInspectable correctly commented)

Project file contains ToolsVersion="12.0" (...) Treating the project as if it had ToolsVersion="4.0"

  1. Right-click project -> Unload Project
  2. Right-click project -> Edit (name).vcxproj
    • Change this line: <Project DefaultTargets="Build" ToolsVersion="12.0" ...
    • into: <Project DefaultTargets="Build" ToolsVersion="4.0" ...
  3. Save, close, Right-click project -> Reload Project

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
...