Home > Software design >  Combine All Files into one .exe. (C#)
Combine All Files into one .exe. (C#)

Time:06-02

I have a WinForm Visual studio 2022 project that is C# and when I build it, it outputs 4 files, 1 dll, and 2 .json files with the exe. How would I combine all the files into one .exe file to make it easier to distribute?

CodePudding user response:

Right click project → Publish

Go along with the Wizard to publish to a folder location

Once you are done with that click "show all settings": enter image description here

Now select a "Self-contained" deployment mode and check the "produce single file" checkbox

enter image description here

When you publish you will have a single exe file

  • Related