Monday, March 10, 2008

Fixed VS 2008 ASP.NET MVC Templates

After trying VS 2008 MVC Templates, I found that the test project cannot resolve references to System.Web.Mvc, System.Web.Routing and System.Web.Abstractions (and Rhino.Mocks if you use the NUnit & Rhino Mocks template). The reason is, in project template, they used relative path while the absolute path should be used (or maybe it has another way but I don't know).

You can easily fix the templates by extract the ZIP file, open the CSPROJ file and replace relative path to MVC and Rhino assemblies by absolute path. But you can download fixed version of the templates here. (For installation these templates, you can follow the same steps as in "ASP.NET MVC Test Framework Integration Walkthrough")

Remember, if you install Rhino Mocks and ASP.NET MVC assemblies in different folders than "C:\Program Files\Rhino.Mocks-3.4" and "C:\Program Files\Microsoft ASP.NET MVC Preview 2", you need to fix them yourself.

No comments: