Tutorial :Stepping through ASP.NET MVC in Action (2009) - and stuck on nunit issue


I seem to have missed something - in this step through it talks through downloading nunit and changing the original MSTest reference to NUnit. Which seems fine until it talks about running the test with UnitRun from JetBrains.

I would have thought I could run nUnit to be able to run the test - but I load my project in the nUnit gui and I get "This assembly was not built with any known testing framework". This after running the Nunit- Or am I supposed to be able to run tests from within visual studio 2008?

After some research I find this: http://www.jetbrains.com/unitrun/

(ie. it seems to be saying this is no longer supported and I'm thinking JetBrains Resharper may cost money?). I'm a little rusty on my NUnit experience. So how do I go ahead and run my test? Is the error message I'm getting considered abnormal?

I've added a reference in my MvcApplication.Tests project to the nunit.framework. Is this the wrong reference to add?

Thanks :)


Adding the reference to NUnit is fine, but you need to make sure that the attributes you put on the class and test methods are those of NUnit and not MSTest. I guess this is what is happening and explains why the NUnit GUI does not find the attribute it is expecting.

Yes, Resharper costs money (but is well worth it, IMHO)


Add a reference to NUnit.Framework in your project, then use Testdriven.Net to execute/test your tests.

Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Next Post »