Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Add a dotnet.defaultGlobalJson setting for language server and test context loading

Aperta
#9,787 6 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
58/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
csharp, typescript

Direzione di ricerca

Start by tracing the existing dotnet.defaultSolution setting and the workspace-context initialization used by the language server. Follow that path into project and solution loading plus Test Explorer discovery and execution; done means the documented setting selects a workspace-relative global.json, preserves fallback discovery, and reports invalid paths.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

untriaged

Feature request

Please add a workspace setting such as dotnet.defaultGlobalJson, analogous to the existing dotnet.defaultSolution setting.

This setting should allow a repository to identify the global.json that controls its .NET SDK and test-runner context when that file is located in a subdirectory rather than at the workspace root.

Proposed behavior

When dotnet.defaultGlobalJson is configured, C# Dev Kit should use that file when initializing the workspace context for:

  • the language server
  • project and solution loading
  • Test Explorer test discovery and execution

The setting should support a workspace-relative path, for example:

{
  "dotnet.defaultSolution": "dotnet/agent-framework-release.slnf",
  "dotnet.defaultGlobalJson": "dotnet/global.json"
}

The explicit setting should take precedence over automatic global.json discovery for the affected workspace context. Existing automatic discovery should remain unchanged when the setting is absent.

Scenario

A repository may contain multiple language and tooling areas and keep its .NET configuration under a dotnet/ subdirectory. In this layout, the workspace root may contain the solution filter at dotnet/agent-framework-release.slnf and the SDK/test configuration at dotnet/global.json.

For example, the repository where this was observed has a dotnet/global.json selecting Microsoft Testing Platform, while its test projects use UseMicrosoftTestingPlatformRunner=true. Direct MTP discovery finds the tests when run from the dotnet directory, but opening the repository root provides no way to explicitly select the nested global.json context for the language server and Test Explorer.

Acceptance criteria

  • Add and document dotnet.defaultGlobalJson.
  • Honor it when loading the language-server workspace context.
  • Honor it during Test Explorer discovery and test execution.
  • Preserve current automatic discovery when the setting is absent.
  • Report a clear diagnostic when the configured path does not exist or is invalid.
Lingua principale
TypeScript
Stelle
3.1k
Fork
736
Merge medio
21h 21m
PR unite (30g)
42

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di dotnet/vscode-csharp

Tutte le issue di dotnet/vscode-csharp

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.