Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

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

Đang mở
#9,787 6 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
58/100
Loại issue
Tính năng
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
csharp, typescript
Lĩnh vực
devtools, testing-qa

Hướng nghiên cứu

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.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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.
Ngôn ngữ chính
TypeScript
Star
3.1k
Fork
736
Merge trung bình
21 giờ 21 phút
Pull request đã merge (30 ngày)
42

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của dotnet/vscode-csharp

Tất cả issue của dotnet/vscode-csharp

Issue tương tự

Thêm issue về TypeScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.