Skip to content

Document web app project structure, port, and container log gotchas - #393

Merged
mauroservienti merged 1 commit into
masterfrom
docs
Mar 5, 2026
Merged

mauroservienti merged 1 commit into
masterfrom
docs

Conversation

@mauroservienti

Copy link
Copy Markdown
Owner

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:

  • SDK: WebApp.Testing must use Sdk="Microsoft.NET.Sdk.Web" — using the plain console app SDK excludes wwwroot content items from the publish output. The symptom is The WebRootPath was not found: /app/wwwroot in 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 on WebApp.Tests → WebApp.Testing.
  • Port: launchSettings.json is ignored in containers; ASP.NET Core defaults to port 8080 on .NET 8+.
  • Views: Razor views are pre-compiled into the assembly in Release builds — the absence of .cshtml files in the publish output is expected.
  • Container log noise: DataProtection keys warning and libgssapi_krb5.so.2 are harmless in test containers.

Test plan

  • Docs only — no code changes

🤖 Generated with Claude Code

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>
@mauroservienti
mauroservienti enabled auto-merge (squash) March 5, 2026 19:51
@mauroservienti
mauroservienti merged commit d6803a3 into master Mar 5, 2026
4 of 5 checks passed
@mauroservienti
mauroservienti deleted the docs branch March 5, 2026 20:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant