【问题标题】:Lauching dotnet fails ("dotnet" is not a file of a symlink)启动 dotnet 失败(“dotnet”不是符号链接文件)
【发布时间】:2020-11-19 11:30:35
【问题描述】:

用于调试 ASP.NET core 的默认 vscode 配置包含以下内容:

"configurations": [
{
    "name": ".NET Core Launch (web)",
    "type": "coreclr",
    "request": "launch",
    "preLaunchTask": "build",
    ...

preLaunchTask 对我来说失败并出现以下错误:

The terminal process failed to launch: Path to shell executable "dotnet" is not a file of a symlink.

我以前遇到过这个问题,不是在preLaunchTask 上,而是在主程序执行上。我可以通过在~/.vscode/extensions/ms-dotnettools.csharp-1.**.*/dist/extensions.js 中替换所有"dotnet" -> "/usr/bin/dotnet" + vscode 重新启动来解决。但是,此解决方法不适用于preLaunchTask。 (并且每次更新该扩展时都必须这样做,这很烦人)。

鉴于我是一个 linux 菜鸟,它可能与 omnisharp/vscode 无关,但我做错了(在 Ubuntu 18.04 中)。

有谁知道这个错误是什么意思,以及如何解决它?甚至如何调试这个问题?

我已经重新安装了 vscode、.net5,并且我的全局 $PATH 环境确实包含 /home/<username>/.dotnet/tools:/usr/bin/dotnet。除此之外,我不知道该怎么办。

【问题讨论】:

    标签: asp.net-core visual-studio-code process ubuntu-18.04 omnisharp


    【解决方案1】:

    tasks.json 文件更改自 "type": "process""type": "shell"

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2022-01-08
      • 2022-11-02
      • 2020-09-07
      • 2020-11-15
      • 2020-12-20
      • 1970-01-01
      • 1970-01-01
      • 2022-06-22
      相关资源
      最近更新 更多