Skip to content

C# Dev Kit Test Explorer does not discover tests for .slnx solution, while dotnet test on the same .slnx succeeds #2925

@moni-dips

Description

@moni-dips

Describe the Issue

If I add an equivalent legacy .sln for the same projects, Test Explorer starts showing the tests.

So this does not appear to be a .NET SDK or test adapter problem. It looks like a C# Dev Kit / VS Code project-loading or test-discovery issue specific to .slnx.

Steps To Reproduce

  1. Create a solution with the current SDK so it defaults to .slnx:
  2. Create a class library and xUnit test project:
  3. Add both projects to the .slnx:
  4. Confirm CLI test discovery works:
  5. Open the folder in VS Code with C# Dev Kit enabled.
  6. Observe that Test Explorer does not discover the tests.
  7. Create an equivalent legacy .sln and add the same projects:
  8. Reopen or switch to the .sln.
  9. Observe that Test Explorer now discovers the tests.

Expected Behavior

If C# Dev Kit can open the .slnx and dotnet test Repro.slnx succeeds, Test Explorer should also discover tests from that solution.

Environment Information

  • OS: Windows
  • Extension version: 3.10.4

detailed version info:

Version: 1.113.0 (user setup)
Commit: cfbea10c5ffb233ea9177d34726e6056e89913dc
Date: 2026-03-24T15:07:18+01:00
Electron: 39.8.3
ElectronBuildId: 13620978
Chromium: 142.0.7444.265
Node.js: 22.22.1
V8: 14.2.231.22-electron.0
OS: Windows_NT x64 10.0.26100

Metadata

Metadata

Assignees

Labels

area-testTest discovery, execution, debuggingbugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions