Click here to Skip to main content
15,912,457 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
hi I need to run the program without having to .dll files along with it
I use SharpCompress to extract the file But should not be the .dll file .l can be the class code (code)

What I have tried:

I used .net reflector
I used .net reflector
I used .net reflector
Posted
Updated 12-Jul-19 6:58am

You can merge your assemblies together with ILMerge[^].
 
Share this answer
 
If an application relies on code in a DLL Assembly, then that DLL file need to be shipped with the app, it can't be "included" with the EXE Assembly because that would do three things:
1) Probably invalidate any licence agreement associated with the DLL, and as such be against any T&Cs agreed when the DLL was installed.
2) Break any Internal, Protected, and Protected Internal access restrictions in the DLL Assembly.
3) Make it impossible to automatically update the DLL assembly code without having to rebuild and ship the whole EXE.

The chances of this working on "all DLLs" is remote at best: almost any form of obfuscation would make this technically challenging to do anyway.

Why do you think this is a good idea? What makes you think you need it?
 
Share this answer
 
Comments
[no name] 12-Jul-19 6:53am    
"it can't be "included" with the EXE Assembly": Yes it can, see ILMerge.
ahmadamiri 12-Jul-19 7:33am    
I succeeded with ILMerge ;)
In some cases, if you have a complicated solution, ILMerge won't work.
You can try Fody Costura instead: GitHub - Fody/Costura: Embed references as resources[^]
Read review here: .NET Power Tip 10: Merging Assemblies | manuelmeyer.net[^]
 
Share this answer
 
v2

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