[runtime] Check for ReferenceAssemblyAttribute when loading for execution.
authorAleksey Kliger <aleksey@xamarin.com>
Tue, 18 Oct 2016 18:45:42 +0000 (14:45 -0400)
committerAleksey Kliger <aleksey@xamarin.com>
Tue, 18 Oct 2016 18:48:25 +0000 (14:48 -0400)
commitf7bcbec7757cef8c15342d8c7a13db941cd2624e
treea0c26488191f4dc038f01549bf37edd4a3e3f16c
parent9d789e0d70cb312a3d148eb6473c30cee5f5a240
[runtime] Check for ReferenceAssemblyAttribute when loading for execution.

An assembly with a System.Runtime.CompilerServices.ReferenceAssemblyAttribute
may be loaded in a reflection-only context, but not for execution.

When loading assembly refs, or when loading assemblies by name (as
opposed to file path), a reference assembly will be skipped over and
other assemblies from the GAC and the load path will be tried.

Fixes https://bugzilla.xamarin.com/show_bug.cgi?id=42584
mono/metadata/appdomain.c
mono/metadata/assembly.c
mono/metadata/class.c
mono/metadata/custom-attrs.c
mono/metadata/domain-internals.h
mono/metadata/domain.c