Saturday, October 04, 2008

Getting MVC setup

This is all about getting MVC Preview 5 running: http://www.codeplex.com/aspnet/Release/ProjectReleases.aspx?ReleaseId=16775

ASP.NET Project page: http://www.asp.net/mvc/

Had a bit of trouble getting MVC setup. A nasty little bugger going by the name of "Cannot load assembly ..." etc. You know the score.

One post on forums.asp.net sorted it all out:

http://forums.asp.net/p/1314519/2596828.aspx

I short, do the following:

Go to: C:\Documents and Settings\All Users\Start Menu\Programs\Microsoft\Microsoft Visual Studio 2008\Visual Studio Tools

Run: Visual Studio 2008 Command Prompt

Go to: C:\Program Files\Microsoft ASP.NET\ASP.NET MVC CodePlex Preview 5\Assemblies

Type:
C:\Program Files\Microsoft ASP.NET\ASP.NET MVC CodePlex Preview 5\Assemblies>gacutil -if System.Web.Routing.dll

And:
C:\Program Files\Microsoft ASP.NET\ASP.NET MVC CodePlex Preview 5\Assemblies>gacutil -if System.Web.Abstractions.dll

That should install the DLL's into the GAC (Global Assembly Cache) and cause .NET 3.5 to find them suitably.