Skip to content

C# Doctor reports a missing runtime for a console app when only ASP.NET Core is absent #3896

Todo

Description

Describe the issue

With a net10.0 console app and an explicitly selected SDK host containing .NET Core 10 but not ASP.NET Core 10, Doctor reports the project's .NET 10 runtime as missing. The console app requires only Core and runs on that host.

Scenario: APP-06 — Console app with the matching Core runtime present and ASP.NET Core absent. Both the no-policy and working global.json variants failed.

Collect logs

Doctor showed Tooling Requirements: Done and Project Runtime Requirements: Failed, listing .NET 10.0 Missing. The selected custom host's dotnet --list-runtimes listed Microsoft.NETCore.App 10.0.15 but no ASP.NET Core runtime. Running the built console DLL directly with that host exited 0. F5 also exited 0, although its debug output showed it used the separate default dotnetup host. A C# Dev Kit log archive was not collected.

Steps to reproduce

  1. Prepare a disposable custom .NET installation containing SDK 10.0.404 and Microsoft.NETCore.App 10.0.15 but no Microsoft.AspNetCore.App runtime.
  2. Set workspace dotnet.projectSdkPath to that installation's dotnet executable and open a simple net10.0 console app.
  3. Allow restore and project evaluation to finish, then inspect C# Doctor.
  4. Repeat with a working global.json specifying SDK 10.0.404 and rollForward: latestFeature.
  5. Run the built DLL using the custom host's dotnet executable.

Expected behavior

Doctor recognizes the console app's Core runtime as present and does not report an unrelated missing ASP.NET Core runtime.

Actual behavior

Doctor reported .NET 10.0 Missing and offered a Fix that would clear the workspace SDK-path setting and reload. The same console DLL ran successfully using the custom Core-only host. The working policy was unchanged.

Environment information

  • macOS ARM64
  • VS Code Stable 1.147.0
  • C# Dev Kit 11.11.112 (commit 647204)
  • C# 11.11.50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bug

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions