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

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

问题描述

我刚刚将我的 Visual Studio 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.

推荐答案

尝试编辑环境变量.

右键单击此电脑 ->属性 ->高级系统设置 ->高级 ->环境变量 ->系统变量

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

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

Add [install path] C:Program Filesdotnet to the variable path.

重启视觉工作室.

如果还没有解决这个问题,可以参考这个回答.

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

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

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