Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Unit Tests are failing on a "Build failed" in the Session window with no message providing a reason for failure in Visual Studios 2010

I had recently installed VS 2010 on my local machine, and cannot seem to get Resharper 5.1 and the unit tests to work correctly. Whenever I try and run Unit tests I get a "Build failed" with the test icon remaining gray, but with no info in the output window and no discernible reason why.

The Unit Tests run perfectly fine when doing a nant build.

Running a previous branch of the code on VS 2008 does not have this same issue as a result.

Any ideas?

like image 662
SFW Avatar asked May 19 '11 15:05

SFW


2 Answers

In my case I was missing a DLL that was not added to the project. I added it, cleaned and build and everything was okay.

like image 190
AzzamAziz Avatar answered Nov 16 '22 01:11

AzzamAziz


Check your build configuration. If you're using a build configuration that is set to not build your test projects (like your release configuration) then the Resharper test runner will fail this way. The output looks like a perfectly successful build but if you inspect the output you'll find your tests are not in it.

Another symptom of this issue is if you set the test runner to not build as suggested above, next time you attempt to run the test it will be crossed out in the test runner.

Build configurations can be found in Build->Configuration Manager in Visual Studio.

like image 29
Martin Doms Avatar answered Nov 16 '22 01:11

Martin Doms