diff options
Diffstat (limited to 'src/vm/assemblyspec.cpp')
-rw-r--r-- | src/vm/assemblyspec.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/vm/assemblyspec.cpp b/src/vm/assemblyspec.cpp index 2b4b1fb480..b9e94e8a81 100644 --- a/src/vm/assemblyspec.cpp +++ b/src/vm/assemblyspec.cpp @@ -1256,6 +1256,15 @@ ICLRPrivBinder* AssemblySpec::GetBindingContextFromParentAssembly(AppDomain *pDo // ICLRPrivAssembly implements ICLRPrivBinder and thus, "is a" binder in a manner of semantics. pParentAssemblyBinder = pParentPEAssembly->GetBindingContext(); + if (pParentAssemblyBinder == NULL) + { + if (pParentPEAssembly->IsDynamic()) + { + // If the parent assembly is dynamically generated, then use its fallback load context + // as the binder. + pParentAssemblyBinder = pParentPEAssembly->GetFallbackLoadContextBinder(); + } + } } #if defined(FEATURE_HOST_ASSEMBLY_RESOLVER) |