Bug 5817 - Only assemblies compiled against NUnit 2.6.0.12051 can be executed
Summary: Only assemblies compiled against NUnit 2.6.0.12051 can be executed
Status: RESOLVED ANSWERED
Alias: None
Product: Xamarin Studio
Classification: Desktop
Component: NUnit ()
Version: Trunk
Hardware: PC Mac OS
: Lowest enhancement
Target Milestone: ---
Assignee: Mike Krüger
URL:
Depends on:
Blocks:
 
Reported: 2012-06-22 06:32 UTC by Alan McGovern
Modified: 2016-06-07 08:03 UTC (History)
1 user (show)

Tags:
Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED ANSWERED

Description Alan McGovern 2012-06-22 06:32:13 UTC
1) Compiled monodevelop with --enable-test passed to configure.
2) Build and run any of the unit test assemblies
3) This works perfectly.

4) Open the cecil solution in main/external/cecil
5) Build and attempt to run any of it's tests

Result:
It fails with error [0].

This is caused by our external test runner attempting to load the test assemblies in the same appdomain as itself. These particular test assemblies are compiled against NUnit 2.7.10.11092, which is bundled in cecils source code. We need to be able to support this kind of construct with our test runner. NUnit itself already supports this so we just need to fix our ExternalTestRunner to not require loading these assemblies in its own appdomain. Alternatively we could pull in the NUnit source code and compile it directly into our ExternalTestRunner so that it has no dependency on any external assemblies.



[0] ERROR [2012-06-22 11:26:00Z]: System.TypeLoadException: Could not load type 'NUnit.Core.Extensibility.IAddinRegistry, nunit.core.interfaces, Version=2.5.10.11092, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77'.  at (wrapper xdomain-invoke) MonoDevelop.NUnit.External.NUnitTestRunner:Initialize (string,string,string)
  at (wrapper remoting-invoke-with-check) MonoDevelop.NUnit.External.NUnitTestRunner:Initialize (string,string,string)
  at MonoDevelop.NUnit.External.ExternalTestRunner.GetRunner (System.String assemblyPath) [0x00060] in /Users/alanmcgovern/Projects/monodevelop/main/src/addins/NUnit/Services/ExternalTestRunner.cs:101 
  at MonoDevelop.NUnit.External.ExternalTestRunner.Run (IRemoteEventListener listener, ITestFilter filter, System.String path, System.String suiteName, System.Collections.Generic.List`1 supportAssemblies) [0x00000] in /Users/alanmcgovern/Projects/monodevelop/main/src/addins/NUnit/Services/ExternalTestRunner.cs:80 
  at (wrapper managed-to-native) System.Runtime.Remoting.RemotingServices:InternalExecute (System.Reflection.MethodBase,object,object[],object[]&)
  at System.Runtime.Remoting.RemotingServices.InternalExecuteMessage (System.MarshalByRefObject target, IMethodCallMessage reqMsg) [0x000c2] in /private/tmp/monobuild/build/BUILD/mono-2.10.9/mcs/class/corlib/System.Runtime.Remoting/RemotingServices.cs:138
Comment 1 Mike Krüger 2016-06-07 08:03:58 UTC
Seems to work in 6.0