28

I can create new MVC projects and they work and run however trying to open an existing project is not working at all.

I tried the following changing the project type to:

<ProjectTypeGuids>{F85E285D-A4E0-4152-9332-AB1D724D3325};{349c5851-65df-11da-9384-00065b846f21};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids>

(this worked on migrating a project from Asp.Net MVC preview 1 to preview 2 BTW)

Changed the Reference to:

<Reference Include="System.Web.Mvc, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
    <SpecificVersion>False</SpecificVersion>      
</Reference>

I tool this from a new project I created so i know that should be OK (I even hardcoded the path to the same result).

Still I get the dreaded:

The project file '.....csproj' cannot be opened. The project type is not supported by this installation.

I also tried devenv /setup and installing the SP1 for Visual Studio.

The project I'm trying to open is this one (a DevExpress sample of a grid working on ASP.NET MVC).

Luke Girvin
  • 13,221
  • 9
  • 64
  • 84
roundcrisis
  • 17,276
  • 14
  • 60
  • 92
  • 1
    Have you tried contacting DevExpress support? – Lazarus Oct 07 '09 at 11:48
  • 1
    no i haven't. I ll have a look in their forums – roundcrisis Oct 07 '09 at 11:55
  • 1
    possible duplicate of [How to open a csproj with ProjectTypeGuids 349c5851-65df-11da-9384-00065b846f21?](http://stackoverflow.com/questions/15636034/how-to-open-a-csproj-with-projecttypeguids-349c5851-65df-11da-9384-00065b846f21) –  Feb 25 '14 at 08:30

4 Answers4

25

Just had a similar problem when taking an older MVC / Azure WebRole project into VS 2012 with MVC4. The trick was to edit the .CSPROJ like this:

10c11
<     <ProjectTypeGuids>{F85E285D-A4E0-4152-9332-AB1D724D3325};{349c5851-65df-11
da-9384-00065b846f21};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids>
---
>     <ProjectTypeGuids>{E3E379DF-F4C6-4180-9B81-6769533ABE47};{349c5851-65df-11
da-9384-00065b846f21};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids>

i.e. change the first one from {F8... to {E3E3... (which is apparently MVC4). This has to be done outside of Visual Studio, in a text editor, and then open the solution and "Reload" the project that gave an error - this will trigger VS to migrate it to VS 2012.

Mike Kelly
  • 969
  • 1
  • 12
  • 23
  • Thank you, this allowed me to finally migrate my 2010 solution to 2012 which happened to on a different machine than it was originally created on. 2 years of looking finally resolved my issue. – Michael Jan 04 '17 at 01:58
18

ok the problem was too many changes, I unzipped the solution again and just changed the first parameter in the ProjectTypeGuids to {F85E285D-A4E0-4152-9332-AB1D724D3325} so it looks like

<ProjectTypeGuids>{F85E285D-A4E0-4152-9332-AB1D724D3325};{349c5851-65df-11da-9384-00065b846f21};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids>

and I can see the project hurray!

Konstantin Salavatov
  • 4,370
  • 2
  • 25
  • 24
roundcrisis
  • 17,276
  • 14
  • 60
  • 92
  • +1 -- too many other related posts. This one worked in VS 2008 for me with MVC2. – Kurt Johnson May 24 '10 at 17:26
  • Do you know what 349c5851-65df-11da-9384-00065b846f21 (the second one) represents? I've worked out that that's the one I'm missing from my machine, but I have no idea what it is an what I should install to get this... – Flater May 24 '12 at 13:48
  • 1
    @Flater: Web Application (see here: http://www.mztools.com/articles/2008/mz2008017.aspx – Mike Cheel Sep 13 '12 at 18:11
  • What is the Difference between {astrix astrix F85E285D-A4E0-4152-9332-AB1D724D3325 astrix astrix} and {F85E285D-A4E0-4152-9332-AB1D724D3325} – N.K Dec 01 '16 at 05:02
  • astrix astrix F85E285D-A4E0-4152-9332-AB1D724D3325 astrix astrix was actually attempt to show it in bold font – Konstantin Salavatov Oct 08 '20 at 14:40
  • 349c5851-65df-11da-9384-00065b846f21 represented ASP.NET MVC 5. You can see a list of guids here: https://www.codeproject.com/Reference/720512/List-of-Visual-Studio-Project-Type-GUIDs – Scott-MEARN-Developer Feb 16 '23 at 11:26
10

You need to install ASP.NET MVC 2.

abatishchev
  • 98,240
  • 88
  • 296
  • 433
Pencho Ilchev
  • 111
  • 1
  • 2
  • 1
    Same here, if it seems that when i installed MVC 3 through web pi, web pi started staying that MVC 2 is installed as well. However, that was not the case. I end up installing MVC2 RTM and it solved the issue. – Roman Aug 26 '11 at 00:58
  • I had the same issue as @Roman, Web Platform Installer said I had it installed, however after installing from the exe all was fine. – John_ May 03 '12 at 11:11
  • Just had this same issue but with MVC 3 and 4. The MVC 3 installer also kept crashing due to a newer version of NuGet being installed, once I uninstalled that everything started working fine. – Brian Surowiec Dec 06 '12 at 08:12
0

There is a really easy way to solve this.

Probably some of the dependencies are missing, and it is really hard to find out which one.

Go to

http://www.asp.net/downloads

Download ASP.NET and WebTools for your version of Visual Studio

A web platform installer will come up, which will install all the required tools

This solved my problem

There is no need to go through the ProjectTypeGuids

adib.mosharrof
  • 1,624
  • 1
  • 12
  • 16