by DRohm
17. October 2009 16:29
I figure I would share this as I’ve been having a heck of a time adding the NUnit test framework to ASP.NET MVC project in VS2008 Professional. I’m running Windows 7 RTM 64-bit and most of the examples on the web don’t take into account the differences associated with a 64-bit OS. So keep in mind this template is for a 64-bit OS, specifically Windows 7.
To start, the path in the registry where the NUnit entries need to get added is:
HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\9.0\MVC\TestProjectTemplates\NUnit\C#
Also, the template zip file needs to get copied to the following folder:
C:\Program Files (x86)\Microsoft Visual Studio 9.0\Common7\IDE\ProjectTemplates\CSharp\Test\1033
A lot of people instruct people to place it one directory above the one I listed, which wouldn’t work for some reason. I zipped everything up so just download the zip file, unzip it, and run the regnunittomvc.bat to install. Also keep in mind that this will work with any version of NUnit. I just installed this with NUnit 2.5.2.9222 and it worked beautifully. I also included Rhino.Mocks with this template also (version 3.6). Enjoy.