Page 1 of 1

Converting MVC to MVC 2 How to quickly convert an old MVC 1.0 project to a MVC 2.0

#1 coden4fun   User is offline

  • if(coden4fun.NotTired){ ContinueToCode(); }
  • member icon

Reputation: 28
  • View blog
  • Posts: 696
  • Joined: 27-February 09

Posted 03 March 2010 - 04:14 PM

Converting to an MVC 2.0 project form an MVC 1.0 is quite simple.

Just follow the instruction below and your set.
1.) First Make a backup of your existing project.

2.) open up your .csproj or .vbproj inside your project folder. Do a Find and Replace. Find "603c0e0b-db56-11dc-be95-000d561079b0" and Replace it with "F85E285D-A4E0-4152-9332-AB1D724D3325"

3.) In the Web application root folder, edit Web.config Here we'll do another Find and Replace. Find "System.Web.Mvc, Version=" and Relace it with "System.Web.Mvc, Version=" Do this for the following Web.config file in your View folder as well.

4.) And the following bindingRedirect to the Web.config file in the application folder.
  <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
      <assemblyIdentity name="System.Web.Mvc" publicKeyToken="31bf3856ad364e35"/>
      <bindingRedirect oldVersion="" newVersion=""/>

5.) Open it up in either Visual Studios 2008 Pro SP1 or Visual Studios 2010 RC and find the reference of System.Web.MVC in your Reference folder. Delete it and replace it with the System.Web.MVC Version = that is in your .Net References.

6.) Create a new ASP.Net MVC 2 project and copy all files in the Script folder to your Scripts folder in your original project.

7.) Compile and run the application.

Is This A Good Question/Topic? 0
  • +

Page 1 of 1