Solved

Importing my dll's into a single console executable file

Posted on 2006-07-18
3
427 Views
Last Modified: 2012-05-05
How can i compile a C# console application so that all of my dependent dll's are compiled into the executable?

Thanks.
0
Comment
Question by:eddyevations
3 Comments
 
LVL 20

Assisted Solution

by:Daniel Van Der Werken
Daniel Van Der Werken earned 150 total points
ID: 17135104
Reference this:

http://msdn2.microsoft.com/en-us/library/6s2x2bzy.aspx

I'm pretty sure you're looking for the /reference command line option.
0
 
LVL 10

Expert Comment

by:athapa
ID: 17135169
I don't think you can embedd the referenced dll's inside your executable.

You could embed them  in your executable and then extract them during the runtime. But you'd have to load the assembly and acces the classes inside and it won't be as easy as just adding reference to the dependent dlls.

AT
0
 
LVL 13

Accepted Solution

by:
BlackTigerX earned 350 total points
ID: 17135312
you can use the ILMerge tool
here's an example of how to use it, it's quite simple (but command line)

ilmerge /target:winexe /out:ResultExecutable.exe InputExecutable.exe SomeAssembly.dll SomeOtherAssembly.dll

check this article:
http://petesbloggerama.blogspot.com/2005/01/ilmerge-assemblies-and-how-to-set.html

http://ebersys.blogspot.com
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Article by: Najam
Having new technologies does not mean they will completely replace old components.  Recently I had to create WCF that will be called by VB6 component.  Here I will describe what steps one should follow while doing so, please feel free to post any qu…
Performance in games development is paramount: every microsecond counts to be able to do everything in less than 33ms (aiming at 16ms). C# foreach statement is one of the worst performance killers, and here I explain why.
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…

831 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question