microsoft / microsoft/vscode-dotnettools

[BUG] existingDotnetPath setting is ignored if the tool autodetects preinstalled runtime

Open
#784 6 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

area-sdk bug
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

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.