diff --git a/src/frontend/src/content/docs/integrations/frameworks/dotnet/dotnet-host.mdx b/src/frontend/src/content/docs/integrations/frameworks/dotnet/dotnet-host.mdx index e08076ff5..4db551f00 100644 --- a/src/frontend/src/content/docs/integrations/frameworks/dotnet/dotnet-host.mdx +++ b/src/frontend/src/content/docs/integrations/frameworks/dotnet/dotnet-host.mdx @@ -185,6 +185,22 @@ await builder.build().run(); The resource is added as an [`ExecutableResource`](/app-host/executable-resources/) rather than a `ProjectResource`, so it doesn't need to be referenced from the AppHost's own solution. Before the resource starts, Aspire validates that the path resolves to a `.csproj` or `.cs` file (or a directory containing a single `.csproj`) and, for file-based apps, that the active .NET SDK version is 10 or later. +## Publishing + +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. + +Use one of these alternatives: + +- Use `AddProject(...)` 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 + explicitly. +- Call `ExcludeFromManifest()` / `excludeFromManifest()` when the resource is intentionally + available only during local orchestration. + ## See also - [.NET documentation](https://learn.microsoft.com/dotnet/)