aspire doctor command
Dette indhold er ikke tilgængeligt i dit sprog endnu.
aspire doctor - Check the Aspire development environment for common issues.
Synopsis
Section titled “Synopsis”aspire doctor [options]Description
Section titled “Description”The aspire doctor command runs a series of diagnostic checks to verify that your development environment is properly configured for Aspire development. It checks prerequisites such as the .NET SDK, container runtime, 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:
- SDK checks: Verifies .NET SDK installation and version requirements
- Container checks: Validates container runtime (Docker/Podman) availability and configuration
- Environment checks: Validates environment variables and other settings
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.
Options
Section titled “Options”The following options are available:
-
--jsonOutputs the check results in JSON format. This is useful for automation scenarios or when you need to parse the results programmatically.
-
-?, -h, --helpPrints help and usage documentation for the available commands and options.
-
-d, --debugEnable debug logging to the console, which prints detailed information about what Aspire CLI is doing when a command is run.
-
--wait-for-debuggerWait for a debugger to attach before running a command.
Examples
Section titled “Examples”-
Run diagnostic checks on your development environment:
Aspire CLI aspire doctor -
Run diagnostic checks with JSON output:
Aspire CLI aspire doctor --json
Sample output
Section titled “Sample output”When you run aspire doctor, you see output similar to the following:
Environment Check=================
SDK✓ .NET SDK 10.0.100 or later is installed✓ Aspire templates are available
Container Runtime✓ Docker is installed and running✓ Docker Compose is available
Environment✓ ASPNETCORE_ENVIRONMENT is set correctly
Summary: 5 passed, 0 warnings, 0 failedExit codes
Section titled “Exit codes”The command returns the following exit codes:
| Exit code | Description |
|---|---|
0 | All checks passed (warnings are allowed) |
1 | One or more checks failed |
JSON output format
Section titled “JSON output format”When using the --json option, the output includes a structured response with all check results and a summary:
{ "checks": [ { "category": "sdk", "message": ".NET SDK 10.0.100 or later is installed", "status": "Pass" } ], "summary": { "passed": 5, "warnings": 0, "failed": 0 }}