Skip to content

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

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

[docs] Clarify C# file-based AppHost launch profile location#1176
aspire-repo-bot[bot] wants to merge 1 commit into
release/13.4from
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
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.

0 participants