Search code examples
.netasp.net-mvcmodel-view-controllerasp.net-mvc-2asp.net-mvc-5.1

Upgrading from MVC2 to MVC5 project


Could someone please help me how I can upgrade and MVC2 application to MVC5? Please consider that I had never had any experience with upgrade before. I do not want to do rewrite only upgrade to MVC5. I have Visual studio 2010 and Visual studio 2019. Do I need to install other Visual studio versions? Can I directly upgrade or I have to go step by step from MVC2 to 3 , 4 and then 5? I also had an idea to upgrade all the project step by step in visual studio 2019. for example first update everything to .net frame work 4 then 4.5 and then 4.7.2. I am not sure what extra steps I have to take and consider?

Any idea and help would be much appreciated.

Thanks,


Solution

  • This has to be done in phases, migrating from 2 to 3 which require tooling upgrade (already taken care of by you having latest vs 2019). This will require you to upgrade dlls, change the project files. Please go through the release notes to see for any breaking changes etc.. After a thorough understanding, you can get this done.

    Ex: Steps to upgrade from MVC 2 to MVC 3 https://learn.microsoft.com/en-us/aspnet/whitepapers/mvc3-release-notes#upgrading