VS2013下开发VC++程序,编译时提示错误error MSB8020: The build tools for v140 (Platform Toolset = 'v140') 的解决方案

1. 问题描述:

提示如下错误: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...

2. 问题分析:

造成该问题的原因是所用VS版本平台集不一致导致,更改为本机所用VS平台版本集即可;

3. 解决方案:

  将 "项目——属性——配置属性——常规——平台工具集” 选项更改为你所用的VS版本平台集的选项即可,如我这里用的是VS2013,便将其更改为v120的,v140应为VS2015/2017版本的平台工具集;如下图所示:

 

OK搞定!

原文地址:https://www.cnblogs.com/rainbow70626/p/11785649.html