0
votes

I am trying to use NUnit for unit testing in my code base. When I try to run my test cases using ReSharper, I get:

"System.IO.FileNotFoundException: Could not load file or assembly 'ServicesTests.dll' or one of its dependencies.

ServicesTests is my class lib for my unit tests.

I have also tried to install the NUnit Test Adapter as described here but do not see my test cases in the Test Explorer.

Any ideas on what might be happening? Below are images of my class library from the solution explorer, the test explorer, ReSharper screen.

enter image description here

enter image description here

enter image description here

4

4 Answers

0
votes

I was able to test using Nunit3 and VS2015 with Test Explorer after I changed the type of class library I was creating. Initially I was creating a Class Library (Package) and when I switched to Class Library it worked (see image below). I am still not able to use Resharper since I am using Nunit3 beta and that is currently unsupported by Resharper.

enter image description here

0
votes

I have a similar issue also. The best answer I've come across to solve it is try and rebuild the solution (cleans and builds), or just resort to MS Test. It's a pain to convert the tests though...

Hope this helps.

EDIT:

My NUnit runs, but no tests "exist", despite having a project, classes, and methods all correct.

0
votes

ReSharper does not support running unit tests in DNX projects https://youtrack.jetbrains.com/issue/RSRP-446679.

0
votes

I know this is an old question but I had a similar issue recently in VS 2017. Use the Fusion Log Viewer (aka "Assembly Binding Log Viewer") to see what assembly is failing to load:

Assembly Binding Log Viewer