From a777bf398b025aea688d2bf5d1028c9d7be37f52 Mon Sep 17 00:00:00 2001 From: Gaurav Khanna Date: Wed, 3 May 2017 08:35:56 -0700 Subject: [PATCH] Fix load from (dotnet/coreclr#11342) * Add LoadFrom dependencies to the LoadFrom list * Add a comment Commit migrated from https://github.com/dotnet/coreclr/commit/45132a72dce3aeadff09ce8fbee6a663456cda99 --- src/coreclr/src/mscorlib/src/System/Reflection/Assembly.CoreCLR.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/coreclr/src/mscorlib/src/System/Reflection/Assembly.CoreCLR.cs b/src/coreclr/src/mscorlib/src/System/Reflection/Assembly.CoreCLR.cs index 79f06f3..cfb36e7 100644 --- a/src/coreclr/src/mscorlib/src/System/Reflection/Assembly.CoreCLR.cs +++ b/src/coreclr/src/mscorlib/src/System/Reflection/Assembly.CoreCLR.cs @@ -51,7 +51,8 @@ namespace System.Reflection AssemblyName requestedAssemblyName = new AssemblyName(args.Name); string requestedAssemblyPath = Path.Combine(Path.GetDirectoryName(requestorPath), requestedAssemblyName.Name+".dll"); - return AssemblyLoadContext.Default.LoadFromAssemblyPath(requestedAssemblyPath); + // Load the dependency via LoadFrom so that it goes through the same path of being in the LoadFrom list. + return Assembly.LoadFrom(requestedAssemblyPath); } public static Assembly LoadFrom(String assemblyFile) -- 2.7.4