error MSB8020: The build tools for v140 (Platform Toolset = 'v140') cannot be found.

在VS2013上编译一个别人的工程时,提示如下错误:

error MSB8020: The build tools for v140 (Platform Toolset = 'v140') cannot be found.

 

看到网上说用如下方法解决:

项目属性里把这里改了:

error MSB8020: The build tools for v140 (Platform Toolset = 'v140') cannot be found.

我打开属性后,在Platform Toolset中提示V140未安装,于是我选择了Visual Studio 2013 V120 后,如下,编译通过。

error MSB8020: The build tools for v140 (Platform Toolset = 'v140') cannot be found.