Thursday, October 4, 2007

VS 2005 C# projects in Orcas Beta 2

Opening a VS 2005 C# project (.csproj) in Orcas Beta 2 may sometimes throw you this error:

"Make sure the application for the project type (.csproj) is installed."

I tried googling on this but did not find much information except that, this might happen if your project is under source control. My projects were under source control and hence I was elated as the post did carry a solution for the same (http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=8461&SiteID=1). But my elation was short-lived as the work-around didn't help me.

After breaking my head for sometime I came with a work-around that resolved the issue. Here are the steps:
  1. Delete the solution file and any associated source control bindings.
  2. Open one of the projects (open the .csproj file)
  3. Orcas will prompt for migration to new version. Finish it.
  4. Now add all the remaining projects to the newly created solution.
  5. Once you re-create your solution structure save it to the location from where you deleted the original one.
The solution can now be built.

Also, do not forget to change the target framework to 3.5 in your project properties unless you aren't using any of 3.5 features.

2 comments:

Anonymous said...

Thanks, your solution worked for me with a non-beta version of 2008. Maybe it has to do with the source bindings because some .sln and .csproj files opened fine for me, while others didn't. I'd really like to see an explanation for this issue...

Anonymous said...

This is gret.. it workd fro me