<ul>
<li>I have nUnit installed.</li>
<li>I have VS2008 Team Edition installed.</li>
<li>I have ASP.Net MVC Preview 4 (Codeplex) installed.</li>
</ul>

<p>How do I make Visual Studio show me nUnit as a testing framework when creating a new MVC project?  At this point I still only have the Microsoft Testing Framework as a choice.  </p>

<p><strong>Update:</strong> I installed nUnit 2.5, but still with no success.  From what I've found Googling, it would seem I need to <em>create</em> templates for the test projects in order for them to be displayed in the "Create Unit Test Project".  I would have thought that templates be readily available for nUnit, xUnit, MBUnit, et. al.   Also, it looks like I need to created registry entries.  Anybody have any additional information?</p>

<p><strong>Update:</strong> I determined the answer to this through research and it's posted below. </p>

[{'answer_id': 21143, 'author': 'Jon Limjap', 'author_id': 372, 'author_profile': 'https://Stackoverflow.com/users/372', 'pm_score': 0, 'selected': False, 'text': '<p>Do install <a href="http://testdriven.net" rel="nofollow noreferrer">Testdriven.net</a> to integrate NUnit with Visual Studio. MbUnit and later versions of NUnit also contain project templates for unit tests.</p>\n\n<p>You can use those project templates to create a test project and then reference to your ASP.NET MVC project and be able to test its code.</p>\n'}, {'answer_id': 23481, 'author': 'Peter Meyer', 'author_id': 1875, 'author_profile': 'https://Stackoverflow.com/users/1875', 'pm_score': 5, 'selected': True, 'text': '<p>After a bunch of research and experimentation, I\'ve found the answer.  </p>\n\n<ul>\n<li>For the record, the current release of nUnit 2.5 Alpha <em>does not</em> seem to contain templates for test projects in Visual Studio 2008. </li>\n<li>I followed the directions <a href="http://vishaljoshi.blogspot.com/2008/02/aspnet-mvc-test-framework-integration.html" rel="noreferrer">here</a> which describe how to create your own project templates and then add appropriate registry entries that allow your templates to appear in the drop-down box in the <em>Create Unit Test Project</em> dialog box of an MVC project.</li>\n</ul>\n\n<p>From a high level, what you have to do is:</p>\n\n<ol>\n<li>Create a project</li>\n<li>Export it as a template (which results in a single ZIP archive)</li>\n<li>Copy it from the local user\'s template folder to the Visual Studio main template test folder</li>\n<li>Execute <strong>devenv.exe /setup</strong></li>\n<li>Run <strong>regedit</strong> and create a few registry entries.  </li>\n</ol>\n\n<p>So much for the testing framework selection being easy!  Although, to be fair MVC is not even beta yet.  </p>\n\n<p>After all that, I did get the framework of choice (NUnit) to show up in the drop down box.  However, there was still a bit left to be desired:</p>\n\n<ul>\n<li>Although the test project gets properly created, it did not automatically have a project reference to the main MVC project.  When using  <em>Visual Studio Unit Test</em> as the test project, it automatically does this.</li>\n<li>I tried to open the ZIP file produced and edit the MyTemplate.vssettings file as well as the .csproj project file in order to correct the aforementioned issue as well as tweak the names of things so they\'d appear more user friendly.  This for some reason does not work.  The ZIP file produced can not be updated via WinZip or Win-Rar -- each indicates the archive is corrupt.  Each can extract the contents, though.  So, I tried updating the extracted files and then recreating the ZIP file.  Visual Studio did not like it.</li>\n</ul>\n\n<p>So, I should probably read <a href="http://msdn2.microsoft.com/en-us/library/s365byhx.aspx" rel="noreferrer">this</a> as well which discusses making project templates for Visual Studio (also referenced in the blog post I linked to above.)  I admit to being disappointed though; from all the talk about MVC playing well with other testing frameworks, etc, I thought that it\'d be easier to register a 3rd party framework.</p>\n'}, {'answer_id': 23762, 'author': 'Dale Ragan', 'author_id': 1117, 'author_profile': 'https://Stackoverflow.com/users/1117', 'pm_score': 1, 'selected': False, 'text': '<p>Man, they have VS 2008 project template listed in their <a href="http://nunit.com/index.php?p=releaseNotes&amp;r=2.5" rel="nofollow noreferrer">release notes</a>.  I guess that doesn\'t mean they have it integrated with the dialog yet.</p>\n\n<p>I use <a href="http://www.mbunit.com/" rel="nofollow noreferrer">MbUnit</a> with <a href="http://www.gallio.org/" rel="nofollow noreferrer">Gallio</a> and everything worked like a charm.  I had to install an Alpha of Gallio and MbUnit and when I read the above in the release notes, I figured they implemented it also.</p>\n\n<p>Just keep a look out on nUnit\'s site for future alpha releases.  I am sure they\'ll have it implemented soon.  You could also implement the feature yourself and submit a patch. :-)</p>\n'}, {'answer_id': 783141, 'author': 'smaclell', 'author_id': 22914, 'author_profile': 'https://Stackoverflow.com/users/22914', 'pm_score': 1, 'selected': False, 'text': '<p>Although they do not have one bundled with the framework here is a link to post containing a download to automatically create the test project for "NUnit with moq" for you <a href="http://johnnycoder.com/blog/2009/04/01/aspnet-mvc-test-template-project-for-nunit-and-moq/" rel="nofollow noreferrer">NUnit with Moq</a></p>\n\n<p>(did not work right away on my computer, W7 Beta, make sure you use elevated permissions)</p>\n'}]
['https://Stackoverflow.com/questions/21137', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/1875/']