xunit/xunit — pull request #98 by onovotny (2014-05-25 01:36:01+00:00)
Title: Vs runner fix

This is a partial fix for detecting Xamarin assemblies in the VS Runner.

This only works if the Xamarin lib actually uses a type from either MonoTouch or Mono.Android (Like NSView, Activity, etc). If it doesn't, then the compiler will exclude the metadata reference.

It would be better to check the TargetFrameworkAttribute for the FrameworkName, but I was not able to get that to work yet. Using assembly.GetCustomAttributeData(), I was getting stuck on correctly dealing with ReflectionOnlyAssemblyResolve. Seems like getting the assembly-level attributes is triggering more assemblies to load.

The main issue is that Assembly.ReflectionOnlyAssemblyLoad() does not use system binding policy. So, in the case of a WinStore app that uses System.Runtime 4.0.10.0, it needs to be correctly resolved. There could be other issues too.

TL;DR, it would be best to read the attribute, but I wasn't able to get that to work correctly. Instead, what's there now will still load the assm in the Reflection Context and check its references for the Xamarin ones.