Skip to content
Docs Try Aspire

aspire stop command

aspire stop - Stop a running Aspire AppHost.

Aspire CLI
aspire stop [options]

The aspire stop command stops a running Aspire AppHost process. When no options are provided, the command scans for running AppHosts and stops the in-scope AppHost directly, or prompts you to choose one when multiple AppHosts are available.

When executed without the --apphost option, the command:

  1. Scans for all running AppHost processes.
  2. If multiple AppHosts are running within the current directory scope, prompts you to select which one to stop.
  3. If only one AppHost is running in scope, stops it directly.
  4. If no in-scope AppHosts are found but out-of-scope AppHosts exist, displays all running AppHosts for selection.

The command sends a stop signal to the CLI process that started the AppHost, which ensures a clean shutdown of all resources including the dashboard and any containers or processes that were started.

The following options are available:

  • --apphost <apphost>

    The path to the Aspire AppHost project file. When specified, the command stops only the AppHost running from that apphost without prompting for selection.

  • --all

    Stop all running AppHosts without prompting for selection.

  • -?, -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.

  • Stop the AppHost running in the current directory scope:

    Aspire CLI
    aspire stop
  • Stop a specific AppHost project:

    Aspire CLI
    aspire stop --apphost './src/MyApp.AppHost/MyApp.AppHost.csproj'
  • Stop all running AppHosts:

    Aspire CLI
    aspire stop --all