From: Gaurav Khanna Date: Wed, 3 May 2017 15:35:56 +0000 (-0700) Subject: Fix load from (#11342) X-Git-Tag: accepted/tizen/base/20180629.140029~1196 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=45132a72dce3aeadff09ce8fbee6a663456cda99;p=platform%2Fupstream%2Fcoreclr.git Fix load from (#11342) * Add LoadFrom dependencies to the LoadFrom list * Add a comment --- diff --git a/src/mscorlib/src/System/Reflection/Assembly.CoreCLR.cs b/src/mscorlib/src/System/Reflection/Assembly.CoreCLR.cs index 79f06f3..cfb36e7 100644 --- a/src/mscorlib/src/System/Reflection/Assembly.CoreCLR.cs +++ b/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)