Repository navigation
Document web app project structure, port, and container log gotchas - #393
Merged
Merged
Conversation
Adds a 'Project structure and Dockerfile' sub-section to the web app hosting section covering: - WebApp.Testing must use Sdk="Microsoft.NET.Sdk.Web" or wwwroot content items are excluded from the publish output (symptom: StaticFileMiddleware warning in container logs) - ReferenceOutputAssembly="false" on the production project reference also suppresses content items - launchSettings.json is ignored in containers; default port is 8080 - Razor views are pre-compiled in Release; .cshtml files absent is expected - DataProtection and libgssapi_krb5 warnings are harmless in test containers Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a "Project structure and Dockerfile" sub-section to the web application hosting section of the getting-started guide, covering the common pitfalls when containerising an ASP.NET Core web app that also hosts NServiceBus:
WebApp.Testingmust useSdk="Microsoft.NET.Sdk.Web"— using the plain console app SDK excludeswwwrootcontent items from the publish output. The symptom isThe WebRootPath was not found: /app/wwwrootin the container logs.ReferenceOutputAssembly="false": must not be set on the reference to the production web app project (it also suppresses content items). This attribute is only correct onWebApp.Tests→WebApp.Testing.launchSettings.jsonis ignored in containers; ASP.NET Core defaults to port 8080 on .NET 8+..cshtmlfiles in the publish output is expected.libgssapi_krb5.so.2are harmless in test containers.Test plan
🤖 Generated with Claude Code