c# one exe no other files code example Example: compile in one single exe c# dotnet publish -r win-x64 -c Release /p:PublishSingleFile=true