Windows Develop Bookmark and Share   
 index > Windows Forms General > [C#] Add reference to a DLL from Resources
 

[C#] Add reference to a DLL from Resources

Is it possible to add reference to a DLL located in Resources?

When I click "Add References" I can't find a way to add reference from Resources.

Thanks
farooqaaa  Wednesday, September 09, 2009 1:16 PM
ILMerge can do this for you, but you'd better be sure you have copyright permissions to do this before you do it.
Coding Light - Illuminated Ideas and Algorithms in Software
Coding Light Wiki �LinkedIn �ForumsBrowser
  • Marked As Answer byfarooqaaa Wednesday, September 09, 2009 4:58 PM
  •  
David M Morton  Wednesday, September 09, 2009 2:00 PM
No - that's not possible.

If you want to use an assembly stored as a resource, at runtime you'd have to extract it and then dynamically load and use it via reflection.
http://blog.voidnish.com
Nishant Sivakumar  Wednesday, September 09, 2009 1:28 PM
Hmm..

I can add a reference to those DLLs without have them in Resources. But the problem is that when I build the app and copy the ".exe" file out of the "bin" folder, it won't work. Which means that I will have to copy the ".exe" as well as the dlls to get it work.

Is it possible to have the DLLs somehow embedded into the app? So that it becomes one ".exe" file?

Thanks
farooqaaa  Wednesday, September 09, 2009 1:59 PM
ILMerge can do this for you, but you'd better be sure you have copyright permissions to do this before you do it.
Coding Light - Illuminated Ideas and Algorithms in Software
Coding Light Wiki �LinkedIn �ForumsBrowser
  • Marked As Answer byfarooqaaa Wednesday, September 09, 2009 4:58 PM
  •  
David M Morton  Wednesday, September 09, 2009 2:00 PM
Thanks a trillion, David.

That's what I've been looking for. That tool merged multiple dlls and the size is also smaller.

Thanks again!
farooqaaa  Wednesday, September 09, 2009 4:53 PM

You can use google to search for other answers

Custom Search

More Threads

• How do I layer controls on a form so that a PictureBox acts as a backdrop for all the other forms?
• how to know an actual size of a character(in pixel) at a specified font ?
• Print HTML
• Adding a conext menu to a cell in a datagridview
• Getting Project NameSpace
• How to get selected text from AxWebBrowser
• There is a pure win32 control, I don't know how it's created, But I just wanna show it in a form control
• Add images to Listview control in C#.net with 3.5 frame work.
• Make form fit screen
• Any way to TreeView size to content?