Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What happened to System.Web.Mvc.dll?

A colleague emailed me an example ASP.NET MVC project that won't build on my machine as it contains a reference to System.Web.Mvc.dll

In the .csproj file:

<Reference Include="System.Web.Mvc, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL" />

I have VS2008 SP1 installed and can create new ASP.NET MVC web applications. However these don't include a reference to this assembly.

So, does anyone know in what version(s) of ASP.NET MVC this assembly exists, and what I should do to get this project to build?

Edit

How can I find out what version of ASP.NET MVC is installed on a machine?

like image 797
Richard Ev Avatar asked Mar 24 '09 15:03

Richard Ev


2 Answers

MVC just went RTM. You may be running an earlier version. Get the latest one.

ASP.NET MVC 1.0 includes the assembly System.Web.Mvc.dll

like image 139
John Saunders Avatar answered Oct 25 '22 18:10

John Saunders


To find out what version of MVC is installed:

Search Program Files\Microsoft ASP.NET for System.Web.Mvc.dll.

It should be in a folder that has the release name on it or failing that right click and check the properties.

To fix your problem:

  1. From within Visual Studio expand the references section and delete the current reference to System.Web.Mvc (right click "Remove").
  2. Right click on References and select "Add Reference"
  3. Select System.Web.MVC from the .NET tab.
  4. Rebuild your application.

It should now compile and run.

like image 25
ChrisF Avatar answered Oct 25 '22 19:10

ChrisF