[docs] Clarify C# file-based AppHost launch profile location#1176
[docs] Clarify C# file-based AppHost launch profile location#1176aspire-repo-bot[bot] wants to merge 1 commit into
Conversation
The empty C# AppHost template (created with `aspire new`) stores launch profiles in `apphost.run.json`, not in `aspire.config.json`. The `aspire.config.json` for this template only contains the `appHost.path` reference pointing at `apphost.cs`. Update the AppHost configuration page to distinguish between: - Project-based AppHosts: profiles in `Properties/launchSettings.json` - File-based AppHosts: profiles in `apphost.run.json`, with `aspire.config.json` holding only the entry-point reference This aligns the documentation with the fix in microsoft/aspire#17781, which corrected a regression where the file-based template was incorrectly emitting a duplicate `profiles` block in `aspire.config.json`. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Updates the AppHost configuration documentation to clarify where launch profiles live for C# AppHosts, especially distinguishing project-based vs file-based layouts, to prevent users from looking in the wrong configuration file.
Changes:
- Clarifies that project-based C# AppHosts use
Properties/launchSettings.jsonfor profiles. - Documents that the file-based empty C# template uses
apphost.run.jsonfor profiles and shows exampleapphost.run.json/aspire.config.json. - Adds a note describing which tools read
apphost.run.jsonwhen present.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| - **Project-based AppHost** (the default `dotnet new aspire-apphost` template): profiles live in `Properties/launchSettings.json`. | ||
| - **File-based AppHost** (created with `aspire new` using the empty C# template): profiles live in `apphost.run.json`. The `aspire.config.json` file in this layout only points at the entry file — it does **not** contain a `profiles` block. |
| `aspire run`, `dotnet run apphost.cs`, and C# Dev Kit all read `apphost.run.json` | ||
| for launch profiles when it is present. The `aspire.config.json` for the file-based | ||
| C# template intentionally omits `profiles` to avoid duplicating that data. |
IEvangelist
left a comment
There was a problem hiding this comment.
Source-of-truth branch mismatch — review skipped
Cannot verify this PR against microsoft/aspire.
PR base branch (microsoft/aspire.dev) |
release/13.5 |
Matching branch in microsoft/aspire |
does not exist |
Latest release branch in microsoft/aspire |
release/13.4 (4f2189335) |
| Source PR cited in body | microsoft/aspire#17781 — merged to main, milestone 13.5 |
My review protocol requires using the matching microsoft/aspire release branch as the single source of truth for claim verification. Because no release/13.5 branch exists on microsoft/aspire yet (13.5 has not been cut), I cannot verify the API/CLI/config claims in this PR against an authoritative source code snapshot for that release.
The PR body itself notes the same issue ("Targeting release/13.4 … because release/13.5 … does not exist there"), even though the actual base ended up being release/13.5 on aspire.dev. Possible resolutions:
- Re-target this PR to
release/13.4inaspire.dev(matches what the body already says was intended, and what currently exists upstream). - Wait until
release/13.5is cut inmicrosoft/aspire, then re-run review against that branch.
Skipping Phase B (doc-tester) as well — running it without the Phase A claim verification would produce an incomplete review per protocol.
|
I can't verify or apply the review feedback yet because this docs PR targets Per the docs-feedback workflow, I'm stopping here rather than guessing against another branch. |
Documents changes from microsoft/aspire#17781 by
@mitchdenny.Targeting
release/13.4— the latest release branch onmicrosoft/aspire.dev— becauserelease/13.5(from the source PR milestone13.5) does not exist there.Why this PR is needed
PR microsoft/aspire#17781 fixed a regression introduced in the 13.4 cycle where the empty C# AppHost template (
aspire new) was incorrectly emitting a duplicateprofilesblock inaspire.config.json. Launch profiles for the file-based C# AppHost belong exclusively inapphost.run.json;aspire.config.jsonshould only contain{"appHost": {"path": "apphost.cs"}}.The existing
app-host/configuration.mdxpage stated "In C# AppHosts, profiles live inlaunchSettings.json" without distinguishing between project-based and file-based AppHosts. This omission could lead users to look for profiles in the wrong file when working with the file-based (single-file) template.Changes
Updated
src/frontend/src/content/docs/app-host/configuration.mdxto:dotnet new aspire-apphost): profiles inProperties/launchSettings.jsonaspire newempty C# template): profiles inapphost.run.json, whileaspire.config.jsononly holds theappHost.pathreferenceapphost.run.jsonandaspire.config.jsonstructure for file-based AppHostsaspire run,dotnet run apphost.cs, and C# Dev Kit all readapphost.run.jsonfor launch profiles when it is presentFiles modified
src/frontend/src/content/docs/app-host/configuration.mdx— updated existing page