Click to See Complete Forum and Search --> : AppDomain.Load() issue


lmoreault
March 6th, 2009, 03:47 PM
Hi,

I am trying to load an assembly from my program which I can unload easily. (So we can forget about Assembly.LoadFrom()).

I have used the AppDomain approach and the Load / Unload methods.
It work fine but I have to place my dll in the same directory as my executing Assembly.

I tried changing the AppDomainSetup.ApplicationBase folder but it keeps on looking in the Assembly path.

Do you have any clue of what I could do ?

Example :
My program : c:\Program Files\MyApp\Test.exe
My DLL : c:\Test\Bla.dll

Thank you

Almund
March 27th, 2009, 09:51 PM
Hi All, thought I'd poke this subject.

I'm trying mainly the same thing, loading assemblies to have them unloaded again and I simply can't find any way to do this for assemblies not residing in the executing directory.

What I'm trying to do is to retrieve the assembly version for some assemblies and since these should be able to be switched runtime I cannot load them normally (Assembly.LoadFile) since it would lock them.

I'm really at the end of my rope here, I haven't found anything anywhere that says anything about this in a usable manner, help is greatly appreciated.

Thanks a lot guys