Skip to content

[docs] Document DotnetProjectOptions for polyglot addDotnetProject - #1695

Merged
David Pine (IEvangelist) merged 1 commit into
release/13.6from
docs/pr-20157-35274271642-1-de3d0ec0809fbd28
Sep 24, 2026
Merged

David Pine (IEvangelist) merged 1 commit into
release/13.6from
docs/pr-20157-35274271642-1-de3d0ec0809fbd28

Conversation

@aspire-repo-bot

Copy link
Copy Markdown
Contributor

Documents changes from microsoft/aspire#20157

@karolz-ms

Target: release/13.6, based on the source PR milestone 13.6 (exact match on microsoft/aspire.dev).

Why

PR microsoft/aspire#20157 adds a polyglot-friendly DotnetProjectOptions DTO for the Project v2 addDotnetProject API. Previously, the TypeScript/polyglot addDotnetProject overload accepted the shared ProjectResourceOptions RPC handle, which the generated SDK exposes no way to construct — so callers couldn't set a launch profile, exclude launch profiles, or exclude Kestrel endpoint derivation from a polyglot AppHost. The change introduces a plain-data options object specific to addDotnetProject.

The Aspire.Hosting.Dotnet/README.md was updated in the source PR (triggering the integration_readme_changed signal), but the docs site's dotnet-host.mdx reference page — which documents addDotnetProject options for both C# and TypeScript — did not previously mention excludeLaunchProfile or excludeKestrelEndpoints, or the fact that this options object is specific to addDotnetProject and distinct from the shared ProjectResourceOptions handle.

What changed

Updated src/frontend/src/content/docs/integrations/frameworks/dotnet/dotnet-host.mdx:

  • Expanded the Configure options section with a new C#/TypeScript tabbed example showing excludeLaunchProfile and excludeKestrelEndpoints alongside launchProfileName.
  • Added prose explaining the semantics of each option (default profile when omitted, exclusion precedence, Kestrel endpoint derivation behavior) matching the source PR description and README.
  • Clarified that these options are specific to the polyglot addDotnetProject API and don't change the shared ProjectResourceOptions handle used by addProject / addCSharpApp.

Files modified

  • src/frontend/src/content/docs/integrations/frameworks/dotnet/dotnet-host.mdx (existing page updated, no new pages created)

Generated by PR Documentation Check for #20157 · auto · 79.7 AIC · ⌖ 8.2 AIC · ⊞ 18K · ◷

Documents the new DotnetProjectOptions DTO introduced in microsoft/aspire#20157,
which lets polyglot AppHosts pass launchProfileName, excludeLaunchProfile, and
excludeKestrelEndpoints directly to addDotnetProject without needing the
ProjectResourceOptions RPC handle.

Co-authored-by: Copilot <[email protected]>
@aspire-repo-bot aspire-repo-bot Bot added the docs-from-code Copilot initiated issue from dotnet/aspire repo label Sep 17, 2026
@aspire-repo-bot

Copy link
Copy Markdown
Contributor Author

Frontend HTML artifact ready

The latest frontend build uploaded the frontend-dist artifact for PR #1695. Use the VS Code button below to open this PR with GitHub Artifacts Explorer and browse the built HTML locally.

VS Code: Open PR #1695 artifacts

This comment updates automatically when a new frontend build artifact is uploaded.

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.

Copilot review overview

🔵 Needs a closer look

A selector-ordering nit remains, and browser-based documentation validation was unavailable.

Review effort: Lite
Findings: 1 Low severity

Open (1)
What changed in this PR

Documents DotnetProjectOptions for the polyglot addDotnetProject API.

Changes:

  • Adds C# and TypeScript examples for launch-profile and Kestrel options.
  • Explains option behavior and defaults.
  • Clarifies the distinction from ProjectResourceOptions.
File Summary
src/​frontend/​src/​content/​docs/​integrations/​frameworks/​dotnet/​dotnet-host.mdx Documents DotnetProjectOptions and related behavior.

💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment on lines +201 to +202
<Tabs syncKey='aspire-lang'>
<TabItem id='csharp' label='C#'>

@IEvangelist David Pine (IEvangelist) left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Automated docs-accuracy review

Phase A source of truth: microsoft/aspire @ release/13.6 (SHA 63b5556c7f4de9b259d6ba71a312f597a72bf307), source PR microsoft/aspire#20157 (commit f856e00613, "Make Project v2 options polyglot-friendly").
Claims extracted: 7 non-narrative → 7 verified, 0 verified-with-nuance, 0 unverifiable, 0 contradicted.
Phase B (doc-tester): exercised /integrations/frameworks/dotnet/dotnet-host/ — 0 critical, 0 warnings.

