Merge pull request #5156 from lambdageek/bug-57850+57851
authorAleksey Kliger (λgeek) <akliger@gmail.com>
Fri, 30 Jun 2017 14:24:57 +0000 (10:24 -0400)
committerGitHub <noreply@github.com>
Fri, 30 Jun 2017 14:24:57 +0000 (10:24 -0400)
[sre] Deal with ResolveEventHandler returning an AssemblyBuilder (Fixes #57850, #57851)

Fix a couple of bugs in the situation where a `ResolveEventHandler` happens to return an `AssemblyBuilder`.

* [#57850](https://bugzilla.xamarin.com/show_bug.cgi?id=57850) - if the `ResolveEventHandler` returns a reflection only assembly, throw a `FileNotFoundException`
* [#57851](https://bugzilla.xamarin.com/show_bug.cgi?id=57851) - don't look for a `ReferenceAssemblyAttribute` on assemblies returned by a `ResolveEventHandler` if they happen to be an `AssemblyBuilder`. (the native code path to get there is to try and instantiate a custom attribute in some other assembly, hence the fairly convoluted test in `assemblyresolve_event5` and its helper files)


Trivial merge