Repository navigation
[docs] Document DotnetProjectOptions for polyglot addDotnetProject - #1695
David Pine (IEvangelist) merged 1 commit into
Conversation
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]>
Frontend HTML artifact readyThe latest frontend build uploaded the This comment updates automatically when a new frontend build artifact is uploaded. |
There was a problem hiding this comment.
Copilot review overview
🔵 Needs a closer look
A selector-ordering nit remains, and browser-based documentation validation was unavailable.
Review effort: Lite
Findings: 1
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.
| <Tabs syncKey='aspire-lang'> | ||
| <TabItem id='csharp' label='C#'> |
David Pine (IEvangelist)
left a comment
There was a problem hiding this comment.
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)configuresLaunchProfileName/ExcludeLaunchProfile/ExcludeKestrelEndpoints(C# tab): verified.DotnetProjectHostingExtensions.cs—public static IResourceBuilder<DotnetProjectResource> AddDotnetProject(this IDistributedApplicationBuilder builder, string name, string path, Action<ProjectResourceOptions> configure);ProjectResourceOptionsexposes 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 }andaddDotnetProject(name: string, path: string, options?: DotnetProjectOptions): DotnetProjectResourcePromise. - C3 — Omitting the options object, or leaving
launchProfileNameunset/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 whenoptions is null. - C4 —
excludeLaunchProfile: truedisables launch profiles entirely and takes precedence over a suppliedlaunchProfileName(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: truestops 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
ProjectResourceOptionsproperties (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
ProjectResourceOptionshandle used by the legacyaddProject/addCSharpAppexports, which is left unchanged (dotnet-host.mdx:240): verified.DotnetProjectOptionsis an[AspireDto] internal sealed classwith the comment "Keep the shared ProjectResourceOptions handle unchanged for legacy project APIs." In the generated SDK,ProjectResourceOptionsis aMarshalledHandlewhose members are asyncget/set(RPC), whereasDotnetProjectOptionsis 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
ExecutableResourcevalidation paragraph is immediately followed by the## Publishingheading, 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
addDotnetProjectoptions behavior can't be exercised from the docs site. Phase A confirmed it from source (the generatedDotnetProjectOptionsDTO, theApplyProjectResourceOptionsmapping, 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.
5212066
into
release/13.6

Documents changes from microsoft/aspire#20157
@karolz-msTarget:
release/13.6, based on the source PR milestone13.6(exact match onmicrosoft/aspire.dev).Why
PR microsoft/aspire#20157 adds a polyglot-friendly
DotnetProjectOptionsDTO for the Project v2addDotnetProjectAPI. Previously, the TypeScript/polyglotaddDotnetProjectoverload accepted the sharedProjectResourceOptionsRPC 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 toaddDotnetProject.The
Aspire.Hosting.Dotnet/README.mdwas updated in the source PR (triggering theintegration_readme_changedsignal), but the docs site'sdotnet-host.mdxreference page — which documentsaddDotnetProjectoptions for both C# and TypeScript — did not previously mentionexcludeLaunchProfileorexcludeKestrelEndpoints, or the fact that this options object is specific toaddDotnetProjectand distinct from the sharedProjectResourceOptionshandle.What changed
Updated
src/frontend/src/content/docs/integrations/frameworks/dotnet/dotnet-host.mdx:excludeLaunchProfileandexcludeKestrelEndpointsalongsidelaunchProfileName.addDotnetProjectAPI and don't change the sharedProjectResourceOptionshandle used byaddProject/addCSharpApp.Files modified
src/frontend/src/content/docs/integrations/frameworks/dotnet/dotnet-host.mdx(existing page updated, no new pages created)