[docs] Document AspireCliInvocationMode for dotnet run DNX invocation - #1484
[docs] Document AspireCliInvocationMode for dotnet run DNX invocation#1484aspire-repo-bot[bot] wants to merge 1 commit into
Conversation
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Frontend HTML artifact readyThe latest frontend build uploaded the This comment updates automatically when a new frontend build artifact is uploaded. |
There was a problem hiding this comment.
Pull request overview
This PR updates the Aspire SDK “Use the Aspire CLI bundle for orchestration dependencies” documentation to cover the new AspireCliInvocationMode behavior when running an opted-in AppHost via dotnet run, aligning the docs site with the behavior change introduced in microsoft/aspire#19310.
Changes:
- Adds a new “Running with dotnet run” subsection describing
AspireCliInvocationModeand its supported values (Path,Dnx,DnxPinned). - Documents the
ASPIRE011failure mode whendnxisn’t available and provides remediation guidance.
Suppressed comments (1)
src/frontend/src/content/docs/get-started/aspire-sdk.mdx:168
- The note says
ASPIRE011is emitted only whenDnx/DnxPinnedis configured, but thePathmode description above also states it can fall back to invoking viadnxwhen no compatibleaspireis found. Clarifying thatASPIRE011can also occur in that fallback scenario makes the troubleshooting guidance consistent.
`dotnet run` is noninteractive, so `dnx` restores and executes without prompting for confirmation. If `dnx` can't be found on `PATH` when `Dnx` or `DnxPinned` mode is configured, the build emits error `ASPIRE011`. Install or use the .NET SDK 10.0 or later, set `AspireCliInvocationMode` to `Path` to use the global `aspire` command, or set `AspireCliPath` to an explicit Aspire CLI executable.
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
|
|
||
| When `AspireUseCliBundle` is `true` and you start the AppHost with `dotnet run` instead of `aspire run`, the SDK resolves and invokes the Aspire CLI itself. Set `AspireCliInvocationMode` to control how that invocation happens: | ||
|
|
||
| - **`Path`** (default) — resolves a compatible `aspire` command from `PATH`. If no compatible command is found, it falls back to invoking the `Aspire.Cli` version paired with `Aspire.AppHost.Sdk` through [`dnx`](https://learn.microsoft.com/dotnet/core/tools/dotnet-dnx). |
| - **`Dnx`** — always invokes the Aspire CLI through `dnx`, using the unversioned `aspire.cli` package. This honors an in-scope [.NET local tool manifest](https://learn.microsoft.com/dotnet/core/tools/local-tools-how-to-use#create-a-manifest-file) (`.config/dotnet-tools.json`) if one pins `Aspire.Cli`, or resolves the latest published package when no manifest applies. | ||
| - **`DnxPinned`** — always invokes the Aspire CLI through `dnx`, using `aspire.cli@<version>` pinned to the exact `Aspire.Cli` version paired with `Aspire.AppHost.Sdk`. Use this when the CLI must match the AppHost SDK version exactly, ignoring any local tool manifest. |
David Pine (IEvangelist)
left a comment
There was a problem hiding this comment.
Automated docs-accuracy review — Phase A (claims) + Phase B (doc-tester)
Phase A source of truth: microsoft/aspire @ release/13.5, SHA 8ab6999850d96e0023670799edbd4bdc245ad63c (matches this PR's base).
Reviewed head SHA: 5c395bb080699c51b3e4bd523d7ee0d59cd4bec5.
Phase A — claims: 9 non-narrative claims extracted → 9 verified, 0 verified-with-nuance, 0 unverifiable, 0 contradicted.
Phase B — doc-tester: 1 page exercised (/get-started/aspire-sdk/, anchor #running-with-dotnet-run) → 0 critical, 1 warning, 0 knowledge gaps.
Verdict: COMMENT — every factual claim in the new "Running with dotnet run" section is verified against the SDK targets; the only finding is a Phase B discoverability warning (non-blocking).
Phase A — Claim verification
No contradicted or unverifiable claims. The new section mirrors the SDK's own MSBuild targets and docs/list-of-diagnostics.md closely.
Verified claims (9) with source evidence
Evidence paths are in microsoft/aspire @ release/13.5 (8ab6999). Primary file: src/Aspire.Hosting.AppHost/build/Aspire.Hosting.AppHost.in.targets.
AspireUseCliBundle=trueopts in to CLI delegation —verified.Aspire.Hosting.AppHost.in.targets:156,214,235,448,571; summarized indocs/list-of-diagnostics.md:18.AspireCliInvocationModecontrols how the SDK invokes the CLI underdotnet run—verified.Aspire.Hosting.AppHost.in.targets:200-201;src/Aspire.Hosting.Tasks/ResolveAspireCliInvocation.cs:23.Path(default): resolveaspirefromPATH, else fall back to theAspire.Cliversion paired withAspire.AppHost.Sdkviadnx—verified. DefaultPathattargets:200; explanatory commenttargets:204-206;docs/list-of-diagnostics.md:18.Dnx: always viadnx, unversionedaspire.cli, honoring an in-scope.config/dotnet-tools.jsontool manifest (else latest) —verified._AspireCliDnxPackageId=aspire.cliattargets:208, invoked unversioned attargets:209; commenttargets:204-206;docs/list-of-diagnostics.md:18.DnxPinned: always viadnx,aspire.cli@<version>pinned to the exactAspire.Cliversion paired with the SDK —verified.aspire.cli@$(AspireHostingSDKVersion)attargets:210;docs/list-of-diagnostics.md:18.AspireCliPathnames an explicit CLI executable —verified. Remediation text attargets:622; consumed byResolveAspireCliInvocation.ASPIRE011is emitted whendnxis not onPATHinDnx/DnxPinned—verified.<Error Code="ASPIRE011" ...>attargets:620;docs/list-of-diagnostics.md:16.dotnet runis noninteractive, sodnxrestores and executes without prompting —verified. Comment "dotnet run is noninteractive, so DNX cannot ask for confirmation" attargets:599;dnxinvoked with--yesattargets:601.- Requires .NET SDK 10.0 or later; remediation is
AspireCliInvocationMode=PathorAspireCliPath—verified. Error remediation text attargets:622.
External cross-references (learn.microsoft.com dnx docs and .NET local-tools manifest docs) are outside microsoft/aspire and out of scope for source verification; Phase B confirmed they render as links.
Phase B — Doc-tester results
Report reproduced verbatim from the doc-tester skill run (blind to source; navigation via Playwright; served locally with pnpm dev).
Documentation Test Report
Focus Area: PR #1484
AspireCliInvocationModeguidance fordotnet run
Date: 2026-08-14
Tester: doc-tester agent
Served Base URL:http://localhost:4321/
Served Head SHA:5c395bb080699c51b3e4bd523d7ee0d59cd4bec5Routes Exercised:
http://localhost:4321/get-started/aspire-sdk/http://localhost:4321/get-started/aspire-sdk/#running-with-dotnet-runScreenshots:
pr1484-running-with-dotnet-run.pngpr1484-running-with-dotnet-run-note.pngSummary
Category Passed Failed Warnings Content Accuracy 4 0 0 Code Examples 1 0 0 CLI Commands 0 0 0 Links 3 0 1 Critical Issues
None.
Warnings
Warning 1: New subsection is not directly reachable from "On this page" navigation
Location:
http://localhost:4321/get-started/aspire-sdk/#running-with-dotnet-run
Issue: The "Running with dotnet run" heading renders and its direct anchor works, but it does not appear in the "On this page" navigation. The nav only lists the parent "Use the Aspire CLI bundle for orchestration dependencies" section, so readers scanning the page navigation may miss the new subsection.
Suggestion: Promote the heading level or otherwise make the subsection discoverable from the page navigation.Passed Checks
- The Aspire SDK page loaded successfully.
- The direct anchor
#running-with-dotnet-runresolved successfully.- The "Running with dotnet run" subsection rendered without obvious formatting issues.
- The mode list rendered clearly with
Path,Dnx, andDnxPinned.- The
dnxexternal documentation link rendered as a link.- The
.NET local tool manifestexternal documentation link rendered as a link.- The XML
MyApp.AppHost.csprojcode block rendered with the expected title.- The XML code block includes
AspireUseCliBundleset totrue.- The XML code block includes
AspireCliInvocationModeset toDnx.- The XML code block has a copy button.
- The
Notecallout rendered correctly.- The note mentions noninteractive
dnx,ASPIRE011, .NET SDK 10.0+, andAspireCliPath.Recommendations
- Priority fixes: None.
- Documentation gaps: Improve discoverability by making "Running with dotnet run" visible in the "On this page" navigation.
- Product issues: None discovered from blind documentation testing.
Knowledge Gaps
None.
Automated review: Phase A verifies claims against microsoft/aspire source at the release branch SHA; Phase B validates the rendered docs as a new user via the doc-tester skill. This is a non-blocking COMMENT.
Documents changes from microsoft/aspire#19310
@DamianEdwardsTargeting
release/13.5— the latest release branch onmicrosoft/aspire.dev— becauserelease/13.6(from the source PR milestone13.6) does not exist there.Why
Source PR microsoft/aspire#19310 adds
AspireCliInvocationMode=Dnxsupport for AppHosts started viadotnet run, allowing DNX to honor an in-scope .NET local tool manifest (.config/dotnet-tools.json) that pinsAspire.Cli, instead of only invoking the pinned SDK-paired version. It also renames the previousDnxbehavior toDnxPinnedand updates theASPIRE011diagnostic message accordingly. This is a user-facing MSBuild property behavior change with no prior documentation ofAspireCliInvocationModeon the docs site.What changed
src/frontend/src/content/docs/get-started/aspire-sdk.mdx: Added a new "Running with dotnet run" subsection under "Use the Aspire CLI bundle for orchestration dependencies", documenting theAspireCliInvocationModeproperty and its three supported values (Path,Dnx,DnxPinned), including theASPIRE011error scenario and remediation.This is an update to an existing page (no new pages created).