aspire stop command
aspire stop - Stop a running Aspire AppHost.
Synopsis
Section titled “Synopsis”aspire stop [<resource>] [options]Description
Section titled “Description”The aspire stop command stops a running Aspire AppHost process, or a specific resource within a running AppHost. When a <resource> name is provided, only that resource is stopped. When no resource is specified, the entire AppHost and all its child processes are stopped.
When executed without the --project option and without a resource name, the command:
- Scans for all running AppHost processes.
- If multiple AppHosts are running within the current directory scope, prompts you to select which one to stop.
- If only one AppHost is running in scope, stops it directly.
- 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.
Arguments
Section titled “Arguments”-
<resource>The name of the resource to stop. If not specified, stops the entire AppHost. When a resource name is provided, only that specific resource within the running AppHost is stopped.
Options
Section titled “Options”The following options are available:
-
--project <path>The path to the Aspire AppHost project file. When specified, the command stops only the AppHost running from that project file without prompting for selection.
-
-?, -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.
Examples
Section titled “Examples”-
Stop the AppHost running in the current directory scope:
Aspire CLI aspire stop -
Stop a specific AppHost project:
Aspire CLI aspire stop --project './src/MyApp.AppHost/MyApp.AppHost.csproj' -
Stop a specific resource within a running AppHost:
Aspire CLI aspire stop myresource