Visual Studio 2019重装vs2019打不开.netcore项目

无法打开项目文件。 .NET SDK 的版本 7.0.306 至少需要 MSBuild 的 17.4.0 版本。当前可用的 MSBuild 版本为 16.11.2.50704。请将在 global.json 中指定的 .NET SDK 更改为需要当前可用的 MSBuild 版本的旧版本。

无法打开项目文件。 .NET SDK 的版本 7.0.306 至少需要 MSBuild 的 17.4.0 版本。当前可用的 MSBuild 版本为 16.11.2.50704。请将在 global.json 中指定的 .NET SDK 更改为需要当前可用的 MSBuild 版本的旧版本。

第一种解决方法下载新版本vs2022 Visual Studio 2022

Visual Studio 2019重装vs2019打不开.netcore项目

第二种解决方法:

下载对应的dotnetsdk和

有一个项目,在 VS2022 中正常打开,在 VS2019 中无法加载项目,项目目标框架是 .NET Standard 2.0。报错内容:

error: 无法打开项目文件。 .NET SDK 的版本 7.0.306 至少需要 MSBuild 的 17.4.0 版本。当前可用的 MSBuild 版本为 16.11.2.50704。请将在 global.json 中指定的 .NET SDK 更改为需要当前可用的 MSBuild 版本的旧版本。

解决方法:

运行 Visual Studio Installer,选择 Visual Studio 2019 进行修改,切换到"单个组件",勾选".NET SDK (out of support)",会联动勾选".NET 5.0 Runtime (Out of support)"与".NET Core 3.1 Runtime (Out of support)"。

其中.net sdk不能少

相关推荐
晨风先生2 小时前
如何Visual Studio 的配置从 Qt-Debug 切换到 x64-Debug
ide·qt·visual studio
工藤新一OL3 小时前
把xml的格式从utf-8-bom转为utf-8
xml·c#·asp.net·.netcore·visual studio
王柏龙17 小时前
Asp.net core mvc中TagHelper的GetChildContentAsync和Content区别
mvc·.netcore
无规则ai1 天前
C#入门实战:数字计算与条件判断
c#·visual studio
编程乐趣2 天前
基于.Net Core开源的库存订单管理系统
.netcore
布伦鸽2 天前
Visual Studio 2010-.Net Framework 4.0-DevExpress安装
ide·.net·visual studio
布伦鸽2 天前
Visual Studio 2010-.Net Framework 4.0项目-NPOI安装
ide·.net·visual studio
西柚小萌新2 天前
【软件与环境】--Visual Studio2022安装教程
ide·visual studio
无规则ai4 天前
C#的开发环境(visual studio的下载安装、测试c#语言)
开发语言·c#·visual studio
lgaof65822@gmail.com5 天前
ASP.NET Core Web API 中集成 DeveloperSharp.RabbitMQ
后端·rabbitmq·asp.net·.netcore