There is some startup logic that gets all types implementing an interface from all referenced assemblies. I'm having some trouble getting the types from assemblies that were not yet required to load at that time.
The following code does NOT get the referenced dll:
Assembly.GetExecutingAssembly().GetReferencedAssemblies().Select(Assembly.Load);
But with this little monkey patch, it does get it:
var forceIt = new SomeTypeFromThatNugetPackage();
Assembly.GetExecutingAssembly().GetReferencedAssemblies().Select(Assembly.Load);
It also works if I do an explicit:
Assembly.Load(new AssemblyName("ThatNugetPackage"));
I've also tried the code from here which works nicely for project references but not for nuget references. Any ideas on how to force loading of these assemblies?