Microsoft Visual Studio 2019:无法打开项目文件.无法找到.NET SDK [英] Microsoft Visual Studio 2019: The project file cannot be opened. Unable to locate the .NET SDK

查看:513
本文介绍了Microsoft Visual Studio 2019:无法打开项目文件.无法找到.NET SDK的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚刚将视觉工作室 2019 升级到了最新版本 16.8.3 ,突然我无法加载任何C#项目并为所有.NET核心项目得到以下错误:

I just upgraded my visual studio 2019 to latest version 16.8.3 and suddenly I am not able to load any C# project and getting the following error for all .NET core projects:

无法打开项目文件.无法找到.NET SDK.检查它是否已安装以及在中指定的版本global.json(如果有)与已安装的版本匹配.

The project file cannot be opened. Unable to locate the .NET SDK. Check that it is installed and that the version specified in global.json (if any) matches the installed version.

推荐答案

尝试编辑环境变量.

右键单击此PC->属性->高级系统设置->进阶->环境变量->系统变量

Right click on This PC -> Properties -> Advanced System Settings -> Advanced -> Environment Variables -> System Variables

将[安装路径] C:\ Program Files \ dotnet \ 添加到变量 path .

Add [install path] C:\Program Files\dotnet\ to the variable path.

重新启动Visual Studio.

Restart visual studio.

如果不能解决此问题,则可以参考此

If it does not solve this problem, you can refer to this answer.

这篇关于Microsoft Visual Studio 2019:无法打开项目文件.无法找到.NET SDK的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