Migrating ASP.NET MVC 1.0 applications to ASP.NET MVC 2 RTM

ASP.NET MVC 2 RTM has just been released! More info on ScottGu's blog.

I have updated the MVC App Converter to convert projects from ASP.NET MVC 1.0 to ASP.NET MVC 2 RTM.

This should be last the last major change to the MVC App Converter that I released previews of in the past several months.

MVC App Converter screen shot

Download

The app is a single executable: Download MvcAppConverter-MVC2RTM.zip (255 KB).

Usage

The only requirement for this tool is that you have .NET Framework 3.5 SP1 on the machine. You do not need to have Visual Studio or ASP.NET MVC installed (unless you want to open your project!). Even though the tool performs an automatic backup of your solution it is recommended that you perform a manual backup of your solution as well.

  • To convert an ASP.NET MVC 1.0 project built with Visual Studio 2008 to an ASP.NET MVC 2 project in Visual Studio 2008 perform these steps:
    • Launch the converter
    • Select the solution
    • Click the “Convert” button
  • To convert an ASP.NET MVC 1.0 project built with Visual Studio 2008 to an ASP.NET MVC 2 project in Visual Studio 2010:
    • Wait until Visual Studio 2010 is released (next month!) and it will have a built-in version of this tool that will run automatically when you open an ASP.NET MVC 1.0 project
    • Perform the above steps, then open the project in Visual Studio 2010 and it will perform the remaining conversion steps

What it can do

  • Open up ASP.NET MVC 1.0 projects from Visual Studio 2008 (no other versions of ASP.NET MVC or Visual Studio are supported)
  • Create a full backup of your solution’s folder
  • For every VB or C# project that has a reference to System.Web.Mvc.dll it will (this includes ASP.NET MVC web application projects as well as ASP.NET MVC test projects):
    • Update references to ASP.NET MVC 2
    • Add a reference to System.ComponentModel.DataAnnotations 3.5 (if not already present)
  • For every VB or C# ASP.NET MVC Web Application it will:
    • Change the project type to an ASP.NET MVC 2 project
    • Update the root ~/web.config references to ASP.NET MVC 2
    • Update the root ~/web.config to have a binding redirect from ASP.NET MVC 1.0 to ASP.NET MVC 2
    • Update the ~/Views/web.config references to ASP.NET MVC 2
    • Add or update the JavaScript files (add jQuery, add jQuery.Validate, add Microsoft AJAX, add/update Microsoft MVC AJAX, add Microsoft MVC Validation adapter)
  • Unknown project types or project types that have nothing to do with ASP.NET MVC will not be updated

What it can’t do

  • It cannot convert projects directly to Visual Studio 2010 or to .NET Framework 4.
  • It can have issues if your solution contains projects that are not located under the solution directory.
  • If you are using a source control system it might have problems overwriting files. It is recommended that before converting you check out all files from the source control system.
  • It cannot change code in the application that might need to be changed due to breaking changes between ASP.NET MVC 1.0 and ASP.NET MVC 2.

Feedback, Please!

If you need to convert a project to ASP.NET MVC 2 please try out this application and hopefully you’re good to go. If you spot any bugs or features that don’t work leave a comment here and I will try to address these issues in an updated release.

Published Wednesday, March 10, 2010 10:00 PM by Eilon
Filed under: , ,

Comments

# Migrating ASP.NET MVC 1.0 applications to ASP.NET MVC 2 RTM - Eilon Lipton

Thursday, March 11, 2010 1:20 AM by DotNetShoutout

Thank you for submitting this cool story - Trackback from DotNetShoutout

# ASP.NET MVC Migration Tool « Osman Celik's Web Site

Thursday, March 11, 2010 5:53 PM by ASP.NET MVC Migration Tool « Osman Celik's Web Site

Pingback from  ASP.NET MVC Migration Tool « Osman Celik's Web Site

# ASP.NET MVC 2 ist RTM (für VS2008) | Code-Inside Blog

Thursday, March 11, 2010 6:33 PM by ASP.NET MVC 2 ist RTM (für VS2008) | Code-Inside Blog

