0 votes
by (2.5k points)
I want to send someone an application I wrote, but do I have to zip the entire bin folder and get them to extract it? It seems a bit daunting given that the bin folder is full of dll files.

1 Answer

0 votes
by (2.5k points)

As of .NET Core 3+. you can now publish your application to a single exe file by running the following command in your project folder : 

dotnet publish -p:PublishSingleFile=true -r win-x64 -c Release --self-contained true

Where the -r flag is the platform you want to publish for. 

.NET Core exe's a pretty big however (minimum of say 70mb) because it basically bundles the entire runtime within the exe (So the user doesn't have to install .NET themselves). 

You can take a look here for a bit more info : https://dotnetcoretutorials.com/2021/11/10/single-file-apps-in-net-6/

Welcome to .NET Q&A, where you can ask questions and receive answers from other members of the community.
...