【问题标题】:Downgrade Visual Studio 2019 back to Visual Studio 2017将 Visual Studio 2019 降级回 Visual Studio 2017
【发布时间】:2019-11-19 05:58:44
【问题描述】:

StackOverflow 上有很多关于将解决方案从 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 并且正如预期的那样我有错误。有没有办法修复它而不是手动重新创建解决方案?谢谢你的建议!

【问题讨论】:

  • 您可以在文本编辑器(如 VS)中编辑解决方案/项目文件并更改表明它需要更新的内容。可能需要在 2017 年创建一个项目并进行比较。不确定它们之间的结构有多少变化,因为至少在 .NET 方面有很多简化,所以它可能简单或不简单。
  • 安装2019 Build tools或在csproj中将v142改为v141

标签: visual-studio-2017 compatibility visual-studio-2019 migrating


【解决方案1】:

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

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

认为这会有所帮助。!

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2017-10-24
    • 2017-04-23
    • 2020-01-18
    • 2017-06-12
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多