microsoft / microsoft/vscode-dotnettools
Test explorer won't discover tests if any project TFM is incompatible with the current platform
@peterwald is already working on this.
Since Apr 23, 2026.
- Dominant language
- No language data
- Stars
- 321
- Forks
- 54
- Avg merge
- 2d 19h
- Merged PRs (30d)
- 2
Description
Describe the Issue
I was trying to run some Roslyn compiler tests on my Mac and hit the following error:
2026-04-21 15:04:07.332 [error] Test discovery was aborted. See troubleshooting guidance: https://aka.ms/csdk-test-trouble
2026-04-21 15:04:07.339 [info] You must install or update .NET to run this application.
2026-04-21 15:04:07.346 [info] App: /Users/rikkigibson/src/roslyn/artifacts/bin/Microsoft.CodeAnalysis.Workspaces.UnitTests/Debug/net10.0-windows/testhost.dll
2026-04-21 15:04:07.350 [info] Architecture: arm64
2026-04-21 15:04:07.353 [info] Framework: 'Microsoft.WindowsDesktop.App', version '10.0.0' (arm64)
2026-04-21 15:04:07.355 [info] .NET location: /usr/local/share/dotnet/
2026-04-21 15:04:07.356 [info] No frameworks were found.
2026-04-21 15:04:07.358 [info] Learn more:
2026-04-21 15:04:07.364 [info] https://aka.ms/dotnet/app-launch-failed
2026-04-21 15:04:07.366 [info] To install missing framework, download:
2026-04-21 15:04:07.370 [info] https://aka.ms/dotnet-core-applaunch?framework=Microsoft.WindowsDesktop.App&framework_version=10.0.0&arch=arm64&rid=osx-arm64&os=osx.15
2026-04-21 15:04:07.372 [error] System.InvalidOperationException: The provided manager was not found in any slot.
at Microsoft.VisualStudio.TestPlatform.CrossPlatEngine.Client.ParallelOperationManager`3.ClearCompletedSlot(TManager completedManager) in /_/src/vstest/src/Microsoft.TestPlatform.CrossPlatEngine/Client/Parallel/ParallelOperationManager.cs:line 281
at Microsoft.VisualStudio.TestPlatform.CrossPlatEngine.Client.ParallelOperationManager`3.RunNextWork(TManager completedManager) in /_/src/vstest/src/Microsoft.TestPlatform.CrossPlatEngine/Client/Parallel/ParallelOperationManager.cs:line 264
at Microsoft.VisualStudio.TestPlatform.CrossPlatEngine.Client.Parallel.ParallelProxyDiscoveryManager.HandlePartialDiscoveryComplete(IProxyDiscoveryManager proxyDiscoveryManager, Int64 totalTests, IEnumerable`1 lastChunk, Boolean isAborted) in /_/src/vstest/src/Microsoft.TestPlatform.CrossPlatEngine/Client/Parallel/ParallelProxyDiscoveryManager.cs:line 198
at Microsoft.VisualStudio.TestPlatform.CrossPlatEngine.Client.Parallel.ParallelDiscoveryEventsHandler.HandleDiscoveryComplete(DiscoveryCompleteEventArgs discoveryCompleteEventArgs, IEnumerable`1 lastChunk) in /_/src/vstest/src/Microsoft.TestPlatform.CrossPlatEngine/Client/Parallel/ParallelDiscoveryEventsHandler.cs:line 81
at Microsoft.VisualStudio.TestPlatform.CrossPlatEngine.Client.ProxyDiscoveryManager.InitializeDiscovery(DiscoveryCriteria discoveryCriteria, ITestDiscoveryEventsHandler2 eventHandler, Boolean skipDefaultAdapters) in /_/src/vstest/src/Microsoft.TestPlatform.CrossPlatEngine/Client/ProxyDiscoveryManager.cs:line 160
at Microsoft.VisualStudio.TestPlatform.CrossPlatEngine.Client.ProxyDiscoveryManager.DiscoverTests(DiscoveryCriteria discoveryCriteria, ITestDiscoveryEventsHandler2 eventHandler) in /_/src/vstest/src/Microsoft.TestPlatform.CrossPlatEngine/Client/ProxyDiscoveryManager.cs:line 174
As far as I can tell the issue is related to the fact that the solution has net10.0-windows projects in it. But the project I want to do discovery in uses net10.0.
Steps To Reproduce
Checkout https://github.com/dotnet/roslyn/commit/3b29bf12eaed16a472b0980e277f2c2a9893951a
Restore
Open in VS Code
Open the Test Explorer sidebar.
The test discovery error should pop up automatically but you can also trigger it by running "Refresh Tests".
Expected Behavior
Test discovery would proceed without errors. Optionally, target frameworks such as net10.0-windows would be filtered out of discovery, when running on non-Windows platform, but, I think even this isn't necessary in principle, dotnet test can run such tests on non-Windows as long as actual Windows-specific features are not used.
Environment Information
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.
Assessment
This issue has not been assessed yet.