当我尝试在 Visual Studio 中构建某些东西时,Visual Studio 会向我显示一些警告,然后如果我忽略它并构建,则会发生错误。
error MSB8020: The build tools for v142 (Platform Toolset = 'v142')
cannot be found. To build using the v142 build tools, please install
v142 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".
原文由 Vardaan Shukla 发布,翻译遵循 CC BY-SA 4.0 许可协议
我遇到了同样的问题,但是当试图用 VS2017 打开一个在 VS2019 中制作的项目时,所以我在我的项目中更改了这个:
转到:Project->Properties->General->Platform Toolset 并更改为 VS 的当前版本。