I have a situation where AppDomain.CurrentDomain.AssemblyResolve
is called for an assembly that has already been loaded into the current domain using Assembly.Load(myAssemblyMemStream.ToArray())
.
Why is that?
I need to do the following to get it to work. How does this differ from what .NET does automatically?
Assembly CurrentDomain_AssemblyResolve(object sender, ResolveEventArgs args)
{
return AppDomain.CurrentDomain
.GetAssemblies()
.First(x => x.FullName == args.Name);
}