Aspire

aspire doctor command

aspire doctor - Check the Aspire development environment for common issues.

Aspire CLI
aspire doctor [options]

The aspire doctor command runs a series of diagnostic checks to help you troubleshoot your Aspire development environment. It checks SDKs, container runtimes, and environment settings.

This command is useful for troubleshooting when you encounter issues with Aspire or when setting up a new development environment. The checks are grouped by category:

  • Aspire checks: Reports the current Aspire CLI version and whether a newer CLI version is available, and suggests running aspire update when a newer one is available
  • AppHost checks: Reports the AppHost Aspire SDK version when an AppHost project is present in the current directory
  • SDK checks: Reports .NET SDK availability and version
  • Container checks: Validates container runtime availability, running status, and version. On Windows, this includes WSLc in addition to Docker and Podman; on other platforms only Docker and Podman are checked. Marks the active runtime ← active, or ← explicitly selected when chosen via ASPIRE_CONTAINER_RUNTIME
  • Environment checks: Reports operating system information (type, version, and Linux distro details when available) and validates environment variables and other settings, including the JavaScript toolchain required by TypeScript AppHosts (npm, pnpm, Yarn, or Bun) and the Go toolchain required by Go AppHosts
  • Development tools checks: When VS Code is detected, reports whether the Aspire VS Code extension is installed

The command displays results with clear status indicators:

  • ✅ (green) - Check passed
  • ⚠️ (yellow) - Warning (non-blocking issue)
  • ❌ (red) - Check failed (blocking issue)

If any checks fail, the command provides suggestions for how to fix the issues and links to relevant documentation.

The following options are available:

  • --format <Table|Json>

    Output format (Table or Json). Use Json for automation scenarios or when you need to parse the results programmatically. Defaults to Table.

  • -?, -h, --help

    Prints help and usage documentation for the available commands and options.

  • -l, --log-level <Critical|Debug|Error|Information|None|Trace|Warning>

    Set the minimum log level for console output. Use this option to increase diagnostics while troubleshooting or reduce output in scripted runs.

  • --non-interactive

    Run the command in non-interactive mode, disabling all interactive prompts and spinners.

  • --nologo

    Suppress the startup banner and telemetry notice.

  • --banner

    Display the animated Aspire CLI welcome banner.

  • --wait-for-debugger

    Wait for a debugger to attach before running a command.

  • Run diagnostic checks on your development environment:

    Aspire CLI
    aspire doctor
  • Run diagnostic checks with JSON output:

    Aspire CLI
    aspire doctor --format Json

When you run aspire doctor from a directory containing an AppHost project, you see output similar to the following:

Aspire CLI
Checking Aspire environment...
Aspire Environment Check
========================
Aspire
✅ Aspire CLI version 17.0.0
AppHost
✅ AppHost version 17.0.0 (MyApp.AppHost.csproj)
.NET SDK
✅ .NET 10.0.203 installed (arm64)
Container Runtime
✅ Docker v28.5.1: running ← active
Environment
✅ Operating system: macOS 15.5.0
✅ HTTPS development certificate is trusted
Summary: 6 passed, 0 warnings, 0 failed

After the summary, table output also includes an Aspire CLI Installations table that lists discovered CLI binaries with their path, version, channel, install route, and PATH status.

When the CLI is out of date, the Aspire section shows a warning with the latest available version and a suggestion to run aspire update:

Aspire CLI
Aspire
⚠️ Aspire CLI version 17.0.0-dev is out of date. Latest version is 17.0.0-preview.1.26567.5
Run 'aspire update' to update Aspire CLI.
AppHost
✅ AppHost version 17.0.0 (MyApp.AppHost.csproj)

This warning snippet is abbreviated. In complete table output, a summary follows the check results. When any warning or failure is present, Aspire also prints For detailed prerequisites: https://aka.ms/aspire-prerequisites. Some CLI and AppHost version messages include an inline (channel: <name>) suffix; the same channel data appears in JSON metadata as identityChannel, latestVersionChannel, or pinnedChannel when available.

On Linux, when certutil is not installed, the Environment section reports a warning instead of failing the check:

Aspire CLI
Environment
✅ Operating system: Linux Ubuntu 24.04
⚠️ certutil is not available; browser certificate trust may be incomplete
Install certutil from your distribution's NSS tools package (for example, libnss3-tools).

On Linux, when the OpenSSL development certificate cache is stale, missing the current certificate, or contains unreadable certificate files, the Environment section reports a warning with a suggestion to clean and re-trust the certificate:

Aspire CLI
Environment
✅ Operating system: Linux Ubuntu 24.04
⚠️ OpenSSL HTTPS development certificate cache is missing the current certificate
Run 'aspire certs clean' and then 'aspire certs trust' to remove stale or corrupt certificates and regenerate trusted development certificates.

When only Podman is running:

Aspire CLI
Container Runtime
✅ Podman v5.3.0: running ← active
❌ Docker is not installed

When you set ASPIRE_CONTAINER_RUNTIME=podman, only Podman is checked and it’s marked explicitly selected, even when Docker is also installed and running:

Aspire CLI
Container Runtime
✅ Podman v5.3.0: running ← explicitly selected

The active runtime is annotated with ← active; a runtime chosen via ASPIRE_CONTAINER_RUNTIME is annotated with ← explicitly selected instead, and only that runtime is checked.

On Windows, when multiple runtimes are installed, aspire doctor reports all of them in Docker, Podman, WSLc priority order and marks the active one ← active:

