Home > Mobile >  C# Visual Studio 2017 package app into a single .exe
C# Visual Studio 2017 package app into a single .exe

Time:11-06

I searched in the last couple of days for a way to package my whole application (VS project) into a single .exe file. This project has a zip folder as a resource, what I want to achieve is this:

  1. Build an .exe file including all dependencies (7zip, .NET, zip folder resource, etc)
  2. Send the .exe file to a remote customer
  3. Once the customer runs the .exe, the zip file should be put in the path I decided upon in my project.

I could not understand how to do it. I saw multiple answers about running the Publish option but it does not work nor do I have the options they are suggesting.

See here Publish with VS 2017

CodePudding user response:

I ended up using ILMerge to pack my exe with other dlls

https://github.com/dotnet/ILMerge

The script at the end helped me create an automated process for this

  • Related