Does setting AssemblyName.CodeBase force the assembly to be loaded in the LoadFrom context?
I'm working on a kind of plugin system. I need to be able to use Type.GetType etc... At any place in my code I should not have to know if the Type come from a plugin dll or not.
My plugins are in a folder Plugins under the bin directory of my application (windows/web) and each plugin is in it's own folder.
I set my probing path to Plugins (or bin;bin\Plugins for web) even if it doesn't make any difference since they are in sub folders.
And I load my Plugin like this
pluginInfo.EntryAssemblyName = new AssemblyName(myAssemblyName);
pluginInfo.EntryAssemblyName.CodeBase = assemblyPath;
pluginInfo.EntryAssembly = Assembly.Load(pluginInfo.EntryAssemblyName);
Note: PluginInfo is just a class that keep the state of my plugin.
I wondering, because I set the CodeBase property of the assembly name Assembly.Load is able to find my assembly even if its not in the probing path, does it mean that the assembly get loaded in the default context or the load from context?
Is it normal that the AssemblyResolve event is raise after for the entry assembly again?