PassionateDeveloper
PassionateDeveloper

Reputation: 15158

DLL include in exe.file?

I build a project in C#. From another project I have 5 DLLs.

Is It possible to include the DLL in the exe, that I only give 1 File to people and not x files?

I tried ILMerge, but the output file ever opened a Command prompt with the application - useless.

Upvotes: 2

Views: 6172

Answers (3)

Marinara54uc3
Marinara54uc3

Reputation: 73

I realize this is an old issue, but for anyone thats looking for an answer I found the following link helpful for my situation. The following will also work for WPF.

http://blogs.msdn.com/b/microsoft_press/archive/2010/02/03/jeffrey-richter-excerpt-2-from-clr-via-c-third-edition.aspx

This method lets you embed dlls into your assembly by adding them to your project and set the Build Action property to Embedded Resource. The article does a good job of explaining this.

Upvotes: 1

Frank Bollack
Frank Bollack

Reputation: 25196

Take a look at ILMerage

You can download it from here

Upvotes: 1

Svetlozar Angelov
Svetlozar Angelov

Reputation: 21680

You can merge the exe and the dlls with the ILMerge.exe tool

lmerge.exe /out:C:\SomePath\TheOnlyOneExe.exe 
    C:\....\bin\Debug\someexe.exe C:\....\bin\Debug\somedll.dll /t:exe

Upvotes: 16

Related Questions