Verdict: APPROVE — the polyglot DotnetProjectOptions shape and its documented behavior match the generated SDK and the C# implementation exactly.


Phase A — Claim verification

✅ Verified claims (7) — evidence
  • C1 — C# AddDotnetProject(name, path, options-callback) configures LaunchProfileName / ExcludeLaunchProfile / ExcludeKestrelEndpoints (C# tab): verified. DotnetProjectHostingExtensions.cs — public static IResourceBuilder<DotnetProjectResource> AddDotnetProject(this IDistributedApplicationBuilder builder, string name, string path, Action<ProjectResourceOptions> configure); ProjectResourceOptions exposes those three properties.
  • C2 — TypeScript addDotnetProject(name, path, { launchProfileName, excludeLaunchProfile, excludeKestrelEndpoints }) (TS tab): verified against the generated SDK. export interface DotnetProjectOptions { launchProfileName?: string | null; excludeLaunchProfile?: boolean; excludeKestrelEndpoints?: boolean } and addDotnetProject(name: string, path: string, options?: DotnetProjectOptions): DotnetProjectResourcePromise.
  • C3 — Omitting the options object, or leaving launchProfileName unset/null, selects the default launch profile (dotnet-host.mdx:236): verified. DTO doc: "If omitted or null, the default launch profile is used." The polyglot export uses an empty configuration when options is null.
  • C4 — excludeLaunchProfile: true disables launch profiles entirely and takes precedence over a supplied launchProfileName (dotnet-host.mdx:237): verified. DTO doc "When true, the launch profile name is ignored"; the shared handle doc reinforces "If set, no launch profile will be used, and LaunchProfileName will be ignored."
  • C5 — excludeKestrelEndpoints: true stops Aspire deriving model endpoints from the project's Kestrel config and doesn't rewrite/disable the service's own Kestrel config (dotnet-host.mdx:238): verified. DTO doc "Whether to ignore endpoints from Kestrel configuration"; the handle doc "If set, ignore endpoints coming from Kestrel configuration." It's a read-side ignore — nothing mutates the service's configuration.
  • C6 — These properties have the same behavior as the corresponding ProjectResourceOptions properties (dotnet-host.mdx:240): verified. ApplyProjectResourceOptions(ProjectResourceOptions target, DotnetProjectOptions source) maps 1:1 — target.LaunchProfileName = source.LaunchProfileName, target.ExcludeLaunchProfile = source.ExcludeLaunchProfile, target.ExcludeKestrelEndpoints = source.ExcludeKestrelEndpoints.
  • C7 — The options are a polyglot-specific plain object (no RPC round-trip), distinct from the shared ProjectResourceOptions handle used by the legacy addProject / addCSharpApp exports, which is left unchanged (dotnet-host.mdx:240): verified. DotnetProjectOptions is an [AspireDto] internal sealed class with the comment "Keep the shared ProjectResourceOptions handle unchanged for legacy project APIs." In the generated SDK, ProjectResourceOptions is a MarshalledHandle whose members are async get/set (RPC), whereas DotnetProjectOptions is a plain interface. The upstream test is named …UsesDtoWithoutChangingLegacyOptions.

Phase B — Doc-tester results

Scope: the single doc route touched by this PR. Tested against the live production site (release/13.6 is not yet published, no per-PR preview exists, and frontend deps are not installed in this hourly job).

Critical issues: none.
Warnings: none.

Passed checks:

  • /integrations/frameworks/dotnet/dotnet-host/ loads (200; title "Set up .NET / C# apps in the AppHost").
  • Insertion point is clean: the ExecutableResource validation paragraph is immediately followed by the ## Publishing heading, so the new framing paragraph, the synced C#/TypeScript Tabs, the three behavior bullets, and the closing paragraph land between them.
  • The /app-host/executable-resources/ cross-reference resolves (200).

Knowledge gaps / limitations:

  • PR content isn't deployed, so the new section and its synced Tabs couldn't be rendered as they will appear.
  • The C#/TypeScript addDotnetProject options behavior can't be exercised from the docs site. Phase A confirmed it from source (the generated DotnetProjectOptions DTO, the ApplyProjectResourceOptions mapping, and the DTO-vs-handle distinction).

Automated review. Phase A reads microsoft/aspire source; Phase B validates the rendered docs site as a blind user; only PR-changed content and its routes were in scope.

@IEvangelist
David Pine (IEvangelist) merged commit 5212066 into release/13.6 Sep 24, 2026
11 of 12 checks passed
@IEvangelist
David Pine (IEvangelist) deleted the docs/pr-20157-35274271642-1-de3d0ec0809fbd28 branch September 24, 2026 11:46
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.

3 participants