Site Loading

Error upgrading from MVC 3 to MVC4

We recently upgraded one of our applications from MVC 3 to MVC 4. In development we use the Visual studio development server and the upgrade seemed fine. When we deployed the files to our staging environment we had the following error:

This seemed happen only when we navigated to an area. After much gnashing of teeth we found that the web.config in each View folder was still referencing the version 3:

<add assembly="System.Web.Mvc, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL" namespace="System.Web.Mvc" tagPrefix="mvc" />

To Fix this, just update the version.

Close