compile winforms project into one exe c# code example Example: c# compile just one exe dotnet publish -r win-x64 -c Release /p:PublishSingleFile=true