Aspire CLI
Container Runtime
✅ Docker v29.8.2: running ← active
⚠️ Podman: installed but not running
✅ WSLc v3.0.4.0: running

When you set ASPIRE_CONTAINER_RUNTIME=wslc, Aspire checks only WSLc and marks it ← explicitly selected:

Aspire CLI
Container Runtime
✅ WSLc v3.0.4.0: running ← explicitly selected

If the selected WSLc client or session manager is older than the minimum supported version, aspire doctor reports a blocking failure instead of a warning:

Aspire CLI
Container Runtime
❌ WSLc client version 3.0.3.0 is below minimum required 3.0.4.0 ← explicitly selected
Upgrade WSLc to version 3.0.4.0 or later. See: https://aka.ms/aspire/containers

WSLc is only recognized on Windows; setting ASPIRE_CONTAINER_RUNTIME=wslc on macOS or Linux reports a blocking failure recommending Docker or Podman instead.

When VS Code is detected but the Aspire extension isn’t installed, the Development tools section reports a warning:

Aspire CLI
Development tools
⚠️ VS Code is installed, but the Aspire extension is not installed
Install the Aspire extension from the VS Code Marketplace for an integrated Aspire experience.

When static Aspire skill copies are found, the Environment section lists their directories and the agents that read them:

Aspire CLI
Environment
🚨 Found static copies of Aspire skills.
Run 'aspire agent init' to configure skill sources and remove these copies.
Details:
.agents/skills/aspire (copilot, opencode)
~/.agents/skills/aspire (copilot, opencode)

The command returns the following exit codes:

Exit codeDescription
0All checks passed (warnings are allowed)
1One or more checks failed

When using the --format Json option, the output includes a structured response with all check results, a summary, and discovered Aspire CLI installations. The following example is abbreviated to focus on selected checks; actual output includes an entry for every check and can include additional metadata, such as updateCommand, identityChannel, latestVersionChannel, and pinnedChannel.

JSON output
{
"checks": [
{
"category": "aspire",
"name": "cli-version",
"status": "pass",
"message": "Aspire CLI version 17.0.0",
"metadata": {
"currentVersion": "17.0.0"
}
},
{
"category": "apphost",
"name": "apphost-version",
"status": "pass",
"message": "AppHost version 17.0.0 (MyApp.AppHost.csproj)",
"metadata": {
"appHostPath": "MyApp.AppHost.csproj",
"version": "17.0.0"
}
},
{
"category": "environment",
"name": "operating-system",
"status": "pass",
"message": "Operating system: Linux Ubuntu 24.04",
"metadata": {
"osType": "Linux",
"displayName": "Linux Ubuntu",
"version": "24.04",
"description": "Ubuntu 24.04.2 LTS"
}
},
{
"category": "sdk",
"name": "dotnet-sdk",
"status": "pass",
"message": ".NET 10.0.203 installed (arm64)"
}
],
"summary": {
"passed": 6,
"warnings": 0,
"failed": 0
}
}

When VS Code is detected, the checks include a devtools category entry named vscode-extension. It reports "status": "warning" when the Aspire VS Code extension isn’t installed, and "status": "pass" when it is. Its metadata includes vsCodeInstalled, extensionInstalled, and extensionId:

JSON output
{
"category": "devtools",
"name": "vscode-extension",
"status": "warning",
"message": "VS Code is installed, but the Aspire extension is not installed",
"fix": "Install the Aspire extension from the VS Code Marketplace for an integrated Aspire experience.",
"link": "https://aka.ms/aspire/vscode-extension",
"metadata": {
"vsCodeInstalled": true,
"extensionInstalled": false,
"extensionId": "microsoft-aspire.aspire-vscode"
}
}

This check is omitted entirely when VS Code isn’t detected on the machine.

When the CLI is out of date, the cli-version check has "status": "warning" and the metadata includes the latest available version:

JSON output
{
"category": "aspire",
"name": "cli-version",
"status": "warning",
"message": "Aspire CLI version 17.0.0-dev is out of date. Latest version is 17.0.0-preview.1.26567.5",
"fix": "Run 'aspire update' to update Aspire CLI.",
"metadata": {
"currentVersion": "17.0.0-dev",
"latestVersion": "17.0.0-preview.1.26567.5"
}
}

The aspire-skill-sources check in the environment category reports "status": "warning" when static Aspire skill copies are found. The details string lists the affected directories and agents, and metadata.workspaceRoot provides the workspace root as context:

JSON output
{
"category": "environment",
"name": "aspire-skill-sources",
"status": "warning",
"message": "Found static copies of Aspire skills.",
"fix": "Run 'aspire agent init' to configure skill sources and remove these copies.",
"details": ".agents/skills/aspire (copilot, opencode)\n~/.agents/skills/aspire (copilot, opencode)",
"metadata": {
"workspaceRoot": "C:\\Users\\dev\\src\\my-app"
}
}

The apphost-version check is only present in the JSON output when an AppHost project is discovered in the current directory.

The operating-system check is always present and includes the following metadata fields:

FieldDescription
osTypeThe platform family: Windows, macOS, or Linux.
displayNameA human-readable OS name, for example Windows, macOS, or Linux Ubuntu.
versionThe OS version string. On Linux this is the VERSION_ID from /etc/os-release when available; on Windows and macOS it is the value from Environment.OSVersion.
descriptionA longer description of the OS. On Linux this is the PRETTY_NAME value from /etc/os-release (for example Ubuntu 24.04.2 LTS); on other platforms it is the runtime OS description string.