views:

577

answers:

2

Is Visual Studio 2010 compatible with MVC 1.0


Hello guys,

Thanks for reading in advance.

I'm working with a MVC 1.0 project and VS2008.

I will be very glad to upgrade to VS2010, but I'm doubting about its compatibility with MVC 1.0.

Have you done it? How did it result?

+2  A: 

Visual Studio 2010 will come with ASP.NET MVC 2.0 out of the box, so your best bet is converting your existing 1.0 project to 2.0.

Your ASP.NET MVC 1.0 project should be (almost) fully compatible with ASP.NET MVC 2.0 (there are a small number of minor breaking changes). All that is required for converting the project to ASP.NET MVC 2.0 is a GUID change in the project file.

See the ASP.NET MVC 2.0 Release Notes for more information about compatibility and conversion.

Robert Harvey
He is asking whether VS2010 is compatible with MVC1, not whether MVC2 is compatible with it.
anthares
Thank you very much RobertI can go to sleep quietly now... : P
SDReyes
Thank you Anthares!Thank you again Robert. : )
SDReyes
@anthares: Yes, VS2010 is compatible with MVC1. You just have to upgrade your project to MVC2.
Robert Harvey
@Robert If you have to upgrade to MVC2, then MVC1 isn't what I would call 'compatible'.
John Clayton
@John: The project file is the only thing that changes. This is generally true with any project file when upgrading from one version of Visual Studio to another.
Robert Harvey
A: 

Everything seemed to be fine. I was able to get it to work, though it took a little bit of hacking.

  1. Convert the MVC 1.0 solution to MVC 2.0 using this tool.
  2. Open the upgraded solution in VS 2010.
  3. Remove the reference to MVC 2.0 and add a reference to the 1.0 version of System.Web.Mvc.dll you hopefully saved. Make sure to flag the "Copy Local" property of this 1.0 reference to true.
  4. Go through the [mvc project root]\Web.config and [mvc project root]\Views\Web.config files and change the version 2.0.0 to 1.0.0 anyplace you see a reference to System.Web.Mvc.
ZaChickster