microsoft / microsoft/vscode-dotnettools
Test discovery aborted when test project targets framework not installed on the machine
@haileymck is already working on this.
Since May 21, 2026.
- Dominant language
- No language data
- Stars
- 321
- Forks
- 54
- Avg merge
- 2d 19h
- Merged PRs (30d)
- 2
Description
Describe the Issue
I get errors like this all the time when I open Aspire repository:
2026-05-21 08:50:10.653 [error] System.Threading.Tasks.TaskCanceledException: A task was canceled.
at Microsoft.VisualStudio.Threading.ThreadingTools.WithCancellationSlow[T](Task`1 task, CancellationToken cancellationToken)
at Microsoft.VisualStudio.TestWindow.Internal.RemoteAgent.TestingPlatform.Clients.TestingPlatformClientConnectionManager.LaunchTestRunnerAndWaitForMainNodeConnectionAsync(TestingPlatformLaunchConfig config, InitializeRequestArgs initializeRequest, CancellationToken cancellationToken)
at Microsoft.VisualStudio.TestWindow.Internal.RemoteAgent.TestingPlatform.Clients.TestingPlatformClientConnectionManager.LaunchTestRunnerAndWaitForMainNodeConnectionAsync(TestingPlatformLaunchConfig config, InitializeRequestArgs initializeRequest, CancellationToken cancellationToken)
at Microsoft.VisualStudio.TestWindow.Internal.RemoteAgent.TestingPlatform.Clients.TestingPlatformClient.CreateTestingPlatformClient(TestingPlatformLaunchConfig config, IProcessFactory processFactory, ITestRunDataSink dataSink, TestingPlatformCallbackHandler callback, IInternalLogger logger, CancellationToken cancellationToken)
at Microsoft.VisualStudio.TestWindow.Internal.RemoteAgent.TestingPlatform.Providers.DefaultProfile.CreateTestingPlatformClient(TestingPlatformLaunchConfig config, ITestRunDataSink dataSink, TestingPlatformCallbackHandler callback, CancellationToken cancellationToken)
at Microsoft.VisualStudio.TestWindow.Internal.RemoteAgent.TestingPlatform.Providers.ClientServerProvider.CreateTestingPlatformClient(TestingPlatformLaunchConfig config, ITestRunDataSink dataSink, TestingPlatformCallbackHandler callback, CancellationToken cancellationToken)
at Microsoft.VisualStudio.TestWindow.Internal.RemoteAgent.TestingPlatform.Providers.TestingPlatformClientProvider.GetOrLaunchClientAsync(String source, String launcherType, String launcherConfiguration, RunSettingsInfo runSettingsInfo, Boolean singleUse, Boolean launchDebugger, IDictionary`2 environmentVariables, CancellationToken cancellationToken)
2026-05-21 08:50:10.656 [error] [Aspire.Microsoft.Azure.StackExchangeRedis.Tests.dll] You must install or update .NET to run this application.
App: C:\Users\karolz\code\aspire\aspire\artifacts\bin\Aspire.Microsoft.Azure.StackExchangeRedis.Tests\Debug\net9.0\Aspire.Microsoft.Azure.StackExchangeRedis.Tests.exe
Architecture: x64
Framework: 'Microsoft.NETCore.App', version '9.0.0' (x64)
.NET location: C:\Program Files\dotnet\
The following frameworks were found:
8.0.27 at [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
10.0.5 at [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
10.0.8 at [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Learn more:
https://aka.ms/dotnet/app-launch-failed
To install missing framework, download:
https://aka.ms/dotnet-core-applaunch?framework=Microsoft.NETCore.App&framework_version=9.0.0&arch=x64&rid=win-x64&os=win10
2026-05-21 08:50:10.659 [error] Connection to test host 'C:\Users\karolz\code\aspire\aspire\artifacts\bin\Aspire.Microsoft.Azure.StackExchangeRedis.Tests\Debug\net9.0\Aspire.Microsoft.Azure.StackExchangeRedis.Tests.dll' was cancelled before it could be established. The test runner process did not connect within the allowed time.
Steps To Reproduce
- Make sure you DON'T have .NET Framework 9.0
- Clone Aspire repository https://github.com/microsoft/Aspire
- Open repository in VS Code
Expected Behavior
It is true that I do not have the framework mentioned in the error message, but I DO have OTHER frameworks installed and I would like to be able to run tests targeting these frameworks. In vast majority of cases my tests are not framework-specific and having them pass/fail with any framework is very indicative of the correctness of the change I am working on.
Environment Information
OS: Windows, latest version
VS Code insiders, latest version
C# Dev Kit 3.20.197
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.