Project Conversion Woes: A project with that name is already opened in the solution

Tonight I decided to play with the project conversion (C# to VB.NET) capabilities of the wonderful #develop. For the uninitiated, #develop is an open source .NET IDE which is surprisingly robust, feature rich and lightweight. It has many cool features, one of which is the ability to convert entire projects (not solutions though) between languages. I really can’t recommend this app enough – it can be found at the following link.

I set my project up to convert and it ran smoothly. There were a few error messages (could not convert C# yield statement to VB.NET, anonymous method issues etc.) but pretty straightforward stuff and  the conversion ran extremely quickly. I attempted to add the newly created/converted vb.net project to a newly created VB.NET solution in Visual Studio, only to run into the following message:

A project with that name is already opened in the solution

It took some research but everything I read pointed to the ProjectTypeGuids in the vbproj file. Mine looked as follows:

<ProjectTypeGuids>{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>

Googling the possible ProjectTypeGuids I came across the following comprehensive list:

http://www.mztools.com/Articles/2008/MZ2008017.aspx

The first GUID (there are two – delimited by a semi-colon) was correct. {60dc8134-eba5-43b8-bcc9-bb4bc16c2548} corresponds to Windows Presentation Foundation (WPF) and the project I converted was a WPF C# application. However, the second GUID was incorrect – apparently a failure of the conversion process.

{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} corresponds to Windows (C#) and my app was no longer a C# app. Replacing this with its VB.NET equivalent - {F184B08F-C81C-45F6-A57F-5ABD9991F28F} – the line in the project file became:

<ProjectTypeGuids>{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{F184B08F-C81C-45F6-A57F-5ABD9991F28F}</ProjectTypeGuids>

I reloaded the project in Visual Studio and lo-and-behold it worked! Another fine lesson learned!

Comments

Jason said…
Thank you very much! I appreciate the feedback.
Anonymous said…
This comment has been removed by a blog administrator.
Anonymous said…
This comment has been removed by a blog administrator.
Anonymous said…
Interesting story you got here. It would be great to read a bit more about this matter. Thanx for posting this information.

Popular posts from this blog

Excel - Adding an existing Pivot table to the data model

Mirth

Getting Started with Mirth (Part 1)