Friday, March 27, 2015

Debug Test

I upgraded to Visual Studio 2012 Ultimate a few weeks ago so I could generate a couple of UML diagrams from the code I had already written (yes, I know that's a backward process, leave me alone).  Anyway, after I upgraded I found that I couldn't build my solution anymore because of the test projects I had.  Everything worked fine before I upgrade, then didn't work fine after I upgraded.

It turns out the fix was pretty simple.  I found it here, and reproduced the answer in my blog in case for some reason Stack loses the answer.

"I was getting the same output after upgrading a test project from VS 2010 to VS 2012 Ultimate Update 3. The message was displayed in Test Output window after using MSTest command to Debug Selected Tests.
I tried to debug tests using Resharper 8 Unit Test Session window. The message in the result window was "Test wasn't run".
The solution that helped me was to modify the test project settings to enable native code debugging as instructed at this link: Uncaught exception thrown by method called through reflection
In case the link does not work:
  1. Go to the project right click and select properties.
  2. Select 'Debug' tab on the left.
  3. Go to ‘Enable Debuggers’ on the bottom
  4. Check ‘Enable Native code debugging’ (or 'Enable unmanaged code debugging', depends on version) check box
Thanks to GalDude33 for posting the solution."
And the answer I just copy/pasted was posted by Branko on October 3, 2013.

No comments:

Post a Comment