tags:

views:

144

answers:

3

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.

+14  A: 

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
Svetlozar Angelov
Wow I didn't know about this tool. Thanks for it! I was gonna reply that you can just copy the dll source files in your main program and compile it like that, but after your reply, it's not worth it anymore ;)
Blindy
I tried, but every time I start the output DLL a command prompt open with it, is it normal?
Kovu
@Kovu Read the docs -- /target:winexe will do what you want.
Daniel Straight
A: 

Take a look at ILMerage

You can download it from here

Frank Bollack
A: 

but what about if i have MFC DLL and .NET application (.exe) ?.

Neel Patel
This is not an answer.
mbeckish
i think ILMerge is only applicable to other then VC++ .dll,If i have VC++ dll then i think ILMerge will not work.
Neel Patel