microsoft / microsoft/vscode-dotnettools
[BUG] existingDotnetPath setting is ignored if the tool autodetects preinstalled runtime
Nobody has claimed this yet.
- Dominant language
- No language data
- Stars
- 321
- Forks
- 54
- Avg merge
- 2d 19h
- Merged PRs (30d)
- 2
Description
Describe the Issue
Like described in #314 or #138 I put the existingDotnetPath setting in my settings.json, but the tool detects a dotnet somewhere else, and uses that. This is an issue for me because this other dotnet doesn't have the correct SDKs installed.
Starting Spawn .NET server...
Starting Open a solution...
Starting Open a solution with environment service...
Starting Clear environment...
Using preinstalled .NET runtime at "C:\Program Files\dotnet\dotnet.exe"
.NET server started and IPC established in 2812ms
Steps To Reproduce
settings.json:
{
"dotnetAcquisitionExtension.existingDotnetPath": [
{
"extensionId": "ms-dotnettools.csdevkit",
"path": "C:\\Users\\User\\AppData\\Local\\Microsoft\\dotnet\\dotnet.exe"
},
//ms-dotnettools.vscodeintellicode-csharp, ms-dotnettools.csharp, ms-dotnettools.vscode-dotnet-runtime
]
}
Expected Behavior
Either the option existingDotnetPath should take precedence, or there needs to be a way to make it stop autodetecting preinstalled SDKs and force a download.
Environment Information
VS Code: 1.84.2 (user setup)
C# extension: v2.12.19
C# Dev Kit extension: v1.0.14
.NET Install Tool: v2.0.0
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the settings.json example and the runtime startup log showing the preinstalled path. Trace how existingDotnetPath is handled relative to preinstalled runtime autodetection, then verify that the configured path is honored or that force-download behavior is available. Done means the reported configuration no longer selects the wrong runtime and the behavior is covered by a regression test.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp, vscode
- Domain
- developer-experience, tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 32/100