I am running NUnit 2.6.4, Xamarin Studio Enterprise 6.0.2 (build 73), Mono 4.4.2 (from Xamarin Installer), Microsoft.Net.Http Nuget package 2.2.29 on Mac OS 10.11.6
When running NUnit tests for a PCL library, in which an instance of HttpWebResponse is created via new, the NUnit runtime aborts without any visible error or an "Internal Error" --> AggregateException. When running the same test via "Debug Test" without any breakpoints set, it will throw a "System.InvalidProgramException : Missing or incorrect header for method .ctor".
Running the same test via NUnit 2.6.4 from command line, I can see this error:
WARNING: The runtime version supported by this application is unavailable.
Using default runtime: v4.0.30319
NUnit-Console version 184.108.40.20650
Copyright (C) 2002-2012 Charlie Poole.
Copyright (C) 2002-2004 James W. Newkirk, Michael C. Two, Alexei A. Vorontsov.
Copyright (C) 2000-2002 Philip Craig.
All Rights Reserved.
Runtime Environment -
OS Version: Unix 220.127.116.11
CLR Version: 4.0.30319.42000 ( Mono 4.0 ( 4.4.2 (mono-4.4.0-branch-c7sr1/f72fe45 Wed Jul 27 16:20:13 EDT 2016) ) )
ProcessModel: Default DomainUsage: Single
Execution Runtime: mono-4.0
.* Assertion at metadata.c:3643, condition `ptr' not met
Created attachment 17069 [details]
That's another example of runtime ignoring ReferenceAssembly attribute
*** This bug has been marked as a duplicate of bug 42584 ***