Issue:有时候VS2013或者VS2015创建的项目,用VS2012编译不通过,出现如下错误。
1>------ Build started: Project: T2015, Configuration: Debug x64 ------
1>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V110\Microsoft.Cpp.Platform.targets(44,5): error MSB8020: The builds tools for v140 (Platform Toolset = 'v140') cannot be found. To build using the v140 build tools, either click the Project menu or right-click the solution, and then select "Update VC++ Projects...". Install v140 to build using the v140 build tools.
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
Solution:
Notepad++打开项目工程文件(本例:T2015.vcxproj)
1.<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> 此处14.0修改为11.0
2.<PlatformToolset>v140</PlatformToolset> 所有平台信息版本从V140修改为v110
3.保存修改后,重新编译即可