Pingback from  ASP.NET MVC 2 ist RTM (für VS2008) | Code-Inside Blog

# ASP.NET MVC 2 RTW !!! ただし、現在は VS2008 SP1 向けのみ

Thursday, March 11, 2010 7:15 PM by ナオキにASP.NET(仮)

ASP.NET MVC 2 が MIX 前に RTW されました。 (ダウンロードセンターでは RTM と書かれてますね。) インストーラーのダウンロードはこちらから。 www.microsoft.com/.../details.aspx

# re: Migrating ASP.NET MVC 1.0 applications to ASP.NET MVC 2 RTM

Friday, March 12, 2010 3:29 AM by Troels Thomsen

Please let backing up be configurable. Hopefully, we all use some kind of source control, so it is completely irrelevant (and causing bad performance for a huge solution).

# Migrating ASP.NET MVC 1.0 applications to ASP.NET MVC 2 RTM

Friday, March 12, 2010 4:45 AM by Blog's Massimiliano Bellisario

Migrating ASP.NET MVC 1.0 applications to ASP.NET MVC 2 RTM

# Migrating ASP.Net MVC 1 to ASP.Net MVC 2 « model musing

Saturday, March 13, 2010 6:36 AM by Migrating ASP.Net MVC 1 to ASP.Net MVC 2 « model musing

Pingback from  Migrating ASP.Net MVC 1 to ASP.Net MVC 2 «  model musing

# Migrating ASP.Net MVC 1 to ASP.Net MVC 2 « Cennest Speaks

Pingback from  Migrating ASP.Net MVC 1 to ASP.Net MVC 2 «  Cennest Speaks

# dexter su MVC 2.0 :)

Monday, March 15, 2010 7:08 AM by Il blog di ugo lattanzi

dexter su MVC 2.0 :)

# Tool di migrazione asp.net mvc 1.0 a mvc 2.0

Tuesday, March 16, 2010 3:52 AM by Alessage

Tool di migrazione asp.net mvc 1.0 a mvc 2.0

# re: Migrating ASP.NET MVC 1.0 applications to ASP.NET MVC 2 RTM

Tuesday, March 16, 2010 1:26 PM by Fabrizio Battaglia

Hi Scott, I'm using the your tool for converting a middle-size project. Everything seems to be went good, except for a little issue: opening the just modified web.config I recived a message regarding the line feed type: VS don't recognises the standard LFCR in some place in the file. However VS corrects the error automatically and I haven't experience other bad things.

Thank you a lot for your tool, and your great web casts.    

# re: Migrating ASP.NET MVC 1.0 applications to ASP.NET MVC 2 RTM

Wednesday, March 17, 2010 5:22 PM by Steve Gentile

Thank you for providing this!

Fantastic

# re: Migrating ASP.NET MVC 1.0 applications to ASP.NET MVC 2 RTM

Friday, March 19, 2010 4:01 AM by WestWeb

Great tool, went flawless!

# re: Migrating ASP.NET MVC 1.0 applications to ASP.NET MVC 2 RTM

Friday, March 19, 2010 4:41 PM by goodbyeforms

Works like a charm, thanks. Couldn't be easier. And if you're using stuff like Html.RenderAction from the futures project for MVC 1, don't foget to download the new microsoft.web.mvc for MVC 2 from

aspnet.codeplex.com/.../41742. (RenderAction is now part of mvc 2 proper.)

# re: Migrating ASP.NET MVC 1.0 applications to ASP.NET MVC 2 RTM

Saturday, March 20, 2010 11:39 AM by tx

thanks ! good tool,

if using VSS (source safe) make sure you checkout all files.

# re: Migrating ASP.NET MVC 1.0 applications to ASP.NET MVC 2 RTM

Sunday, March 21, 2010 2:49 AM by assistant

I want't to know how to get the common contrl forexample freetextbox,fckeditor,aspnetpager,and so on to embed the mvc.

# Migrating ASP.NET MVC 1.0 applications to ASP.NET MVC 2 RTM - NitRiX Reloaded

Pingback from  Migrating ASP.NET MVC 1.0 applications to ASP.NET MVC 2 RTM  - NitRiX Reloaded

# Enlaces de Marzo: ASP.NET, ASP.NET MVC, AJAX, Visual Studio, Silverlight « Thinking in .NET

Pingback from  Enlaces de Marzo: ASP.NET, ASP.NET MVC, AJAX, Visual Studio, Silverlight « Thinking in .NET

# Nice Learning Resources: ASP.NET, ASP.NET MVC, AJAX, Visual Studio, Silverlight - NitRiX Reloaded

Pingback from  Nice Learning Resources: ASP.NET, ASP.NET MVC, AJAX, Visual Studio, Silverlight  - NitRiX Reloaded

# Полезные ссылки 2

Tuesday, March 30, 2010 9:15 AM by Блог Краковецкого Александра

Свежая подборка ссылок (часть ссылок взята из блога Скотта Гатри ). Microsoft Почему я люблю Microsoft

# ASP .NET MVC2 Changes: GetControllerInstance & DataAnnotationsModelBinder | Taswar Bhatti Blog

Pingback from  ASP .NET MVC2 Changes: GetControllerInstance & DataAnnotationsModelBinder | Taswar Bhatti Blog

# Migrating Asp.net MVC Projects from MVC 1.0 to 2.0 · { Code: Impossible }

Pingback from  Migrating Asp.net MVC Projects from MVC 1.0 to 2.0 ·  { Code: Impossible }

# re: Migrating ASP.NET MVC 1.0 applications to ASP.NET MVC 2 RTM

Wednesday, April 21, 2010 8:51 PM by Steve Whalen

Great tool! Thank you!

# Migrating an MVC1 app to MVC2 « Activate Your Glutes Tech

Pingback from  Migrating an MVC1 app to MVC2 « Activate Your Glutes Tech

# re: Migrating ASP.NET MVC 1.0 applications to ASP.NET MVC 2 RTM

Sunday, May 02, 2010 11:53 AM by James Randall

Worked great for me - thanks!

# March 21st Links: ASP.NET, ASP.NET MVC, AJAX, Visual Studio, Silverlight | OOP – Object Oriented Programing

Pingback from  March 21st Links: ASP.NET, ASP.NET MVC, AJAX, Visual Studio, Silverlight | OOP – Object Oriented Programing

# re: Migrating ASP.NET MVC 1.0 applications to ASP.NET MVC 2 RTM

Tuesday, May 11, 2010 9:41 PM by Clifton Mullen

Clear usage notes, worked great.  Thanks!

# digitalMoto.net » MVC App Conversion.

Sunday, May 23, 2010 1:50 PM by digitalMoto.net » MVC App Conversion.

Pingback from  digitalMoto.net » MVC App Conversion.

# Tests failing with ArgumentNullException on controllerContext

Tuesday, June 01, 2010 2:57 PM by manik-software

Tests failing with ArgumentNullException on controllerContext

# re: Migrating ASP.NET MVC 1.0 applications to ASP.NET MVC 2 RTM

Wednesday, June 09, 2010 5:51 AM by cepeleon

Awesome utility, thanks!

# Upgrading Suteki Shop to ASP.NET MVC 2

Wednesday, June 09, 2010 11:47 AM by Upgrading Suteki Shop to ASP.NET MVC 2

Pingback from  Upgrading Suteki Shop to ASP.NET MVC 2

# Migrating ASP.NET MVC 2 applications to ASP.NET MVC 3 Preview 1

Wednesday, July 28, 2010 1:34 PM by Eilon Lipton's Blog

ASP.NET MVC 3 Preview 1 has just been released! More info on ScottGu's blog . Download ASP.NET MVC 3

# ASP.NET MVC / [??????????????] ???????????????? ???????????????????? ?? ASP.NET MVC 2 ???? ASP.NET MVC 3 Preview 1 « ?????? ?????????? ????????

Pingback from  ASP.NET MVC / [??????????????] ???????????????? ???????????????????? ?? ASP.NET MVC 2 ???? ASP.NET MVC 3 Preview 1 «  ?????? ?????????? ????????

Leave a Comment

(required) 
(required) 
(optional)
(required)