Skip to content

Instantly share code, notes, and snippets.

@PotatoMaster101
Created January 8, 2021 04:42
Show Gist options
  • Save PotatoMaster101/2c26895431fb4a0ed2548b877cda09b4 to your computer and use it in GitHub Desktop.
Save PotatoMaster101/2c26895431fb4a0ed2548b877cda09b4 to your computer and use it in GitHub Desktop.
Commands for compiling single-file app in .NET core

dotnet Compile Single File App

Windows

$ dotnet publish -r win-x64 -c Release --self-contained true -p:PublishSingleFile=true -p:IncludeAllContentForSelfExtract=true -p:PublishTrimmed=true -p:PublishReadyToRun=true

Linux

$ dotnet publish -r linux-x64 -c Release --self-contained true -p:PublishSingleFile=true -p:IncludeAllContentForSelfExtract=true -p:PublishTrimmed=true

OSX

$ dotnet publish -r osx-x64 -c Release --self-contained true -p:PublishSingleFile=true -p:IncludeAllContentForSelfExtract=true -p:PublishTrimmed=true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment