for make a release dotnet publish -r win-x64 -c release -p:PublishSingleFile=true -p:PublishTrimmed=true or dotnet publish -r win-x64 -c release -p:PublishAOT=true