Skip to content

Correct framework-dependent publish examples - #57005

Draft
BillWagner wants to merge 2 commits into
mainfrom
copilot/fix-self-contained-flag
Draft

BillWagner wants to merge 2 commits into
mainfrom
copilot/fix-self-contained-flag

Conversation

@BillWagner

@BillWagner BillWagner commented Nov 23, 2026 •

Copy link
Copy Markdown
Member

Some .NET SDK versions accept --self-contained false without producing a framework-dependent single-file app, resulting in an unexpectedly large executable.

  • Single-file deployment: Use -p:SelfContained=false and clarify the self-contained default.
  • Related examples: Use --no-self-contained in publishing and container guidance, and explicitly select self-contained deployment where intended.
dotnet publish -r linux-x64 -p:PublishSingleFile=true -p:SelfContained=false

Copilot AI balanced review requested due to automatic review settings November 23, 2026 15:04

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot wasn't able to review any files in this pull request. Check if the Files changed in this pull request are included in default exclusions.

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
@BillWagner BillWagner changed the title [WIP] Fix incorrect self-contained flag in publish command Correct framework-dependent publish examples Nov 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

--self-contained false doesn't seem to be a valid flag

3 participants