11

Is it possible to open MVC2 project in Visual Studio 2012? When I try to load the project I get this error :

De\De.csproj: The application which this project type is based on was not found. Please try this link for further information: http://go.microsoft.com/fwlink/?prd=12395&pver=11&sbp=ProjectTypeDeprecated&plcid=0x409&clcid=0x409&ar=MSDN&sar=ProjectCompatibility&o1=F85E285D-A4E0-4152-9332-AB1D724D3325

Then I get redirect to : http://www.asp.net/whitepapers/mvc3-release-notes#upgrading

Do I need to upgrade to MVC3 or I can keep my project in MVC2?

ahsteele
  • 26,243
  • 28
  • 134
  • 248
VinnyG
  • 6,883
  • 7
  • 58
  • 76
  • I ended up re-building the application and importing all my class and views – VinnyG Oct 03 '12 at 15:18
  • 1
    sorry that you ended up rebuilding your project. Wish I had run into this issue earlier so I could have provided you with this answer: http://stackoverflow.com/a/13424080/61654. – ahsteele Nov 17 '12 at 17:20
  • @ahsteele you should post as an answer – VinnyG Nov 28 '12 at 19:50
  • @VinngyG As requested I've [provided an answer](http://stackoverflow.com/a/13652782/61654). – ahsteele Nov 30 '12 at 20:37

2 Answers2

10

At VinnyG's request I am providing a link to an answer I provided on how to fix this issue. The linked answer provides a fully detailed solution but here is a summary:

ASP.NET MVC 2 will need to be downloaded and installed. The MVC 2 project file will need to be modified removing its project GUID. The removal of the project GUID will mean that the project no longer behaves like an MVC project: no right click to add view, controller, etc., but will compile and work as an MVC 2 project without having to migrate.

Community
  • 1
  • 1
ahsteele
  • 26,243
  • 28
  • 134
  • 248
  • 1
    Although this seems useful for a lot of people, in my case it didn't work. I used the instead and that worked for me! Here you have the link: http://aspnet.codeplex.com/releases/view/59008 – Víctor Velarde Mar 22 '13 at 11:35
  • I'm interested in finding how an extension could be made to VS2012 to natively handle MVC2 projects like it does for MVC3+. At this time we wouldn't like to risk breaking anything upgrading 2-3 and having to test. – The Muffin Man May 28 '13 at 20:13
5

Copied from http://msdn.microsoft.com/en-us/library/hh266747.aspx

If the Model-View-Controller (MVC) project uses version 3 or 4, you can open this project in Visual Studio 2012. By default, Visual Studio 2010 with SP1 supports only MVC 2 and 3, and Visual Studio 2012 supports only MVC 3 and 4. For information about how to automatically upgrade from MVC 2 to MCV 3, see ASP.NET MVC 3 Application Upgrader. For information about how to manually upgrade from MVC 2 to MVC3, see Upgrading an ASP.NET MVC 2 Project to ASP.NET MVC 3 Tools Update. If your project targets the .NET Framework 3.5 with SP1, you must retarget your project to use the .NET Framework 4.

dampee
  • 3,392
  • 1
  • 21
  • 37
  • the application upgrader is not working once you try to open the solution in VS2012 – VinnyG Oct 02 '12 at 14:50
  • the application converter tells me that it does not know what is the project type so I will have to do the conversion manualy – VinnyG Oct 02 '12 at 14:59