Skip to content

[docs] Document DotnetProjectResource publish limitation - #1501

Open
aspire-repo-bot[bot] wants to merge 1 commit into
release/13.5from
docs/pr-19190-31843557798-1-6ae6a3c4e7e83239
Open

[docs] Document DotnetProjectResource publish limitation#1501
aspire-repo-bot[bot] wants to merge 1 commit into
release/13.5from
docs/pr-19190-31843557798-1-6ae6a3c4e7e83239

Conversation

@aspire-repo-bot

Copy link
Copy Markdown
Contributor

Documents changes from microsoft/aspire#19190

@karolz-ms

Targeting release/13.5 — the latest release branch on microsoft/aspire.dev — because release/13.6 (from the source PR milestone 13.6) does not exist there.

Why

DotnetProjectResource (added via AddDotnetProject/addDotnetProject) previously failed silently when a user attempted to aspire publish/aspire deploy it. The source PR replaces the silent failure with an actionable DistributedApplicationException and updates the integration README with a new ## Publishing section describing the limitation and the supported alternatives.

What changed

  • src/frontend/src/content/docs/integrations/frameworks/dotnet/dotnet-host.mdx: added a ## Publishing section (mirroring the README addition) explaining that automatic publishing isn't supported for DotnetProjectResource, and listing the alternatives: AddProject<TProject>(...), AddCSharpApp(...)/addCSharpApp(...), PublishAsDockerFile(...)/publishAsDockerFile(...), and ExcludeFromManifest()/excludeFromManifest().

Page updated (no new pages created).

Generated by PR Documentation Check for #19190 · auto · 53.6 AIC · ⌖ 8.88 AIC · ⊞ 19.6K ·

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@aspire-repo-bot

Copy link
Copy Markdown
Contributor Author

Frontend HTML artifact ready

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

VS Code: Open PR #1501 artifacts

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

@IEvangelist
David Pine (IEvangelist) marked this pull request as ready for review August 14, 2026 22:10
Copilot AI lite review requested due to automatic review settings August 14, 2026 22:10
@IEvangelist
David Pine (IEvangelist) removed the request for review from Copilot August 14, 2026 22:10

@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 — PR #1501

Phase A source of truth: microsoft/aspire @ release/13.5 — SHA 8ab6999850d96e0023670799edbd4bdc245ad63c (the branch this PR targets).
Claims extracted: 6 non-narrative — ✅ 5 verified, ❌ 1 contradicted, 0 unverifiable.
Phase B (doc-tester): 1 route exercised (/integrations/frameworks/dotnet/dotnet-host/) on a local pnpm dev server serving PR head 60d2a040 critical, 0 warnings, page renders cleanly.

⚠️ Verdict: Request changes. The core behavioral claim describes microsoft/aspire#19190, which merged to main (milestone 13.6), not to release/13.5 — the branch this docs PR targets. On release/13.5 that behavior does not exist, so the rendered 13.5 page tells readers something the 13.5 product does not do. Details in the inline comment.


Phase A — Claim verification

The one blocking claim is filed as an inline comment on the affected lines. Evidence for the rest:

✅ Verified claims (5) — click to audit
# Claim Verdict Evidence (microsoft/aspire @ release/13.5, SHA 8ab6999)
1 DotnetProjectResource exists, added via AddDotnetProject / addDotnetProject ✅ verified src/Aspire.Hosting.Dotnet/DotnetProjectResource.cs:23; src/Aspire.Hosting.Dotnet/DotnetProjectHostingExtensions.cs:47 (public AddDotnetProject) and :60 ([AspireExport("addDotnetProject")])
2 AddProject<TProject>(...) — for a project referenced by a C# AppHost ✅ verified src/Aspire.Hosting/ProjectResourceBuilderExtensions.cs:67 (AddProject<TProject> where TProject : IProjectMetadata, new())
3 AddCSharpApp(...) / addCSharpApp(...) ✅ verified src/Aspire.Hosting/ProjectResourceBuilderExtensions.cs:351 (public AddCSharpApp); export [AspireExport("addCSharpApp")] at :364
4 PublishAsDockerFile(...) / publishAsDockerFile(...) ✅ verified src/Aspire.Hosting/ExecutableResourceBuilderExtensions.cs:79 (PublishAsDockerFile<T> where T : ExecutableResource); export at src/Aspire.Hosting/ProjectResourceBuilderExtensions.cs:965 (MethodName = "publishAsDockerFile")
5 ExcludeFromManifest() / excludeFromManifest() ✅ verified src/Aspire.Hosting/api/Aspire.Hosting.cs:1065 (public API surface, ExcludeFromManifest<T>); excludeFromManifest export in src/Aspire.Hosting/api/Aspire.Hosting.Capabilities.txt:295

