From: Gaurav Khanna Date: Wed, 3 May 2017 15:35:56 +0000 (-0700) Subject: Fix load from (dotnet/coreclr#11342) X-Git-Tag: submit/tizen/20210909.063632~11030^2~7038 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=a777bf398b025aea688d2bf5d1028c9d7be37f52;p=platform%2Fupstream%2Fdotnet%2Fruntime.git 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 --- 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)