Unable to load unit test - the assembly was not built with any known testing framework

Today, while working on some unit tests I encountered an issue I had not encountered before. After setting up a testing fixture and a base test(s) on a project, the test(s) failed to load in the NUnit GUI Test Runner.

 

An NUnit dialog stated:
Not a Test Assembly
The assembly was not built with any known testing framework

 

At first the thought was that the issue might be with the version of NUnit framework. Perhaps it was a mismatch with the GUI Runner version? This was not the case. This was a new install on a server that had never had the NUnit framework installed.

A second thought was that there might be an issue with the decorations of the unit test class but this was disproven when I opened the assembly using Reflector. The unit test class and test methods did exist in the assembly. And this was the assembly I was trying to open with the GUI Runner.  So why couldn't NUnit "see" the unit tests?

After speaking with a co-worker we realized that the issue was that there was a second assembly in the GAC that was causing the conflict. This project was part of a bigger solution and this solution installed the assembly into the GAC. It became clearer that the issue was the GAC version when I checked the Tools | Test Assemblies in the GUI Runner. There was indeed a reference (Path:) to the assembly in the GAC. After uninstalling the assembly from the GAC the GUI Runner was able to load the test(s).


Feedback

No comments posted yet.


Post a comment





 

Please add 4 and 8 and type the answer here: