[loader] Use appdomain base dir and loadfrom asmctx hooks
commit88ef07a501e101d1c082f4d8d5a9efc4de85d7bd
authorAleksey Kliger <alklig@microsoft.com>
Thu, 2 Aug 2018 16:23:54 +0000 (2 12:23 -0400)
committerMarek Safar <marek.safar@gmail.com>
Tue, 7 Aug 2018 07:43:45 +0000 (7 09:43 +0200)
tree25fc56c8a117b68bfb8c787cec3d461e89b4402f
parentaa33b264e027271e7ffe54602c8b63618faad327
[loader] Use appdomain base dir and loadfrom asmctx hooks

1. If an assembly filename is in the GAC, always open the assembly in default
context.
2. If an assembly filename is in the appdomain search path (base directory or
private bin path) always open the assembly in default context.
3. If an assembly filename is in the base dir of the requesting assembly and
the requesting assembly was in LoadFrom context, always open the assembly in
LoadFrom context.

Fixes https://github.com/mono/mono/issues/9753
and Fixes https://github.com/mono/mono/issues/9542
mono/metadata/appdomain.c
mono/metadata/assembly.c