Can't test multiple assemblies referencing different NUnit versions

Bug #1074891 reported by Charlie Poole
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
NUnit Test Adapter
Fix Released
High
Charlie Poole

Bug Description

The adapter checks all the assemblies proposed to it by VS to check if it references nunit.framework. This is done using a Microsoft-provided utility to get the references. Based on experience, it appears that this utility actually loads the assembly and it's references, so that the second version of the framework found cannot be loaded. We need to either eliminate this check or do it ourselves, in a way that avoids actually loading the assembly.

There are several options

1) Don't pre-check at all - just try to load every assembly with NUnit. Those that are not valid .NET assemblies will throw and non-test assemblies will return zero tests. We can ignore those.

2) Use our own AssemblyHelper utility, which examines assemblies without loading them. We would have to extend it to get references, so this is probably the most intensive.

3) Use a separate AppDomain for loading and checking each assembly.

4) Use a reflection-only load, which doesn't actually load references.

5) Combine 3 and 4

Related branches

Changed in nunit-vs-adapter:
status: New → Triaged
importance: Undecided → High
Changed in nunit-vs-adapter:
assignee: nobody → Charlie Poole (charlie.poole)
milestone: none → 0.94
Revision history for this message
Charlie Poole (charlie.poole) wrote :

Fixed this by eliminating the pre-check entirely - the simplest thing that could possibly work!

Changed in nunit-vs-adapter:
status: Triaged → Fix Committed
Revision history for this message
Lukas Fellechner (lukas-fellechner) wrote :

I have this problem even though I reference the same nunit dll, but the fix should hopefully fix all these problems...

Changed in nunit-vs-adapter:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.