Click here to Skip to main content
15,885,216 members
Please Sign up or sign in to vote.
1.40/5 (3 votes)
See more:
I need to club all dlls into single executable file . this exe i will be using inside another application.

when i am doing copy paste of debug folder then its working .
but when i copied only one exe file that time its not working due to supporting dlls.
Posted
Updated 8-May-13 23:04pm
v2

Of course not. It is in the design of .net to have several dlls in your project and not a huge executable. I suggest you keep it that way. If you want to deploy your solution, make an installer (setup project[^]), or if you don't need any additional settings to be made on the client, just make a zip or an sfx[^].

If you stick to your bad idea, there are ways to do it:

1) Put all your classes in a single executable project. But that won't make third party assemblies to be incorporated in your executable.
2) There are tools you could use to merge your output file into a single assembly. Try this one: Post build step static linking tool for C#, using ILMerge[^]
 
Share this answer
 
Comments
Sebastian T Xavier 9-May-13 1:52am    
my 5+
Zoltán Zörgő 9-May-13 2:00am    
Thank you.
Sergey Alexandrovich Kryukov 9-May-13 1:58am    
My 5. I agree with your opinion, very much.
—SA
Zoltán Zörgő 9-May-13 2:00am    
Thank you.
_Amy 9-May-13 2:36am    
Deserves +5!
Hi,

Does the 'CopytoLocal' property of added dlls help you? Please go through the following links.
Embed dll Files Within an exe (C# WinForms)[^]

How do I bundle a DLL into an EXE in c#[^]


Regards
Sebastian
 
Share this answer
 
v2
Comments
Sebastian T Xavier 9-May-13 2:08am    
good work, Tadit.
lalit.mca2006 9-May-13 2:14am    
yes its good links . but i can not follow the steps 6,7,8 because its only for windows form . i am working on console application .
any idea for the console ?
Sebastian T Xavier 9-May-13 2:17am    
What have you tried?
lalit.mca2006 9-May-13 2:35am    
i think this will work only for windows application . can u tell me what should i follow after step 5 in case of console application .
lalit.mca2006 9-May-13 2:30am    
i tried till steps 5 .

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900