I have a program that loads plugins using AssemblyLoadContext.LoadFromAssemblyName using this approach.
The plugin assembly loads fine, and I can locate types that implement a required interface, and instantiate these types with their default constructor (using Activator.CreateInstance), but when I try to locate a constructor with a particular parameter type, GetConstructor returns null, even though the required constructor can be seen in the debugger.
When I try the same thing with the same type but statically loaded, the call succeeds.
What is happening here?
Update:
I moved the ILogger parameter out of the constructor into one of the methods that's declared in the interface and now Assembly.GetTypes (via RuntimeModule.GetTypes) throws ReflectionTypeLoadException with "Method 'blah' in type 'blah' from assembly 'blah' does not have an implementation."
The method in question is the one with the ILogger parameter. It's as if the runtime doesn't recognize the ILogger type in the interface and the ILogger type in the runtime-loaded assembly as being the same, but I can't figure out why that should be.
If I remove the ILogger parameter it all works smoothly again.

