How to fix “Unit Test Runner failed to load test assembly”
- by ybbest
I encountered this issue a couple times during my recent project, every time I forgot what actually cause the issue. Therefore, I decide to write a quick blog post to make sure I can identify the issue quickly.
Problem:
Run unit test using a test runner and received a Unit Test Runner failed to load test assembly exception.
Analysis:
Basically, I have changed some code and start the test runner to run tests. The same dll have already been deployed to GAC. So the test runner actually tries to use the old version of the assembly thus could not load the assembly.
Solution:
Deploy the current version of dll to the GAC and re-run your test, it works like a charm.