Subscribe | Alerts via Email
View All Quotes
“You know you have achieved perfection in design, not when you have nothing more to add, but when you have nothing more to take away.”
-Antoine de Saint-Exupery
<September 2010>
SunMonTueWedThuFriSat
2930311234
567891011
12131415161718
19202122232425
262728293012
3456789
The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.

©2010 Cal Zant
Sign In
Total Posts: 106
This Year: 5
This Month: 0
This Week: 0
Comments: 2

I got this error message when trying to open a few open source or sample solutions in Visual Studio 2008.

error x.csproj cannot be opened The project type is not supported by this installation

Of course I had the generic C# projects installed, so I googled around and after sifting through a few solutions that didn't work ... I realized what the issue was.

The real issue is that Visual Studio 2008 didn't recognize some of the "ProjectTypeGuids" defined in the .csproj file, because one or more those GUIDs referenced a type of project that wasn't installed.  However, instead of figuring out which project templates you are missing, and finding out where to download those from and get them installed ... there is a shortcut you can take if you just want to open the project.  You can simply replace that tag in the .csproj file with standard GUIDs (installed by default in any instance of VS), then just reload the project and it should open as expected.

Here is an example of the before and after for one sample app I had problems opening.  The app is called Nerd Dinner, which is an open source application that Scott Hanselman created (http://nerddinner.codeplex.com/).  It turns out it has a dependency on MVC, and I didn't have the project templates related to MVC installed on my machine (nor did I want to install them).  The templates for MVC aren't bundled with VS 2008, but instead are installed through a separate "extension" download (which is the case for a lot of project templates).  All I wanted to do is look at some of the code, so by removing the bad GUID references, I could then open the project and poke around.

Before:

<Project ToolsVersion="3.5" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <PropertyGroup>
    ...
    <ProjectTypeGuids>{603c0e0b-db56-11dc-be95-000d561079b0};{349c5851-65df-11da-9384-00065b846f21};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids>
    ...

After:

<Project ToolsVersion="3.5" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <PropertyGroup>
    ...
    <ProjectTypeGuids>{349c5851-65df-11da-9384-00065b846f21};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids>
    ...

That's it ... just replace the entire <ProjectTypeGuids> tag with the values shown above, and reload the project.  Note: You might need to open the csproj file in notepad to be able to edit the underlying XML this way.

Tuesday, October 06, 2009 7:40:08 AM (Central Standard Time, UTC-06:00)  #