the assembly resolver in CoreBase.cs simply returns TheGeneratedAssembly, while it should check if the requested assembly is actually that one.
i.e. your code should be rewritten like this:
returning null is important to let the framework call other handlers.
I stumbled on this problem because after calling GetInstanceOfGeneratedType I encountered a lot of FileLoadException when referencing or trying to load framework assemblies.
the assembly resolver in CoreBase.cs simply returns TheGeneratedAssembly, while it should check if the requested assembly is actually that one. i.e. your code should be rewritten like this:
return this.TheGeneratedAssembly.FullName == args.Name ? this.TheGeneratedAssembly : null;
returning null is important to let the framework call other handlers.
I stumbled on this problem because after calling GetInstanceOfGeneratedType I encountered a lot of FileLoadException when referencing or trying to load framework assemblies.