Use C# Dev Kit selected workspace dotnet host for debugger prerequisite checks
维护者通常 1 天内回复
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 52/100
- Issue 类型
- 缺陷
- 描述清晰度
- 基本清楚
- 活跃度
- 活跃
- 技术栈
- csharp, typescript, vscode
调研方向
从 src/coreclrDebug/util.ts 和 checkDotNetCli() 开始,然后跟踪 src/coreclrDebug/activate.ts 和 showDotnetToolsWarning(),以及 C# Dev Kit 的发现和导出文件。重现 Remote SSH 激活场景,并验证 C# 使用选定的工作区主机,在被阻止期间抑制重复的 remediation,并在 Dev Kit 缺失或被绕过时保留独立运行行为。
由索引模型根据 Issue 内容生成。
描述
Problem
When C# Dev Kit owns workspace SDK selection through Workspace Requirements, the C# extension still independently runs dotnet --info against its own configured paths/ambient PATH during debugger activation.
In a Remote SSH Linux workspace with no ambient dotnet on PATH, this produces two competing remediations at once:
- C# Dev Kit opens Workspace Requirements with Install .NET 10 SDK.
- The C# extension shows The .NET SDK cannot be located with Get the SDK.
The C# notification is especially confusing because its Get the SDK action already delegates to csdevkit.installDotnetSdk when C# Dev Kit is present, while the prerequisite check that raised it did not use C# Dev Kit's selected host or blocked state.
Observed with:
- C# Dev Kit
9.9.554-g91f1bb - C#
2.140.9 - VS Code Remote SSH to Ubuntu 24.04 x64
- no ambient
dotneton the remotePATH
Relevant current code:
src/coreclrDebug/util.ts:checkDotNetCli()runsdotnet --infousing C# extension paths.src/coreclrDebug/activate.ts:showDotnetToolsWarning()routes Get the SDK tocsdevkit.installDotnetSdkwhen Dev Kit is present.src/utils/getCSharpDevKit.tsandsrc/csharpDevKitExports.ts: C# already discovers and consumes C# Dev Kit exports, but there is no selected workspace host/readiness contract.
Expected behavior
C# Dev Kit should be the single SDK/host authority when it is active and dotnet.preferCSharpExtension is not selected:
- C# obtains the exact workspace
dotnetexecutable and environment selected by C# Dev Kit before debugger prerequisite checks. - If Workspace Requirements is blocked and has opened its remediation UI, C# does not show a second SDK-install notification.
- After the user installs or selects the SDK and reloads, both extensions use the same host.
- When C# Dev Kit is absent or explicitly bypassed, C# retains its current standalone discovery and notification behavior.
A minimal contract could be an optional C# Dev Kit export returning { status: ready | blocked, dotnetPath?, environment? }. Because workspace host changes are already reload-bound, this does not require live language-server/debugger host switching.
Related
- microsoft/vscode-dotnettools#1243
- microsoft/vscode-dotnettools#792
- dotnet/vscode-csharp#6620
- 主要语言
- TypeScript
- 星标
- 3.1k
- 派生
- 741
- 平均合并
- 1 天 8 小时
- 30 天内合并 PR
- 59
环境准备
在浏览器里用你自己的 GitHub 账号启动这个项目的开发容器。
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
dotnet/vscode-csharp 的其他 Issue
-
Remove temporary .NET 11 CI container digest pin可能重新可做 关联的 PR 已关闭且未合并。 未关闭Infrastructure Test
难度 2/5 1-3 小时 新手友好度 70/100
dotnet/vscode-csharp#9791 · 1 条评论 ·
维护者通常 1 天内回复
-
untriaged
难度 4/5 3-5 天 新手友好度 30/100
dotnet/vscode-csharp#9940 · 1 条评论 ·
维护者通常 1 天内回复
-
Bug C#DK
难度 3/5 1-2 天 新手友好度 35/100
dotnet/vscode-csharp#9910 ·
维护者通常 1 天内回复
-
a未关闭C#DK untriaged
难度 3/5 1-2 天 新手友好度 25/100
dotnet/vscode-csharp#9901 ·
维护者通常 1 天内回复
-
Debugger untriaged
难度 4/5 3-5 天 新手友好度 48/100
dotnet/vscode-csharp#9891 · 9 条评论 ·
维护者通常 1 天内回复
查看 dotnet/vscode-csharp 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 68/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 78/100
kunchenguid/gh-axi#247 ·
维护者通常 1 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 72/100
lidge-jun/opencodex#8101 · 2 条评论 ·
维护者通常 1 天内回复
-
effort:S P3 refactor
难度 2/5 1-3 小时 新手友好度 72/100
nightscout/nocturne#3243 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 68/100
JuliusBrussee/caveman#1449 ·
维护者通常 1 天内回复