问题解决:VS报错:The build tools for v140 (Platform Toolset = 'v140') cannot be found

从网上下载了一个GitHub上的C++项目,使用VS2013打开时报错,报错信息如下:

错误 1 error MSB8020: The build tools for v140 (Platform Toolset =
‘v140’) cannot be found. To build using the v140 build tools, please
install v140 build tools. Alternatively, you may upgrade to the
current Visual Studio tools by selecting the Project menu or
right-click the solution, and then selecting “Upgrade
Solution…”. C:\Program Files
(x86)\MSBuild\Microsoft.Cpp\v4.0\V120\Microsoft.Cpp.Platform.targets 64 5 XXX

这是VS低版本打开高版本常会出现的错!

解决方法:

项目–属性–配置属性–常规,找到 平台工具集 ,把v140改为v120(Visual Studio 2013 (v120))。

其他:

如果这台电脑上同时安装了更高版本的VS,例如VS2015,可以右键,打开方式改为VS2015。

发布了71 篇原创文章 · 获赞 17 · 访问量 1万+

猜你喜欢

转载自blog.csdn.net/qionggaobi9328/article/details/104422194