diff --git a/src/frontend/src/content/docs/get-started/aspire-sdk.mdx b/src/frontend/src/content/docs/get-started/aspire-sdk.mdx index f654ac15e..a942969c6 100644 --- a/src/frontend/src/content/docs/get-started/aspire-sdk.mdx +++ b/src/frontend/src/content/docs/get-started/aspire-sdk.mdx @@ -94,6 +94,55 @@ var microservice2 = builder.AddProject("micro2"); ### Orchestrator dependencies -The Aspire SDK dynamically adds references to the [Aspire dashboard](/dashboard/overview/) and other AppHost dependencies, such as the developer control plane (DCP) packages. These dependencies are specific to the platform that the AppHost is built on. +The Aspire SDK dynamically adds references to the [Aspire Dashboard](/dashboard/overview/) and other AppHost dependencies, such as the developer control plane (DCP) packages. These dependencies are specific to the platform that the AppHost is built on. When the AppHost project runs, the orchestrator relies on these dependencies to provide the necessary functionality to the AppHost. For more information, see [Aspire orchestration overview](/get-started/app-host/). + +### Use the Aspire CLI bundle for orchestration dependencies + +:::caution[Preview feature] +`AspireUseCliBundle` is a preview opt-in that smooths the transition to CLI-bundle-based orchestration dependencies before they become the default. +::: + +Today, the Aspire SDK restores the binaries for these dependencies from platform-specific NuGet packages, so the versions that run with your AppHost are tied to package restore. + +Aspire is moving toward using the installed **Aspire CLI bundle** as the source for those orchestration dependencies. With this model, those binaries update when you update the Aspire CLI through [`aspire update --self`](/reference/cli/commands/aspire-update/) instead of being tied to RID-specific `Aspire.Hosting.Orchestration.*` and `Aspire.Dashboard.Sdk.*` package references in each AppHost project. + +Set `AspireUseCliBundle` to `true` to opt in during the transition before this behavior becomes the default. + +When `AspireUseCliBundle` is `true`: + +- `Aspire.AppHost.Sdk` still sets AppHost properties and adds the implicit `Aspire.Hosting.AppHost` package. +- Your AppHost uses the DCP and Dashboard versions installed with the Aspire CLI. +- At build time, the SDK resolves the DCP and Dashboard executables in this priority order: + 1. Explicit `AspireCliBundlePath` / `AspireCliPath` properties in the project file. + 2. The `aspire` executable on `PATH`. +- If the bundle cannot be found, the build emits error `ASPIRE009` with a message directing you to [get.aspire.dev](https://get.aspire.dev) to install the Aspire CLI. + +#### Enable the opt-in + +Set `AspireUseCliBundle` in your AppHost `.csproj`: + +```xml title="MyApp.AppHost.csproj" + + true + +``` + +:::note[Advanced scenario: Override the bundle path] +Most apps don't need to set the CLI bundle path. If the Aspire CLI isn't on `PATH`, provide an explicit path using `AspireCliBundlePath` (path to the CLI bundle directory) or `AspireCliPath` (path to the `aspire` executable): + +```xml title="MyApp.AppHost.csproj" + + true + + /usr/local/bin/aspire + + + +``` +::: + +#### Running with aspire run or aspire start + +When you start an opted-in AppHost using `aspire run` or `aspire start`, the CLI automatically passes the resolved bundle paths through the `ASPIRE_DCP_PATH` and `ASPIRE_DASHBOARD_PATH` environment variables.