1

We are trying to upgrade an mvc 2.0 application to mvc 4.0.

This is what I tried 1>Installed mvc 4.0 2>Changed the project to target .net framework 4.0.

How ever when I check the project references, the System.web.mvc being targeted is still version 2.0.0.0.

Do I manually delete these references and add them again?

developer747
  • 15,419
  • 26
  • 93
  • 147
  • Did you try to search for the answer first? Look at "[asp.net mvc 2 to mvc 4](http://stackoverflow.com/questions/9282395/asp-net-mvc-2-to-mvc-4)" for example... – Yannick Blondeau Oct 29 '12 at 15:58
  • possible duplicate of [Migrating from Asp.net MVC2 to MVC4](http://stackoverflow.com/questions/12107191/migrating-from-asp-net-mvc2-to-mvc4) – Ryan Gates Feb 20 '15 at 15:23

1 Answers1

1

Yes, delete the references to System.Web.Mvc and re-add them. This is in accordance with the release notes for upgrading from MVC 2 to MVC 3, and the same principal applies going to MVC 4.

In Solution Explorer, delete the reference to System.Web.Mvc (which points to the DLL from version 2), then add a reference to System.Web.Mvc (v3.0.0.0).

(or to v4.0.0.0 in your case)

Eric J.
  • 147,927
  • 63
  • 340
  • 553