Upgrade MVC 3 to MVC 4

It is very simple to upgrade MVC 3 application to MVC 4. We have to follow the below steps to do it manually.

Step 1: Open web.config files that present in root folder and view folder of the application.

Step 2: Find all the place where “system.web.mvc” namespace used and change the version from to

Step 3: Do the same thing for assemblies “system.web.webpages“, “system.web.webpages.razor“, “System.Web.Helpers“, but this time need to replace version from to

Step 4: Add the below line in views/web.config under namespace tag.

Step 5: Add the below line in root web.config under appSettings tag.

and update key webpages:version from to

Step 6: In Solution Explorer, right-click the project name and then select Unload Project. Then right-click the name again and select Edit ProjectName.csproj.

Step 7: Locate the ProjectTypeGuids element and replace {E53F8FEA-EAE0-44A6-8774-FFD645390401} with {E3E379DF-F4C6-4180-9B81-6769533ABE47}.

Step 8: Save the changes, close the project (.csproj) file you were editing, right-click the project, and then select Reload Project.

Step 9: If the project references any third-party libraries that are compiled using previous versions of ASP.NET MVC, open the root Web.config file and add the following three bindingRedirect elements under the configuration section:


Leave a Reply