Skip to content

docs(dotnet): Document MSBuild Sentry CLI usage when building with Docker#17589

Draft
jamescrosswell wants to merge 2 commits intomasterfrom
msbuild-docker-2420
Draft

docs(dotnet): Document MSBuild Sentry CLI usage when building with Docker#17589
jamescrosswell wants to merge 2 commits intomasterfrom
msbuild-docker-2420

Conversation

@jamescrosswell
Copy link
Copy Markdown
Collaborator

DESCRIBE YOUR PR

Adds a new "Building with Docker" section to the .NET MSBuild setup page, addressing the two Docker-specific gotchas documented in getsentry/sentry-dotnet#2420:

  • Auth token — how to pass SENTRY_AUTH_TOKEN securely as a docker build --build-arg, promote it to an ENV var in the build stage, and why both ARG and ENV are required.
  • Multi-stage Dockerfiles — how to disable Sentry CLI in the dotnet publish stage with -p:UseSentryCLI=false to avoid failures when project source isn't present in the publish context.

Also adds a brief pointer to this new section from the existing CI/CD authentication bullet, so users reading about server builds are directed to the Docker guidance.

A complete multi-stage Dockerfile example (ASP.NET Core 8.0) is included.

Fixes getsentry/sentry-dotnet#2420

IS YOUR CHANGE URGENT?

  • Urgent deadline (GA date, etc.):
  • Other deadline:
  • None: Not urgent, can wait up to 1 week+

SLA

  • Teamwork makes the dream work, so please add a reviewer to your PRs.
  • Please give the docs team up to 1 week to review your PR unless you've added an urgent due date to it.
    Thanks in advance for your help!

PRE-MERGE CHECKLIST

  • Checked Vercel preview for correctness, including links
  • PR was reviewed and approved by any necessary SMEs (subject matter experts)
  • PR was reviewed and approved by a member of the Sentry docs team

@vercel
Copy link
Copy Markdown

vercel Bot commented May 4, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
develop-docs Ready Ready Preview, Comment May 5, 2026 2:19am
sentry-docs Ready Ready Preview, Comment May 5, 2026 2:19am

Request Review

@codeowner-assignment codeowner-assignment Bot requested a review from a team May 4, 2026 03:39
Comment thread docs/platforms/dotnet/common/configuration/msbuild.mdx Outdated
Document the two Docker-specific gotchas when using Sentry CLI via
MSBuild: passing SENTRY_AUTH_TOKEN as a build arg and promoting it
to an ENV var, and using -p:UseSentryCLI=false in the publish stage
of a multi-stage Dockerfile to avoid errors when project source is
not present.

Includes a complete multi-stage Dockerfile example for ASP.NET Core.

Refs getsentry/sentry-dotnet#2420
Co-Authored-By: Claude <noreply@anthropic.com>
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.

Document Sentry CLI MSBuild parameters when building in a docker container

1 participant