Can't test multiple assemblies referencing different NUnit versions
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 |
Changed in nunit-vs-adapter: | |
status: | Fix Committed → Fix Released |
Fixed this by eliminating the pre-check entirely - the simplest thing that could possibly work!