I'm not sure how to describe this best. But I have a problem understanding the load process of Assemblies.
My application uses plug-ins via Reflection. It works pretty fine and I'm quiet happy with that. Now I've stumbled upon a problem which confuses me and I think I missed something:
In one of my modules, I reference another module. At run time all modules are loaded. There are module ClientManager and the calling module Calculations. ClientManager and Calculations are both loaded. Calculations references ClientManager . When Calculations tries to load a class of ClientManager I get a File Not Found-exception.
Both assemblies are loaded from a bytestream in memory (via Assembly.Load(byte[]).
When Calculations tries to load the class of ClientManager this is how it looks like:
loaded: mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
many more Assemblies...
loaded: ClientManager, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
loaded: Calculations, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
Name of Assembly to be loaded: ClientManager, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
Requested from: Calculations, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
So, the Assembly is loaded, yet it gets requested and the request fails. What am I missing? Do I have to load the assembly twice?
I'm grateful for any help.
Greetings,
Skalli