开发者

adding a 3rd party test framework for ASP.NET MVC3 and Razor view engine

Would like to add a third party test framework (such as NUnit or MbUnit) to the drop-down list of test projects for the ASP.NET MVC3 type project in Visual Studio 2010.

adding a 3rd party test framework for ASP.NET MVC3 and Razor view engine

This had worked before for ASP.NET MVC2 and prior, but the msdn instructions are not accurate and does not work开发者_开发技巧. Creating the registry keys in the HKEY_CURRENT_USER seem to delete the keys every time the VS-2010 starts, the HKEY_LOCAL_MACHINE does not follow the same tree structure.

Does anyone know how to add a third party framework under ASP.NET MVC3?

adding a 3rd party test framework for ASP.NET MVC3 and Razor view engine

This resource and this rant do not work for MVC3


sad to hear it doesn't work for you. Regarding the problems about having the HKEY_CURRENT_USER and loosing the pasted key each time Visual Studio starts I would like you to read about it here: All your RegKeys Are Belong To Us At the end it says:

If you edit a key in 10.0_Config, Visual Studio will (quite possibly) delete it on startup.

Guess that's what you see while editing and starting. Next thing is such a suggestion - not sure about that - but are you having UAC enabled and run Visual Studio in RANU (= run as normal user) mode? This link: Developing Packages as a Normal User (or How I Learned to Love UAC) shows up, that Visual Studio introduced a certain switch which affetcs it to look into different registry places:

When running with the /RANU switch (along with /rootsuffix Exp in this case), Visual Studio will instead look in the following locations:

Package Registration : HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\9.0Exp\Configuration User Settings: HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\9.0Exp\UserSettings

Last post I like to give you with this describes the startup (registry and pkgdef merge) routine of Visual Studio: blogs.msdn.com/b/aaronmar/archive/2009/06/05/pkgdef-and-the-experimental-instance-in-vs-2010.aspx [sorry - can only post 2 links]

If you could provide me with some more informations about Setup (UAC? anything else to be mentioned) I will try to provide a package update which will fix this. The curious thing is that I am running VS2010 Ultimate on Win 7 64bit - and the installer works ok. Only thing - I am not running in UAC ;-)

Marcus.


Here is a really good blog post explaining how to add NUnit as another 3rd party test framework to the ASP.NET MVC 3 (up to RTM) project's dropdown list:

  • ASP.NET MVC 3 with NUnit Testproject

This post also provides a full package to download with all the required files (intstall batch, registry keys and the Visual Studio template) to easily set it up by yourself.


I understand what you're trying to do, its a little complicated for what you get out of it though. If you zip up a project template based on whatever testing framework you use and drop it in the correct folder, you can simply add your templated project to your initial Mvc 3 solution after its created. It seriously might take an extra 5 secs, plus you can use it for any other type of solution you might want tests for.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