Skip to content

[docs] Clarify TypeScript AppHost appsettings behavior - #1609

Open
David Pine (IEvangelist) wants to merge 1 commit into
microsoft:release/13.6from
IEvangelist:ievangelist-typescript-apphost-docs-followup
Open

[docs] Clarify TypeScript AppHost appsettings behavior#1609
David Pine (IEvangelist) wants to merge 1 commit into
microsoft:release/13.6from
IEvangelist:ievangelist-typescript-apphost-docs-followup

Conversation

@IEvangelist

Copy link
Copy Markdown
Member

Summary

Follow-up to #1597 that addresses the remaining review feedback for TypeScript AppHost appsettings.json documentation:

  • clarifies that developers add settings files, Aspire loads them, and AppHost code reads the effective values
  • connects the Development and Production override files to the commands that activate them
  • makes environment-source precedence explicit
  • distinguishes inner AppHost configuration from the CLI-managed JSON-RPC server while documenting how AppHost settings can override inherited logging defaults

Third-party links and affiliations

None.

Validation

  • git diff --check
  • Served /app-host/typescript-apphost/ with the existing Astro development server: HTTP 200, all revised content assertions passed, and the browser console reported 0 errors
  • Prettier check reports the same pre-existing formatting failure on both this file and the unchanged upstream/release/13.6 version

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot AI lite review requested due to automatic review settings September 2, 2026 14:07

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

The new aside text can mislead readers into thinking guest appsettings.json can override CLI-managed JSON-RPC server logging defaults, which should be clarified to match actual server configuration separation.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Pull request overview

This PR refines the TypeScript AppHost documentation around appsettings.json by clarifying ownership (developer adds files, Aspire loads them, AppHost reads effective values) and making environment selection/precedence more explicit, including how Development/Production overrides map to CLI usage.

Changes:

  • Refines the introductory description of how appsettings.json is loaded and consumed from apphost.mts.
  • Clarifies how to activate appsettings.{Environment}.json via aspire start --environment ... and documents environment precedence.
  • Expands the note to distinguish inner AppHost configuration from the CLI-managed JSON-RPC server configuration.
File summaries
File Description
src/frontend/src/content/docs/app-host/typescript-apphost.mdx Clarifies TypeScript AppHost appsettings loading, environment overrides, precedence, and separation from the CLI-managed server.
Review details
  • Files reviewed: 1/1 changed files
  • Comments generated: 1
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Aspire looks for `appsettings.json` and `appsettings.{Environment}.json` in the same directory as `apphost.mts`. If more than one mechanism sets the active environment, `--environment` takes precedence over `DOTNET_ENVIRONMENT` and `ASPIRE_ENVIRONMENT`. Environment variables and command-line arguments take precedence over both JSON files, so you can override settings at run time without editing JSON.
Aspire looks for `appsettings.json` and `appsettings.{Environment}.json` in the same directory as `apphost.mts`. If more than one mechanism sets the active environment, Aspire applies this precedence: `--environment`, `DOTNET_ENVIRONMENT`, then `ASPIRE_ENVIRONMENT`. Environment variables and command-line arguments take precedence over both JSON files, so you can override settings at run time without editing JSON.

These files configure the inner AppHost, not the CLI-managed JSON-RPC server. They don't replace the server's private ATS assembly discovery or logging configuration. The inner AppHost separately retains the managed server's logging defaults as fallbacks, which the AppHost configuration can override.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants