Click here to Skip to main content
       

C#

 
You must Sign In to use this message board.
Search this forum  
    Spacing  Noise  Layout  Per page   
QuestionHow to reference .net DLL present in other foldermemberKASR124 Dec '12 - 6:58 
I am developing an c# application and
it uses many .net assemblies. For some
reason i need to move a dll to program
files folder and that dll depends on
many other assembly present in the
application folder and this makes me to copy all dependent dlls to programfiles
folder. This will cause duplication of dll
in both application and programfiles
directory. I know that moving
dependent assembly to GAC will resolve
this issue but i shound not put many assembly in GAC. So please suggest a
way to make .Net dll to reference its
dependent dlls.
GeneralRe: How to reference .net DLL present in other folder PinmemberAlan N26 Dec '12 - 7:48 
That's an interesting question that I don't know the answer to. Why not try it out? I may look at it tomorrow and if I do I'll post another reply.
 
Alan.
GeneralRe: How to reference .net DLL present in other folder PinmemberKASR12 Jan '13 - 7:08 
Did you get any update on this?
GeneralRe: How to reference .net DLL present in other folder [modified] PinmemberAlan N2 Jan '13 - 8:51 
If you have say App.exe -> DllA -> DllB, i.e. DllA uses DllB and App does not directly reference DllB. If DllA and DllB have been moved out of the application base directory then App.exe.config must be edited to provide separate location information for both DllA and DllB and there is no assumption that DllB now resides in the same place as DllA.
 
Think of it like this: There is one process and the code in DllA executes in the context of that process. When code in DllA needs to call code residing in DllB then that assembly is loaded by 'the process' whose default locations are the GAC and the application base directory. Overrides to this default behaviour are on a per assembly basis.
 
Any information contained within *.dll.config is not read automatically and will be ignored.
 
Alan.

modified 2 Jan '13 - 17:27.

GeneralRe: How to reference .net DLL present in other folder PinmemberKASR18 Jan '13 - 8:00 
Thanks for the update. Immm... Need to find a way.
QuestionRe: How to reference .net DLL present in other folder PinmemberPIEBALDconsult26 Dec '12 - 9:13 
KASR1 wrote:
i shound not put many assembly in GAC

 
Why not?
AnswerRe: How to reference .net DLL present in other folder PinmemberKASR126 Dec '12 - 16:25 
Even i am concerned about that, but i was asked to find other possible options to make the dll to refer its dependent dlls. I am interested to know whether it can be achieved via config file.

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   


Advertise | Privacy | Mobile
Web04 | 2.6.130516.1 | Last Updated 20 May 2013
Copyright © CodeProject, 1999-2013
All Rights Reserved. Terms of Use
Layout: fixed | fluid