views:

1578

answers:

4

I was wondering if there's a way (even a manual one) to setup an ASP.NET MVC project with unit tests under Visual Web Developer Express 2008 SP1.

A: 

Visual Web Developer does not support C# test projects, which essentially a ASP.NET MVC test project is. However you can test your application with Visual C# Express referencing the assembly containing the models and controllers.

Mehrdad Afshari
Actually you are right. The only difference is that solutions in VWD might contain more than one project - it just needs to be "enabled" (well,.. sort of). And that work is being done by Visual C# Express when adding a new Class Library project to it :D
Matthias Hryniszak
+10  A: 

ASP.NET MVC 1.0 (Release version) comes bundled with templates for Visual Web Developer Express 2008. Not sure if SP1 is required or not, though.

Matthias Hryniszak
You should mark this as the answer. :)
Haacked
A: 

For a while I've been using a solution described here. It works like a charm with Visual Web Developer :D Actually it works exactly like the full version of VisualStudio!

It gives you immediate access to NUnit Framework in your unit test project along with NUnit Mocks (I know it's not the best one but it comes with NUnit anyways so there's no point in denying its existence).

Matthias Hryniszak
A: 

You need Visual Web Developer Express 2008 SP1 and, as per the VWDExpress Readme: To see "New Project" and "Open Project" on the File menu, you must manually add these commands to the menu by right-clicking the File menu, clicking "Customize...", selecting the "Commands" tab, selecting the "File" category, and then dragging the "New Project" and "Open Project" to the File menu ...

Tales