Pages

Apr 21, 2010

How to upgrade ASP NET MVC 1 apps to ASP NET MVC 2

Using Wizard for ASP.NET MVC 1.0 on Visual Studio 2008 SP1
Follow this post: "Migrating ASP.NET MVC 1.0 applications to ASP.NET MVC 2 RTM"

Manually Upgrading an ASP.NET MVC 1.0 Project:

  • Change the project type to an ASP.NET MVC 2 project (Changeset 2)
  • Update the root [~/web.config]: (Changeset 3)
    • Update references to ASP.NET MVC 2
    • Update to have a binding redirect from ASP.NET MVC 1.0 to ASP.NET MVC 2
  • Update the [~/Views/web.config]: (Changeset 4)
    • Update references to ASP.NET MVC 2
  • Update project references to ASP.NET MVC 2 (Changeset 5)
  • Add or update the CSS & JavaScript files based on [Breaking Changes] section: (Changeset 6, Changeset 7)
    • New CSS classes were added in the Site.css file
    • Helpers now return an MvcHtmlString object
Note: you can get the original source code from here. Or you can visit AspNetMvc2Samples public workspace in Assembla.

    10 comments: