Hi
I am loading an assembly in C# using reflection:
Assembly = Assembly.Load([assembly_bytestream]);
The assembly being loaded references another two assemblies. To my understanding reflection will load the main assembly and then search the GAC for the referenced assemblies, if it cannot find it there, you can then incorparate an assemblyResolve event:
AppDomain.CurrentDomain.AssemblyResolve += CurrentDomain_AssemblyResolve;
Assembly CurrentDomain_AssemblyResolve(object sender, ResolveEventArgs args)
{
if (args.Name.IndexOf([refAsm]) > -1)
{
Assembly shdocvw = Assembly.LoadFrom([dllPath]);
}
}
The thing is, I dont want to first look in the GAC I want to force reflection to load the reference assemblies from a specific path I define. Any ideas on how to do this?