views:

1082

answers:

1

I've installed .net 4 in the server.
Now I don't know if I must install the MVC 2 for VS2008 or what because I got this error:

Could not load file or assembly 'System.Web.Mvc, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.

+8  A: 

VS 2010 comes with MVC 2, but it's not a part of the .NET Framework proper. This means that if you go download the .NET Framework 4 redistributable, it will not include the MVC 2 runtime.

But since MVC is bin-deployable, this is fine. Your application - when deployed to a .NET 3.5 SP1 or .NET 4 server - will just copy System.Web.Mvc.dll to its /bin folder, and everything will run as expected. MVC runs just fine in Medium Trust.

Levi
I was wrong; thanks for correcting me.
SLaks
@SLaks: I got your answer first and was looking the dll all over the place #fail
Eduardo Molteni
@Levi: Thanks. Copy local and works. Haacked and team must be preparing the final release for .net 4
Eduardo Molteni
@Eduardo - There are no plans to roll the MVC framework into the .NET framework. This could change, obviously, but it's overwhelmingly likely that all future releases will continue to be out-of-band.
Levi
I mean a .net 4 compiled setup of MVC 2 ready to go to the shared assemblies folder.
Eduardo Molteni
MVC 2 is compiled against .NET 3.5 SP1, not .NET 4. (So MVC 2 will work on .NET 4, it just can't take advantage of .NET 4-specific functionality.) The first release of MVC that will be compiled against .NET 4 is MVC 3.
Levi
really? I thought that Haacked said that it will be an MVC2 compiled with .net 4 in Hanselminutes podcast, but I may be wrong.
Eduardo Molteni