Skip to content

[docs] Clarify C# file-based AppHost launch profile location#1176

Open
aspire-repo-bot[bot] wants to merge 1 commit into
release/13.5from
docs/fix-csharp-apphost-launch-profiles-13-4-dab620b92c8ecde3
Open

[docs] Clarify C# file-based AppHost launch profile location#1176
aspire-repo-bot[bot] wants to merge 1 commit into
release/13.5from
docs/fix-csharp-apphost-launch-profiles-13-4-dab620b92c8ecde3

Conversation

@aspire-repo-bot
Copy link
Copy Markdown
Contributor

Documents changes from microsoft/aspire#17781 by @mitchdenny.

Targeting release/13.4 — the latest release branch on microsoft/aspire.dev — because release/13.5 (from the source PR milestone 13.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 duplicate profiles block in aspire.config.json. Launch profiles for the file-based C# AppHost belong exclusively in apphost.run.json; aspire.config.json should only contain {"appHost": {"path": "apphost.cs"}}.

The existing app-host/configuration.mdx page stated "In C# AppHosts, profiles live in launchSettings.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.mdx to:

  • Distinguish between the two C# AppHost forms:
    • Project-based (dotnet new aspire-apphost): profiles in Properties/launchSettings.json
    • File-based (aspire new empty C# template): profiles in apphost.run.json, while aspire.config.json only holds the appHost.path reference
  • Added code examples showing the correct apphost.run.json and aspire.config.json structure for file-based AppHosts
  • Added a note explaining that aspire run, dotnet run apphost.cs, and C# Dev Kit all read apphost.run.json for launch profiles when it is present

Files modified

  • src/frontend/src/content/docs/app-host/configuration.mdx — updated existing page

Generated by PR Documentation Check for issue #17781 · ● 15.1M ·

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>
@aspire-repo-bot aspire-repo-bot Bot added the docs-from-code Copilot initiated issue from dotnet/aspire repo label Jun 2, 2026
@aspire-repo-bot aspire-repo-bot Bot requested a review from JamesNK June 2, 2026 04:06
@IEvangelist IEvangelist changed the base branch from release/13.4 to release/13.5 June 5, 2026 20:36
@IEvangelist IEvangelist marked this pull request as ready for review June 5, 2026 21:46
@IEvangelist IEvangelist self-requested a review as a code owner June 5, 2026 21:46
Copilot AI review requested due to automatic review settings June 5, 2026 21:46
@IEvangelist IEvangelist requested a review from mitchdenny June 5, 2026 21:47
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.json for profiles.
  • Documents that the file-based empty C# template uses apphost.run.json for profiles and shows example apphost.run.json / aspire.config.json.
  • Adds a note describing which tools read apphost.run.json when present.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +29 to +30
- **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.
Comment on lines +81 to +83
`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.
Copy link
Copy Markdown
Member

@IEvangelist IEvangelist left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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:

  1. Re-target this PR to release/13.4 in aspire.dev (matches what the body already says was intended, and what currently exists upstream).
  2. Wait until release/13.5 is cut in microsoft/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.

@IEvangelist
Copy link
Copy Markdown
Member

I can't verify or apply the review feedback yet because this docs PR targets release/13.5, but the microsoft/aspire source-of-truth repository doesn't have a matching release/13.5 branch on upstream.

Per the docs-feedback workflow, I'm stopping here rather than guessing against another branch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs-from-code Copilot initiated issue from dotnet/aspire repo

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants