Solved

Importing my dll's into a single console executable file

Posted on 2006-07-18
3
425 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 19

Assisted Solution

by:Daniel Van Der Werken
Daniel Van Der Werken earned 150 total points
Comment Utility
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
Comment Utility
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
Comment Utility
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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Article by: Ivo
Anonymous Types in C# by Ivo Stoykov Anonymous Types are useful when  we do not need to follow usual work-flow -- creating object of some type, assign some read-only values and then doing something with them. Instead we can encapsulate this read…
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
This video discusses moving either the default database or any database to a new volume.

771 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

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now