将 Visual Studio 2019 降级回 Visual Studio 2017

Downgrade Visual Studio 2019 back to Visual Studio 2017

Whosebug 上有很多与将解决方案从 Visual Studio 2017 升级到 Visual Studio 2019 相关的答案。但是如何降级回 Visual Studio 2017?当我尝试在 Visual Studio 2017 中构建项目时,出现以下错误:

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".

在此之前,我使用 Visual Studio 2019 解决方案,效果很好。但是现在我必须改用 Visual Studio 2017 并且正如预期的那样我有错误。有没有办法修复它而不是手动重新创建解决方案?谢谢你的建议!

这个问题出在你的MSBuilder上,有时间重新检查Visual Studio中MSBulder的版本,可能仍然支持vs2019。

您可以在您的项目中更改它 到:Project->Properties->General->Platform Tool_set 并更改为您的 VS 的当前版本。

认为这会有所帮助。!