Upgrade your existing ASP.NET MVC4 application to MVC5

2013-12-09

To upgrade your existing MVC 4 application to MVC 5 you need to go through a number of steps to replace the references and patch the web.config. These steps are clearly explained in the original post, but when you're done you'll initially loose the handy context menu items to add controllers and views. You must take a few additional steps to complete the process.

After walking through all the steps mentioned, make sure your project has the following ProjectTypeGuids:

<projecttypeguids>
     {349c5851-65df-11da-9384-00065b846f21};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}
</projecttypeguids>

Now, if you want to keep using Visual Studio 2012, you'll loose the "Add View" and "Add Controller" context menu options, they'll be working just fine in Visual Studio 2013 which coomes with MVC5 support built-in. To get them back in Visual Studio 2012 you need to install the following items:

  1. Visual Studio 2012 Update 4
  2. Web Tools 2013.1 for Visual Studio 2012 (Web Platform Installer | Direct Download)

To check what other cool features you'll gain by upgrading, check out the release post.

Source: StackOverflow
 

Most Reading