11

I'm using VS2010 (with windows 7).

Every time I try to run a unit test it stays on "Pending" and the test cannot be completed.

I tried to follow this msdn instructions.

I tried debugging test method (test view/debug selection), set breakpoints, but VS2010 indicates: the breakpoint will not currently be hit... I'm in debug configuration.

Any advice?

Franziee
  • 621
  • 11
  • 28

2 Answers2

17

If you have VS2010 and VS2012 installed on the same box you need to install SP1 for VS2010 or the unit tests sometimes won't work. (SP1 available here.)

kmote
  • 16,095
  • 11
  • 68
  • 91
S Walsh
  • 450
  • 4
  • 13
  • More details about this situation may be found on [the MSDN blog](http://blogs.msdn.com/b/aseemb/archive/2012/09/08/not-able-to-run-unit-tests-when-visual-studio-2010-and-visual-studio-2012-are-installed-side-by-side.aspx) – kmote Oct 24 '13 at 20:29
  • 1
    That's the solution for VS2010 and VS2013, too. – Christian St. Sep 23 '14 at 12:56
1

Try to do a clean solution (right click solution and clean). And then do a rebuild. That should solve the problem.

Keethanjan
  • 365
  • 1
  • 7
  • 3
    I did it but it didn't help, still pending. I don't know how much time the run needs but I think it wolud be done in a short time. And still pending... – Franziee Oct 02 '12 at 07:55
  • 1
    Still pending, and when I try stoping the test run, it dont't want to stop himself. I have to restart VS2010 to exit from this state. – Franziee Oct 02 '12 at 08:22