Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Merge DLL into EXE?

I have two DLL files which I'd like to include in my EXE file to make it easier to distribute it. I've read a bit here and there how to do this, even found a good thread here, and here, but it's far too complicated for me and I need real basic instructions on how to do this.

I'm using Microsoft Visual C# Express 2010, and please excuse my "low standard" question, but I feel like I'm one or two level below everyone else's expercise :-/ If someone could point out how to merge these DDL files into my EXE in a step-by-step guide, this would be really awesome!

like image 740
Momro Avatar asked Apr 13 '12 08:04

Momro


People also ask

Can DLL be converted to EXE?

DLL to EXE is an Open Source, portable, Command Prompt utility that can convert any DLL to an EXE (executable). If you execute DLL to EXE without first being in the Command Prompt or Powershell, you will be shown the arguments required. Simply put, type in "dll_to_exe filename.

How does DLL work in C#?

Introduction. A Dynamic Link library (DLL) is a library that contains functions and codes that can be used by more than one program at a time. Once we have created a DLL file, we can use it in many applications. The only thing we need to do is to add the reference/import the DLL File.


1 Answers

For .NET Framework 4.5

ILMerge.exe /target:winexe /targetplatform:"v4,C:\Program Files\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0" /out:finish.exe insert1.exe insert2.dll 

ILMerge

  1. Open CMD and cd to your directory. Let's say: cd C:\test
  2. Insert the above code.
  3. /out:finish.exe replace finish.exe with any filename you want.
  4. Behind the /out:finish.exe you have to give the files you want to be combined.
like image 113
Yuki Kutsuya Avatar answered Oct 21 '22 12:10

Yuki Kutsuya