Quantcast
Channel: IT Bytes » TypeMock
Viewing all articles
Browse latest Browse all 6

“Bad class token” when running (N) unit tests with TypeMock

$
0
0
Had a strange problem today, some of the automated build tests were failing with "Bad class token". However, when I went onto the build machine and ran them via NUnit GUI they worked fine. The difference is that we’d normally run the tests via Type Mock to ensure all the mocks work correctly. When I ran NUnit GUI via TypeMock the tests would fail…well actually sometimes they’d work, sometimes they wouldn’t. Yes that’s a lovely position to be in <gulp>. The obvious cause to these problems was that I’d just upgraded Visual Studio 2008 to SP1. So I manually rebuilt the whole solution and everything seemed to spring back to life again. Odd problem but hopefully now someone else won’t have to sit around scratching their head like I had to!
 
[Edit]
I blogged too soon. Turns out I still have the problem, but only with automated builds, if I build by hand (on the build server) then everything runs fine…weird.

[Edit]
Turns out I "just" needed to upgrade TypeMock to the latest version.

 



Viewing all articles
Browse latest Browse all 6

Trending Articles