我创建了一个工作区dotnet new console
,写了一些代码。但是,当我尝试使用 Visual Studio 代码中的运行/开始调试选项开始调试它时,它失败并显示以下消息:
执行任务:dotnet build /home/MY USERNAME/Desktop/Codes/C#/Console/Console.csproj /property:GenerateFullPaths=true /consoleloggerparameters:NoSummary
The terminal process failed to launch: Path to shell executable "dotnet" is not a file的符号链接。
终端将被任务重用,按任意键关闭它。
dotnet run
在终端中使用该命令可以正常工作,没有任何问题。但是由于某种原因,使用开始调试选项失败。我真的不想每次要启动程序时都必须键入此命令。
下面是dotnet --info
命令的结果:
.NET Core SDK (reflects global.json if exists):\
Version: 3.1.302\
Commit: 41faccf259
Runtime Environment:\
OS Name: ubuntu\
OS Version: 20.04\
OS Platform: Linux\
RID: linux-x64\
Base Path: /usr/share/dotnet/sdk/3.1.302/
Host (useful for support):\
Version: 3.1.6\
Commit: 3acd9b0cd1
.NET Core SDKs installed:\
3.1.302 [/usr/share/dotnet/sdk]
.NET Core …
Run Code Online (Sandbox Code Playgroud)