Upgrading from MVC2 to MVC5 project

521 views Asked by At

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,

2

There are 2 answers

4
Saravanan On BEST ANSWER

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

0
user464291 On

I did go through the steps from 2 to 3 using the below blog.

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

However i had an asset folder with all my jquery, images, site,css and... so i did not add the followings and Package folder. ince at this point i just want to have minimal changes to source code.

packages.config, /scripts/.js and /Content/themes/.*