Repository navigation
[docs] Document default hosting packages for aspire init - #2052
David Pine (IEvangelist) merged 4 commits into
Conversation
Frontend HTML artifact readyThe latest frontend build uploaded the This comment updates automatically when a new frontend build artifact is uploaded. |
Alistair Matthews (alistairmatthews)
left a comment
There was a problem hiding this comment.
Copilot Please consider my two suggestions.
Co-authored-by: alistairmatthews <[email protected]>
Updated both suggestions in commit |
Alistair Matthews (alistairmatthews)
left a comment
There was a problem hiding this comment.
This seems accurate. Approved.
There was a problem hiding this comment.
🟡 Changes recommended
The documentation inaccurately describes default package version selection and fails to distinguish package declarations for file-based and project-based C# AppHosts.
2 open issues
What changed in this PR
This documentation-only PR updates the aspire init CLI reference for the default hosting-package behavior introduced in microsoft/aspire#21191, targeting Aspire 17.0.
Changes:
- Adds a language-to-package table for non-C# AppHosts.
- Describes package configuration, restoration, and existing-entry preservation.
- Notes C# package declarations and shared defaults with
aspire new.
| File | Description |
|---|---|
src/frontend/src/content/docs/reference/cli/commands/aspire-init.mdx |
Adds the “Default hosting packages” section to the CLI reference. |
Review effort: Balanced
David Pine (IEvangelist)
left a comment
There was a problem hiding this comment.
[partial — phase A: 10 of 10 non-narrative claims evaluated; phase B: scoped browser validation, product-runtime validation incomplete]
Inspected head: 671293d2e1641bd495e181d339f5b09e9f30d330; target release/17.0 at 3fef3925f48706bf12c91f716b82144ba512380a. This is a partial COMMENT, not approval. The installed Aspire CLI is 13.4.0, not a matching runtime for the reviewed release/17.0 behavior. No old-CLI run, static inference, unrelated starter template, or author-reported artifact was credited as exact runtime validation. The incomplete-run exception determines COMMENT; it does not negate the source discrepancies below.
Owning source: microsoft/aspire, matching release/17.0, pinned 55867ce9d33c8800e6c7278f7edc5e88e0f6b839. No fallback to main. Trusted reviewer/tester/browser policies: default-branch commit 555f41baf524ae4974a4d9f5668dc180d6e476c4. The native exact-URL skill invocation was unavailable, so the trusted frozen repository-file workflow was followed.
Claims: 11 extracted: 1 verified, 5 verified-with-nuance, 4 contradicted, 0 unverifiable, and 1 future-intent/narrative item excluded from current-behavior verification. All one-file diff content was read. Independent browser outcome: one affected page/section, 6 passed checks, 0 demonstrated critical issues, 3 warnings, and 2 knowledge gaps. The report is preserved in full below; it does not establish package insertion, restore, generated APIs, or initialization runtime success.
Phase A — Claim verification
Synchronize the implementation with the documented branch before publishing the new defaults. At this source pin, ScaffoldingService only pre-adds Aspire.Hosting.JavaScript for TypeScript when an existing root package.json is present. It does not generally insert the Python or Go hosting package, or the TypeScript package in an empty directory, before SDK generation. This is a discrepancy against the matching source branch, not an observed CLI execution failure and not a claim about all other builds. The source PR's merge to main does not prove availability on release/17.0.
Evidence: scaffolding package selection and preparation, brownfield-only TypeScript guard, and final config save. The actual Python scaffold, Go scaffold, and TypeScript scaffold do not emit a compensating hosting-package config. Starter templates were not substituted for init.
The four contradicted claims A1/A5/A6/A7 have individual inline comments on the inspected diff. They describe the general automatic-insertion assertion and its TypeScript/Python/Go rows, respectively.
Verified and nuanced claims, with source evidence
- **A2 — verified-with-nuance**, line 49: The packages are restored and code generated together with the language support packagesrc/Aspire.Cli/Scaffolding/ScaffoldingService.cs:124-140 builds one integration list from config and the language package and passes it to PrepareAsync; :222-228 calls GenerateCodeViaRpcAsync. This confirms the pipeline for integrations actually present, not the general default insertion claimed in A1. No restore/code-generation runtime was executed.
-
A3 — verified-with-nuance, line 49: they use the same version as the Aspire CLI
src/Aspire.Cli/Scaffolding/ScaffoldingService.cs:89-91 defaults sdkVersion to IdentitySdkVersion; :521 inserts the existing brownfield TypeScript default using config.GetEffectiveSdkVersion(defaultSdkVersion). src/Aspire.Cli/Configuration/AspireConfigFile.cs:317-319 prefers an existing configured sdk.version. :375-378 likewise resolves empty package versions to effective SDK version. Therefore CLI identity is the fallback, not an unconditional equality when configuration overrides exist.
-
A4 — verified, line 49: An entry that already exists in
aspire.config.jsonis kept.src/Aspire.Cli/Scaffolding/ScaffoldingService.cs:92 loads existing configuration; :514-518 returns before insertion when the JavaScript hosting key already exists; :258-262 saves other fields without replacing Packages. The guest scaffold dictionaries do not emit another aspire.config.json. This verifies preservation in the implementation present on this branch, not missing default registration.
-
A8 — verified-with-nuance, line 56: None because
Aspire.Hosting.JavaandAspire.Hosting.Rustare in preview.src/Aspire.Hosting.Java/Aspire.Hosting.Java.csproj:8 and src/Aspire.Hosting.Rust/Aspire.Hosting.Rust.csproj:8 set SuppressFinalPackageVersion=true. ScaffoldingService.cs:508-522 does not register either integration. However this pin has no general default-package mapping or preview-aware auto-registration policy; package stability alone cannot establish future insertion behavior. No public-feed release status was inferred.
-
A10 — verified-with-nuance, line 58: C# AppHosts reference their packages with
#:packagedirectives instead.src/Aspire.Cli/Commands/InitCommand.cs:129-148 distinguishes C# file-based and solution/project-based paths. src/Aspire.Cli/Templating/Templates/empty-apphost/apphost.cs:1-6 contains SDK/property directives and no initial package directive. A file-based app can use package directives, but solution/project-based AppHosts use project package references; the page itself documents that other C# path. Scope this sentence to file-based C# rather than implying every C# AppHost or that the empty skeleton already contains hosting directives.
-
A11 — verified-with-nuance, line 58: An empty AppHost created with
aspire newgets the same defaults.src/Aspire.Cli/Templating/CliTemplateFactory.EmptyTemplate.cs:85-95 and InitCommand.cs:528-529 both call ScaffoldingService.ScaffoldAsync for guest languages. Shared scaffolding is verified, but a new empty directory lacks root package.json and therefore does not meet the only hosting pre-add guard at ScaffoldingService.cs:514-518. Sharing the pipeline does not establish the newly documented defaults at this branch pin. Explicit new version/channel inputs can also differ.
Additional audit links: effective SDK version and configured references; shared empty guest scaffold; Java preview packaging flag; Rust preview packaging flag; C# empty skeleton.
A9, narrative: "When these packages ship stable versions, aspire init will list them." Future intent is not a verified current implementation or a separate speculative future-version finding.
Runtime and safety limits
The exact PR head was served with root bun run dev in this automation's isolated checkout. Existing Astro 7.4.1 dependencies were reused; installed pnpm 10.25.0 differs from the declared 11.9.0, and automatic package-manager installation was disabled. Browser rendering is not a lockfile-exact production/CI or product runtime check. No full build or package install was run.
No aspire init, aspire new, AppHost, container, cloud, migration, certificate-trust or global-agent command was executed. In particular, C# init can call certificate trust; no shared trust store was changed. A safe matching product runtime was not established in this run. Initialization output, preserved-version behavior, resource API usability and aspire new equivalence remain runtime-unverified. These gaps prohibit approval, even aside from the branch discrepancies and wording nuances.
Phase B — Complete independent source-blind doc-tester report
Documentation Test Report
Focus area: Independent, source-blind Phase B for PR #2052; only the new Default hosting packages section in src/frontend/src/content/docs/reference/cli/commands/aspire-init.mdx.
Date: 2026-11-05
Tester: doc-tester, using the supplied trusted doc-tester and playwright-cli policies frozen from main 555f41baf524ae4974a4d9f5668dc180d6e476c4.
Requested inspected SHA: 671293d2e1641bd495e181d339f5b09e9f30d330
Target: release/17.0
Disposition: Browser/document teaching checks completed; product-runtime validation blocked. This is not a full accuracy approval.
Summary
| Category | Passed | Failed | Warnings |
|---|---|---|---|
| Rendering and responsive table | 3 | 0 | 0 |
| Section navigation | 1 | 0 | 1 |
| Text selection/readability | 1 | 0 | 0 |
| Teaching/content clarity | 1 | 0 | 2 |
| Product CLI/package behavior | 0 | 0 | 0 |
| Total | 6 | 0 | 3 |
Critical issues: 0 demonstrated. Knowledge gaps: 2 described below. Runtime checks are unverified, not passes or demonstrated failures.
Independence, provenance, and limits
- Read only the two supplied trusted policy files and this tester's browser-generated artifacts. No repository/product implementation, tests, PR body/diff/comments, Phase A results, or GitHub reports were read.
- All site observations used the installed
playwright-cli, named sessionpr2052-doc-test, Edge, in-memory profile. No MCP browser, direct Playwright invocation outside the CLI, HTTP client, or source inspection was used. - Used the parent's already-running
http://localhost:4321/server. First navigation returnedERR_CONNECTION_REFUSED; one bounded 45-second wait followed by navigation succeeded. No server was started, restarted, or stopped. - Checkout identity is parent-supplied, not independently verified by this source-blind tester. The browser footer displayed
SHA 73158d1; that stamp alone does not establish checkout identity, and no explanation for its value was assumed. - Only the affected section was assessed. Adjacent AppHost detection, language options, and TypeScript/Go examples were read solely to understand how a reader could exercise the new defaults. Unchanged sections/old links and the wider website were not audited.
- Existing local Aspire CLI
13.4.0+3f0998a95833d5fef96b3159d56b667889b71166is not an established matchedrelease/17.0runtime. That is a supplied capability constraint, not a fresh version verification. No product CLI examples were executed. - No installation, global configuration change, certificate operation, AppHost creation, container/cloud operation, build, source change, or delegation occurred.
Exact routes exercised
http://localhost:4321/reference/cli/commands/aspire-init/#default-hosting-packageshttp://localhost:4321/reference/cli/commands/aspire-init/, followed by On this page → Default hosting packages, returning to route 1.
Critical Issues
None established from the permitted evidence. Package availability, generated configuration, version resolution, and runtime behavior remain unverified.
Warnings
W1 — Language column does not explain how to exercise every row
Location: Main affected route, Default hosting packages.
Type/severity: Teaching clarity / Medium.
What the documentation says:
“For non-C# AppHosts, aspire init records the hosting package for your language…”
The table includes Python, plus Java, Rust. The page's necessary command-selection context instead describes --language as:
“The AppHost language to scaffold (csharp, typescript, go).”
Reproduction: Read the new paragraph and table, then use the same page's language options/examples to determine how to request the Python row.
Actual: TypeScript and Go have literal commands on the page, but the inspected context supplies no Python selection command or explanation of whether this table's “Language” means AppHost language, workload language, or another selection mechanism. The same ambiguity affects interpreting Java/Rust. No undocumented language value was invented or executed.
Expected: A reader can map each table row to a supported selection/prerequisite, or understands why a workload language appears in a table introduced as non-C# AppHosts.
Recommendation: Clarify the table's language axis and link or show the documented selection mechanism for rows not covered by the page's AppHost-language choices. Do not infer the correct mechanism from this report.
Evidence: desktop-section-evidence.txt, selection-copy-evidence.txt, and initial browser snapshot .playwright-cli\page-2026-11-05T12-47-08-905Z.yml.
W2 — C# statement is broader than the immediately preceding AppHost distinction
Location: Main affected route, closing paragraph of Default hosting packages.
Type/severity: Teaching clarity / Medium.
What the documentation says:
“C# AppHosts reference their packages with #:package directives instead.”
Reproduction: Read the preceding AppHost detection context, including its note that a solution produces a project-based AppHost, then read the new closing paragraph.
Actual: The preceding context identifies both file-based and project-based C# AppHosts, but the new categorical sentence does not distinguish them. Its scope is unclear for the reader who has just learned the solution-based path.
Expected: The paragraph clearly states which C# AppHost form its package-reference guidance concerns.
Recommendation: Qualify the statement for the applicable C# form and explain/link the other form if relevant. This is an observed documentation-scope ambiguity, not a source-verified claim about project file behavior.
Evidence: Initial snapshot .playwright-cli\page-2026-11-05T12-47-08-905Z.yml; desktop-section-evidence.txt.
W3 — TOC navigation partially hides this section's heading
Location: Main affected route after page-contents navigation.
Type/severity: Readability/navigation / Low.
Reproduction: At 1440 × 1100, open the base page, expand On this page, click Default hosting packages, and let scrolling settle.
Actual: The hash is correct and section content is reachable, but the heading starts at y=88.42 with height 40 while the sticky page-contents bar occupies y=63 through y=112. The screenshot shows the upper part of the heading covered.
Expected: The entire section heading is visible after navigation.
Recommendation: Check the heading scroll offset against the sticky bar. This may be shared layout behavior; no attribution to this PR or unrelated-heading audit is made.
Evidence: anchor-settled-evidence.txt, desktop-anchor-settled.png.
Passed Checks
- Affected page/section renders: Correct page title, H3 heading, paragraphs, and table appeared after the bounded startup wait. No rendered MDX error replaced the section.
- All table rows render with semantic structure: Two column headers and four body rows, each with two cells:
- TypeScript →
Aspire.Hosting.JavaScript - Python →
Aspire.Hosting.Python - Go →
Aspire.Hosting.Go - Java, Rust → explicit “None” explanation naming both preview packages and the future stable-version condition.
This validates rendering, not the truth of the package/default claims.
- TypeScript →
- Narrow layout retains readable content: At 390 × 844, document width remained 390; table width was 358. Package identifiers and preview explanation were present/readable, with table-local overflow rather than page-wide overflow. All rows remain available by scrolling. Desktop table content was readable as well.
- Discoverability/target exists: Page-contents menu includes the exact new heading; clicking it produces the expected hash and reaches the section. The heading also has its own section permalink. Heading occlusion is separately reported as W3.
- Text is selectable without corruption: Browser text selection returned the full paragraph, all package identifiers, every table row, and closing paragraph. The section has no executable code block requiring its own copy button. This was selection/copy-readability testing, not an OS-clipboard round-trip or execution.
- Core stated expectations are findable: The paragraph explicitly tells readers they need not run
aspire addfirst, packages use the CLI version, generation/restoration accompanies language support, and an existing configuration entry is kept. The Java/Rust row explicitly distinguishes preview from stable defaults. These statements are clear as written but not runtime-validated.
Knowledge Gaps and Prerequisites
K1 — Selecting Python/Java/Rust defaults
What I needed to know: Which documented input or repository prerequisite causes these rows to apply, given the page's C#/TypeScript/Go AppHost choices.
Knowledge source: The rendered page exposes the gap; no prior/product-source knowledge was used to fill it.
Impact: A Python reader cannot derive a literal supported command from this section and the relevant same-page options.
Recommendation: Address W1 with a selection example or prerequisite link.
K2 — Inspecting generated entries and exercising a resource API
What I needed to know: The exact expected configuration entry shape/location and a minimal resource-API use that demonstrates “without running aspire add first.”
Knowledge source: The section names aspire.config.json, but contains no configuration example, resource-API example, or links within its prose/table. No entry keys or API names were guessed.
Impact: Readers can understand the promise, but this section alone does not teach a concrete success check or first API use.
Recommendation: For a compact reference, link an appropriate prerequisite/example rather than adding a full tutorial. Show a small expected configuration fragment if useful.
Runtime Verification Not Executed
The following are literal commands or claims visible in the rendered page, recorded for an appropriately matched and authorized runtime. None was executed, and no generated output was inspected.
| Documented step/claim | Coverage limit |
|---|---|
aspire init |
No interactive selection, scaffolding, or default restoration tested. |
aspire init --language typescript |
No verification of Aspire.Hosting.JavaScript, generated APIs, or resulting configuration. |
aspire init --language go |
No verification of Aspire.Hosting.Go, generated APIs, or resulting configuration. |
| Python row | Both matched runtime and documented selection mechanism unavailable to this test. |
| Java/Rust preview exclusions/future stable behavior | No package-resolution or future-state verification. |
| Same package version as Aspire CLI | No resolved package versions checked. |
Existing aspire.config.json entry is kept |
No seeded-configuration preservation test. |
| “An empty AppHost created with aspire new gets the same defaults” | No complete empty-template command supplied by this section; no template creation attempted. |
| C# package-reference statement | No C# AppHost creation or generated directive/project inspection. |
No product failure should be inferred from these omissions, and CLI 13.4 success would not establish release/17.0 correctness.
Recommendations
- Clarify the language-selection and C# scope ambiguities (W1/W2).
- Add a focused prerequisite/example link or expected configuration fragment for exercising the new defaults (K1/K2).
- Check section anchor offset against the sticky page-contents bar (W3).
- Have an authorized follow-up validate default insertion, restoration/generation, version alignment, existing-entry preservation, preview exclusions, and empty-template parity using an established matched release/17.0 runtime. No product bug was demonstrated here.
Evidence and Cleanup
All relative evidence paths above are under:
C:\Users\dapine\.copilot\session-state\b1028536-a0cc-461b-98cb-21c8f8fc8a89\files\pr-2052-browser\
Additional artifacts: desktop-navigation.yml, toc-expanded.yml, desktop-section.png, mobile-layout-evidence.txt, mobile-section-settled.png. Automatically generated snapshots/console files remain browser artifacts; console counts were not treated as package-behavior evidence or investigated as unrelated site issues.
Browser cleanup: playwright-cli -s=pr2052-doc-test close succeeded with Browser 'pr2052-doc-test' closed; persisted in browser-cleanup.txt. No other browser session was closed. Parent retains responsibility for server/checkout cleanup and submission. No GitHub submission was made.
|
|
||
| ### Default hosting packages | ||
|
|
||
| For non-C# AppHosts, `aspire init` records the hosting package for your language in the AppHost `aspire.config.json`, so you can use its resource APIs without running `aspire add` first. The packages are restored and code generated together with the language support package, and they use the same version as the Aspire CLI. An entry that already exists in `aspire.config.json` is kept. |
There was a problem hiding this comment.
A1: contradicted on the matching source branch
For non-C# AppHosts,
aspire initrecords the hosting package for your language in the AppHostaspire.config.json, so you can use its resource APIs without runningaspire addfirst.
At the matching release/17.0 pin, src/Aspire.Cli/Scaffolding/ScaffoldingService.cs:117 invokes only PreAddJavaScriptHostingForBrownfieldTypeScript. Its guards at :508-522 restrict pre-addition to TypeScript with an existing root package.json. :124-140 prepares only existing config integrations plus the language code-generation package; :258-262 saves profiles/path/language, not missing language integrations. GoLanguageSupport.cs:31 onward and PythonLanguageSupport.cs:64 onward scaffold app and runtime files, not hosting-package config. This is branch-integration evidence, not an observed runtime failure.
Pinned owning source: microsoft/aspire release/17.0@55867ce9d33c8800e6c7278f7edc5e88e0f6b839. Scaffolding pipeline; only pre-addition and guards.
Land/backport the general guest-language default registration to the matching release branch, or explicitly scope this guidance to the version/ref that implements it.
This is part of the one explicitly partial combined review, not independent runtime proof.
|
|
||
| | Language | Default hosting packages | | ||
| | -------- | ------------------------ | | ||
| | TypeScript | `Aspire.Hosting.JavaScript` | |
There was a problem hiding this comment.
A5: contradicted on the matching source branch
| TypeScript |
Aspire.Hosting.JavaScript|
src/Aspire.Cli/Scaffolding/ScaffoldingService.cs:514-518 returns when there is no existing root package.json; :521 adds Aspire.Hosting.JavaScript only after that guard. src/Aspire.Hosting.CodeGeneration.TypeScript/TypeScriptLanguageSupport.cs:63-118 emits AppHost/package/runtime files, not a compensating default-package config. The unrestricted table row exceeds the matching branch's brownfield-only behavior.
Pinned owning source: microsoft/aspire release/17.0@55867ce9d33c8800e6c7278f7edc5e88e0f6b839. Scaffolding pipeline; only pre-addition and guards.
Qualify the existing-root-package.json case for this source pin or synchronize the general default-registration implementation.
This is part of the one explicitly partial combined review, not independent runtime proof.
| | Language | Default hosting packages | | ||
| | -------- | ------------------------ | | ||
| | TypeScript | `Aspire.Hosting.JavaScript` | | ||
| | Python | `Aspire.Hosting.Python` | |
There was a problem hiding this comment.
A6: contradicted on the matching source branch
| Python |
Aspire.Hosting.Python|
src/Aspire.Cli/Scaffolding/ScaffoldingService.cs:117,508-522 pre-adds only brownfield TypeScript. :124-140 includes only configured integrations and the code-generation package, and :258-262 saves no Python hosting default. src/Aspire.Hosting.CodeGeneration.Python/PythonLanguageSupport.cs:64 onward emits Python app, dependency and runtime files, not a hosting-integration config. The py-starter template is a different template and was not substituted as init proof.
Pinned owning source: microsoft/aspire release/17.0@55867ce9d33c8800e6c7278f7edc5e88e0f6b839. Scaffolding pipeline; only pre-addition and guards.
Synchronize Python default insertion to release/17.0 or scope the table to the implementing release.
This is part of the one explicitly partial combined review, not independent runtime proof.
| | -------- | ------------------------ | | ||
| | TypeScript | `Aspire.Hosting.JavaScript` | | ||
| | Python | `Aspire.Hosting.Python` | | ||
| | Go | `Aspire.Hosting.Go` | |
There was a problem hiding this comment.
A7: contradicted on the matching source branch
| Go |
Aspire.Hosting.Go|
src/Aspire.Cli/Scaffolding/ScaffoldingService.cs:117,508-522 pre-adds only brownfield TypeScript. :124-140 includes configured integrations plus the code-generation package and :258-262 saves no Go hosting default. src/Aspire.Hosting.CodeGeneration.Go/GoLanguageSupport.cs:31 onward emits AppHost/go.mod/runtime files, not hosting-integration config. The go-starter template was not substituted as init proof.
Pinned owning source: microsoft/aspire release/17.0@55867ce9d33c8800e6c7278f7edc5e88e0f6b839. Scaffolding pipeline; only pre-addition and guards.
Synchronize Go default insertion to release/17.0 or scope the table to the implementing release.
This is part of the one explicitly partial combined review, not independent runtime proof.
Clarified the versioning behavior of hosting packages in aspire.config.json. Co-authored-by: Copilot Autofix powered by AI <[email protected]>

Documents changes from microsoft/aspire#21191
Author: @(PR author; see source PR)
Target branch: Targeting
release/17.0based on the source PR milestone17.0(exact_match).Why
aspire init --language <lang>now records default hosting packages (e.g.Aspire.Hosting.JavaScriptfor TypeScript,Aspire.Hosting.Python,Aspire.Hosting.Go) in the AppHostaspire.config.json. The triggered signal waspr_body_has_cli_flag_mention. The reference page didn't describe this.Changes
Updated (no new pages):
src/frontend/src/content/docs/reference/cli/commands/aspire-init.mdx: added a "Default hosting packages" section with a language-to-package table.