Home All Groups Group Topic Archive Search About

Desperately need help on Assembly Load

Author
16 Oct 2006 8:05 AM
antonng02
Hi,

I have written an application in which the main exe sits in, say <Dir1>
This application will load using reflection Assembly.LoadFrom of an
assembly, say Asm1 which sits inside another completely different
directory <Dir2>.
Within Asm1, I will then need to load another assembly Asm2 which also
sits in <Dir2>

But the problem is, everytime I try to do it within Asm2, by using
Assembly.Load(assemblyName), but it always could not find it.

A colleague of mine suggested using AppDomain, which I then try to
create another separate AppDomain using the following command:

AppDomain.CreateDomain("Somename", null, <Dir2>, <Dir2>, false);

however it always returns an object of type
System.Runtime.Remoting.Proxies.__TransparentProxy
which when I used, it will always throw an Exception.

Does anyone know how to overcome this problem? or suggest any other
way?

All I am trying to do is so that everytime I call Assembly.Load, it
will try to look under <Dir1> as well as <Dir2>

Thanks in advance. Any help would be appreciated.

AddThis Social Bookmark Button