
|
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.
|
|
|
|

|
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.
|
|
|
|

|
Did you get any update on this?
|
|
|
|

|
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.
|
|
|
|

|
Thanks for the update. Immm... Need to find a way.
|
|
|
|

|
KASR1 wrote: i shound not put many assembly in GAC
Why not?
|
|
|
|

|
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.
|
|
|
|