c++ - 错误 MSB8020 : Platform Toolset set to V140, 但错误提示找不到 V110

标签 c++ visual-studio visual-c++ compiler-errors visual-studio-2015

当我右键单击该项目并转到设置时,我可以清楚地看到平台工具集已设置为 Visual Studio 2015 (v140)。但是,当我去编译项目时,错误是

C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.Cpp.Platform.targets(54,5): error MSB8020: The build tools for Visual Studio 2012 (Platform Toolset = 'v110') cannot be found. To build using the v110 build tools, please install Visual Studio 2012 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 "Retarget solution".

我尝试执行推荐和“重新定位解决方案”,但没有任何效果。

如果我打开引用 .targets 文件,我看不到对 V140 的引用。我尝试将所有引用从 V110(作为实验)更改为 V140,但是当我重新编译时,它只是将它们全部更改回 V110 并生成了相同的错误。

当 VS 说它的目标是 V140 时,关于如何阻止它以 V110 为目标有什么想法吗?

最佳答案

问题是我的项目引用的项目没有包含在解决方案中。详细的诊断输出帮助我找到了它。

关于c++ - 错误 MSB8020 : Platform Toolset set to V140, 但错误提示找不到 V110,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36559475/

相关文章:

c++ - C++修改Lua中 "arg"的方法

c++ - 使用 Bison 将数据解析为结构

c++ - 在 visual studio 2015 community c++ 中,如何修复警告 C4838 : conversion from 'unsigned int' to 'int' requires a narrowing conversion

debugging - Visual Studio C++ 和 Windows 中的调试内存填充模式是什么?

c++ - 将 FILE * 转换为 CMemFile(或从 FILE * 检索 void*)

c++ - 如何在另一个类构造函数中使用一个类的成员

c++ - SetWindowLongPtr 与 DialogBoxParam?

visual-studio - vs2010 中的生产力功能

css - 无法使用 Visual Studio Community 2017 打开 .css 文件

python - 警告 LNK4197 : export 'PyInit_python_module_name' specified multiple times; using first specification