【发布时间】:2020-11-15 04:20:29
【问题描述】:
我使用dotnet new console 创建了一个工作区,编写了一些代码。但是,当我尝试使用 Visual Studio 代码中的“运行/开始调试”选项开始调试它时,它会失败并显示以下消息:
执行任务:dotnet build /home/MY USERNAME/Desktop/Codes/C#/Console/Console.csproj /property:GenerateFullPaths=true /consoleloggerparameters:NoSummary
终端进程启动失败:shell 可执行文件“dotnet”的路径不是符号链接的文件。
终端将被任务重用,按任意键关闭。
在终端中使用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 runtimes installed:\
Microsoft.AspNetCore.App 3.1.6 [/usr/share/dotnet/shared/Microsoft.AspNetCore.App]\
Microsoft.NETCore.App 3.1.6 [/usr/share/dotnet/shared/Microsoft.NETCore.App]
To install additional .NET Core runtimes or SDKs:\
https://aka.ms/dotnet-download
我已经对结果进行了一些翻译,它可能与原始输出不完全匹配
【问题讨论】:
标签: c# .net visual-studio-code