views:

1742

answers:

5

I recently migrated a VSS database to TFS 2008. Using Source Control Explorer, I got the latest version of a solution with 12 projects. When I opened the solution in VS 2005, two of the projects were not found. I am not sure why these two projects were not found, but thought it easiest to just delete and re-add them to the solution. When I do this, VS gives me a "A project with that name is already open in the solution." The project doesn't appear in solution explorer, and is not listed in the .sln file. Any ideas?

+2  A: 

I would try hand editing the project/solution files, they are text and pretty easy to read. You can edit the file in notepad. To open up the file as text in visual studio you need to first close the solution. Then do file->open and select the sln file, but instead of hitting the open button, press on the right side where there is an arrow and select open with.. from there you can select source code editor (text).

Dolphin
+3  A: 

I had the same message... Seems like it comes from (.csproj) project file. Under first propertygroup there is a section named

<ProjectTypeGuids>...</ProjectTypeGuids>

which generally tolds Visual Studio to handle that project in some specific way. Some Guids can be found here.

First make a backup copy of that file. Then removing that section can help you open the project as usual project. As it seems that the Visual Studio thinks that the project is not the type that is specified in the ProjectTypeGuids.

Tuomas Hietanen
+1  A: 

This did it for me:

  1. remove the section <ProjectTypeGuids>...</ProjectTypeGuids> in each project
  2. reopen each project, then save to overwrite the existing project file, finally exit
  3. reopen the solution file
  4. pray (optional)
Chenster
+2  A: 

If anyone uses AnkhSVN instead of TFS, it's also possible, that the .sln-file need the following lines:

GlobalSection(SubversionScc) = preSolution
    Svn-Managed = True
    Manager = AnkhSVN - Subversion Support for Visual Studio
EndGlobalSection

in the "Global" section.

Thomas
A: 

I have to say that removing the section <ProjectTypeGuids>...</ProjectTypeGuids> could create some problems. In fact, such a section defines the type of the project and, if removed, could disable some features. For example, if your project was originally defined as Smart Device (C#), after removing the aforementioned section the on-device debug may not working properly.

beltry