Make Exe Portable

Active3 months ago

Archive name - Name of your portable program Compression method - Best Archiving options - Create SFX archive Now go to 'Advanced' tab - SFX Options Run after extraction - Put name of your program.exe file (in my case its everest.exe) Go to 'Modes' tab - Unpack to temporary folder Silent mode - Hide all Ok - Ok. May 31, 2016  Make A Bootable.ISO File From An Exe File(written in VB.NET) How To Make A Bootable.ISO File From An Exe File(written in VB.NET)? Please Answer Quickly. This thread is locked. You can follow the question or vote as helpful, but you cannot reply to this thread. I have the same question (86).

I've recently coded a little program to determine numbers in a picture and it is reliant on two libraries I've used. (DLLs)

Since my target computer is not allowed to install programs due to security reasons, I need to create a portable .exe..NET is installed on the target computer but for some reason VS still does not include the libraries I've used in the exe but instead creates an application folder with a setup.exe, some .DEPLOY files and an application manifest.

I am new to VS and .NET in general so this question could be easy to answer, but I'm asking since I've found nothing useful on StackOverflow neither on google.

Make exe portable for windows 10Nasreddine
28.8k15 gold badges65 silver badges88 bronze badges
Daniel SiegelDaniel Siegel
1761 gold badge2 silver badges13 bronze badges

4 Answers

One way to do this is to build your application in Release mode (You can pick from Debug or Release in the drop-down). Then go to C:Projects[ProjectName][ProjectName]binRelease (The location of your project folder may vary). You'll see a bunch of files but all you really need are the DLLs, executable, and the config if you used one. You won't have to do any setup if you keep the necessary files in the application's folder, just copy them all to a folder on the target computer, create a shortcut if you want then you're good to go.

Saikat Sengupta
3,4827 gold badges46 silver badges71 bronze badges
PeskyToasterPeskyToaster

You can simply build the application and copy your bin/Debug folder along, but that would still mean you need multiple files.

In order to merge all references into the executable, use ILMerge. Here is some help calling ILMerge.

Basically, after building, you should do something like this:

Make Exe Portable Laptop

There is just one file you need to send along.

Patrick HofmanPatrick Hofman
133k18 gold badges188 silver badges250 bronze badges

You can just copy all your assemblies into any folder you want. Simply chose 'Build' from within Visual Studio and copy the files from bin/debug to your destination-folder.

However you have to ensure that all (relative) paths (if existing) still work as you cannot be sure where the user of your program copies the files to.

HimBromBeereHimBromBeere
25.9k4 gold badges34 silver badges66 bronze badges

One simple way could be to use 7zip Packager, it doesn't need any installer. However, VisualStudio method might be more reliable.

Make Any Exe Portable

T.ToduaT.Todua
34.6k12 gold badges151 silver badges150 bronze badges

Not the answer you're looking for? Browse other questions tagged c#.netportability or ask your own question.