在Visual Studio代码的终端中,我尝试调用例如dotnet --version我得到了这个(Linuxmint / ubuntu):
sh-4.4$ dotnet --version
sh: dotnet: command not found
当我使用以下命令从终端尝试运行时:
jesper@jesper-spand:~$ which dotnet
/usr/local/bin/dotnet
jesper@jesper-spand:~$ dotnet --info
.NET Core SDK (reflecting any global.json):
Version: 2.1.403
Commit: 04e15494b6
Runtime Environment:
OS Name: linuxmint
OS Version: 19
OS Platform: Linux
RID: linuxmint.19-x64
Base Path: /usr/share/dotnet/sdk/2.1.403/
Host (useful for support):
Version: 2.1.5
Commit: 290303f510
.NET Core SDKs installed:
2.1.403 [/usr/share/dotnet/sdk]
.NET Core runtimes installed:
Microsoft.AspNetCore.All 2.1.5 [/usr/share/dotnet/shared/Microsoft.AspNetCore.All]
Microsoft.AspNetCore.App 2.1.5 [/usr/share/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.NETCore.App 2.1.5 [/usr/share/dotnet/shared/Microsoft.NETCore.App]
To install additional .NET Core runtimes or SDKs:
https://aka.ms/dotnet-download
jesper@jesper-spand:~$ echo %PATH%
%PATH%
jesper@jesper-spand:~$ echo $PATH
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/home/jesper/.dotnet/tools
jesper@jesper-spand:~
您知道Visual Studio Code中的终端如何使用dotnet吗?
/ Jesper