c# compile into an exe

C#
dotnet publish -r win-x64 -c Release /p:PublishSingleFile=true
Source

Also in C#: