Thursday, January 19, 2012

ReSharper Not Showing Any Tests?

Version 6.x of ReSharper appears to have a tendency to forget about some tests in a solution once a while (at least once a day in my case). When using “Run All Tests From Solution” it can happen that it shows only a subset of them. In extreme cases it can happen that no tests are shown in the “Unit Tests Session” window.

I’ve noticed that the behavior becomes better after removing all other extensions. I don’t feel this is very practical. The extensions I use are AnkhSVN and Powertools and I’m using Visual Studio 2010 on a 64 bit Windows 7. All software are the latest released versions and has the most recent patches or service packs applied.

I reinstalled everything but that didn’t change the behavior. When I run all unit tests outside of Visual Studio, e.g. using csUnit, it is all fine.

One way to resolve this is following these five steps:

  1. Close Visual Studio
  2. Delete the _ReSharper.* folder that is located in the folder containing your solution
  3. Start Visual Studio
  4. Reopen your solution
  5. Select “Run all tests from Solution” from the ReSharper menu

Since once in a while the web deployment functionality requires a restart of Visual Studio as well, I now have two triggers that may force me to restart Visual Studio.

Yes, it is annoying but at least now I have found this work around. Maybe it helps saving you some grief as well.