.net c# make exe all one file code example Example: compile in one single exe c# dotnet publish -r win-x64 -c Release /p:PublishSingleFile=true