昨天我的 dotnet sdk 工作得很好,今天当我登录到我的电脑时,我更新了系统和 VSCode,然后当我尝试运行时dotnet watch run
,我收到此错误:
* You intended to execute a .NET application:
The application 'watch' does not exist.
* You intended to execute a .NET SDK command:
No .NET SDKs were found.
Download a .NET SDK:
https://aka.ms/dotnet-download
Learn about SDK resolution:
https://aka.ms/dotnet/sdk-not-found
这是当我尝试 apt 安装 sdk 时发生的情况(它显示已安装):
sudo apt install dotnet-sdk-6.0
[sudo] password for robinson:
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
dotnet-sdk-6.0 is already the newest version (6.0.400-1).
0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.
这是我的dotnet --info
:
global.json file:
Not found
Host:
Version: 6.0.8
Architecture: x64
Commit: 55fb7ef977
.NET SDKs installed:
No SDKs were found.
.NET runtimes installed:
Microsoft.AspNetCore.App 6.0.8 [/usr/lib/dotnet/dotnet6-6.0.108/shared/Microsoft.AspNetCore.App]
Microsoft.NETCore.App 6.0.8 [/usr/lib/dotnet/dotnet6-6.0.108/shared/Microsoft.NETCore.App]
从我的谷歌搜索看来,这可能是 PATH 问题,但我尝试添加一些不同的路径,但仍然不起作用。
这是哪个点网:
/usr/bin/dotnet
和我的回声路径:
/home/robinson/.nvm/versions/node/v18.7.0/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/home/robinson/.dotnet/tools
我是一个 Linux 菜鸟,非常感谢任何帮助。我在 x64 计算机上运行 popOS。