在 VS Code 中,bash 终端中的“dotnet run”给出错误,而在集成 dotnet 终端中则没有错误

问题描述 投票:0回答:1

大主屏幕

无错误屏幕

错误画面

尝试了所有诊断的内容..无效错误

尝试过 dotnet run .dll

点网运行

在 dotnet 集成终端中发生同样的情况,它运行良好,但在 bash 终端中则不然

c# visual-studio-code
1个回答
0
投票
  1. 打开 vs Code。

  2. 按 CTRL + SHIFT + P 它将打开命令面板

  3. 这里写defaultSettings.json。

  4. 单击它。打开文件

  5. 按CTRL + F进入搜索栏。

  6. 这里编写bash.exe,它会突出显示所有相关的配置, 其中更多评论为(绿色),其中一个将是天蓝色,看起来很明亮

  7. 当前启用的内容。

  8. 带有非双正斜杠的配置文件现在处于活动状态,否则具有//,这些是非功能性的注释掉。 这是它的样子---最后一个处于活动状态

    “terminal.integrated.defaultProfile.windows”:null,

这意味着自动检测默认值,选择您要选择的文件路径,例如。路径:ash.exe 中的 C:\Program Files\Git 通过删除前面的正斜杠 [//] 来启用它,其余保留在 // 现在配置文件将处于活动状态 我希望这对你有用..

 // The default terminal profile on Windows.
//  - null: Automatically detect the default
//  - PowerShell: $(terminal-powershell) PowerShell
// - path: C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe
//  - Windows PowerShell: $(terminal-powershell) Windows PowerShell
// - path: C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe
//  - Git Bash: $(terminal) Git Bash
// - path: C:\Program Files\Git\bin\bash.exe
// - args: ['--login','-i']
//  - Command Prompt: $(terminal-cmd) Command Prompt
// - path: C:\Windows\System32\cmd.exe
// - args: []
//  - JavaScript Debug Terminal: $($(debug)) JavaScript Debug Terminal
// - extensionIdentifier: ms-vscode.js-debug
    "terminal.integrated.defaultProfile.windows": null,
© www.soinside.com 2019 - 2024. All rights reserved.