All four suggested alternatives are real public APIs on release/13.5, and both PublishAsDockerFile and ExcludeFromManifest are applicable to a DotnetProjectResource because it derives from ExecutableResource.


Phase B — Doc-tester results (rendered site only; source not consulted)

Focus area: the new ## Publishing section on the .NET / C# AppHost integration page.
Served: local Astro pnpm dev at http://localhost:4321/, PR head 60d2a04393e670705ea910e881063f8c71519f75.
Route exercised: /integrations/frameworks/dotnet/dotnet-host/ (+ #publishing anchor).

Category Passed Failed Warnings
Content rendering 1 0 0
Page structure / TOC 1 0 0
Links 1 0 0
Console health 1 0 0

Critical issues: None. The page returns 200 (title "Set up .NET / C# apps in the AppHost | Aspire") with 0 console errors/warnings. The new Publishing section renders in full — the H2 heading, a #publishing TOC entry correctly placed between "Configure options" and "See also", the body paragraph, and the four-item alternatives list, all with correct inline-code formatting.

Warnings: None blocking.

Passed checks:

  • Section content matches the PR source; no truncation or MDX render failure.
  • No broken links introduced; the "See also" section and surrounding content stay intact.
  • No layout or structure regressions from the insertion.

Recommendations (non-blocking):

  1. The alternative APIs (AddProject<TProject>, AddCSharpApp, PublishAsDockerFile, ExcludeFromManifest) are inline code with no links to their reference docs — consider linking them so a reader can act on each option. (Consistent with the rest of the page's style, so optional.)
  2. executable.v0 and "machine-local paths" are unexplained jargon for a newcomer, though acceptable on an advanced publishing topic.

Knowledge gap: As a blind user I cannot confirm whether aspire publish / aspire deploy actually fails as described — that requires running the CLI or reading source, which is out of scope for this phase. Phase A evaluated that claim against source and flagged it (see the inline comment).


Automated doc-pr-reviewer run · Phase A read microsoft/aspire @ release/13.5 (8ab6999) · Phase B served PR head 60d2a04 via local pnpm dev.

Comment on lines +190 to +192
Automatic project publishing for `DotnetProjectResource` isn't currently supported. A plain
`DotnetProjectResource` causes `aspire publish` and `aspire deploy` to fail with an actionable error
instead of emitting an `executable.v0` manifest containing machine-local paths.

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.

❌ Contradicted on the source-of-truth branch (microsoft/aspire @ release/13.5, SHA 8ab6999).

A plain DotnetProjectResource causes aspire publish and aspire deploy to fail with an actionable error instead of emitting an executable.v0 manifest containing machine-local paths.

This "fail with an actionable error" behavior was introduced by microsoft/aspire#19190 — but that PR merged to main with milestone 13.6 (merge commit 065001e147cdea1d0b4bcd78afc1deec9f7507c5) and is not present in release/13.5, the branch this docs PR targets. On release/13.5 the opposite is true — publishing a DotnetProjectResource does not throw:

  • The entire Aspire.Hosting.Dotnet project has no publish/deploy/manifest guard: the only DistributedApplicationException thrown by DotnetProjectHostingExtensions.cs is for an invalid project path (:213), not for publishing.
  • DotnetProjectResource is an ExecutableResource (src/Aspire.Hosting.Dotnet/DotnetProjectResource.cs:23), and executable resources are still serialized as type: "executable.v0" by src/Aspire.Hosting/Publishing/ManifestPublishingContext.cs:256 — i.e. exactly the executable.v0-with-machine-local-paths output the doc claims was replaced.
  • tests/Aspire.Hosting.Dotnet.Tests/DotnetProjectResourceTests.cs:267 (AddDotnetProject_..._InPublishMode) exercises the resource under DistributedApplicationOperation.Publish and expects no exception.

Because this renders on the release/13.5 docs site, a 13.5 reader is told publishing throws an actionable error, when in 13.5 it still emits the executable.v0 manifest. Please target this at a 13.6 docs branch/SHA once one exists, or qualify the section so 13.6-only behavior isn't described as current on 13.5.

(The four suggested alternatives themselves are all valid on release/13.5; this comment is only about the publish-failure behavior.)

Choose a reason for hiding this comment

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

PR to add this error to 13.5 is in review/waiting for approval microsoft/aspire#19399

- Use `AddProject<TProject>(...)` for a project referenced by a C# AppHost.
- Use `AddCSharpApp(...)` / `addCSharpApp(...)` for a path-based project or file-based app that
should use standard .NET project publishing.
- Call `PublishAsDockerFile(...)` / `publishAsDockerFile(...)` to configure container publishing

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.

Could we mention that this requires an existing Dockerfile in the project directory? PublishAsDockerFile() configures a Dockerfile build; without one this alternative just moves the user to another publish failure.

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