Programming Forums

Programming Forums (http://www.programmingforums.org/forumindex.php)
-   C# (http://www.programmingforums.org/forum16.html)
-   -   Question about using statements when using components (http://www.programmingforums.org/showthread.php?t=14135)

Arla Oct 8th, 2007 5:26 PM

Question about using statements when using components
 
As some standards I create a lot of my classes in stand-alone DLL files and then have those as references in my programs, however some of these DLL's reference other DLL's, for example I have a DLL for error handling, and that references my Utils DLL for some basic tasks that I figured were better off in another DLL.

Now the problem is that if I generate a program that references the Error DLL I get errors if I try to generate it without referencing the Utils DLL as well? Is there any way to avoid this? I'd rather reference the Error Dll directly and have it already having compiled into itself everything it needed from the Utils DLL (does that make any sense?)

What I'm worried about is that if I were to publish my error DLL for others to use, anytime they use it, they'd also need to reference the Util DLL, and then if I created another DLL that referenced the error DLL they'd need to reference that DLL, the error DLL, and the Util DLL, seems to not be quite as I'd expect.

DaWei Oct 8th, 2007 5:44 PM

It doesn't make sense. If the Error dll contains, internally, everything it needs from the Utils dll, then that removes one reason for having the Utils dll.

When you write code that uses a library of any kind, you are going to have to choose how you make the library's code available. It MUST be available, as code, not as just references. If the dll metaphor doesn't fit your likings, then use an object library or some other method.

milot Oct 8th, 2007 7:05 PM

I often write some custom controls, and of course I compile them as dlls and call them on my applications, but when I gave the software to somebody it was very painfull giving them all dlls with my software, and the problem was if some user deletes my dlls. So I asked my friend who knows everything (www.google.com) how to solve this problem and it came up with this: http://research.microsoft.com/~mbarnett/ILMerge.aspx

It merges assemblies and make one big exe (or dll) with all others, so you don't have to be worried if user deletes it or renames it because they all will be merged into one assembly. Check the site for more information.

P.S If you want GUI part of ILMerge, check here: http://www.codeproject.com/useritems...or_ILMerge.asp

I hope this helps with your problem.


All times are GMT -5. The time now is 3:25 AM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC