Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why does it say "Project with that name already opened in the solution"?

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?

like image 230
Mike K. Avatar asked May 28 '09 21:05

Mike K.


People also ask

What is the difference between a project and a solution?

A project contains executable and library files that make up an application or component of an application. A solution is a placeholder for logically related projects that make up an application. For example, you could have separate projects for your application's GUI, database access layer, and so on.

What is the difference between project name and solution in Visual Studio?

A project is contained within a solution. Despite its name, a solution is not an "answer". It's simply a container for one or more related projects, along with build information, Visual Studio window settings, and any miscellaneous files that aren't associated with a particular project.

How do I create a solution to an existing project?

On the menu bar, select File > New > Project. On the Create a new project page, type solution into the search box. Select the Blank Solution template, and then click Next. Enter Name and Location values for your solution, and then select Create.

How do I open an existing solution in Visual Studio?

You can open any solution, project, folder or file in Visual Studio Code by simply right-clicking it in Solution Explorer and select Open in Visual Studio Code.


2 Answers

I had this problem and I was able to solve it using the following steps:

  1. Remove the project from the solution.
  2. restart visual studio.
  3. add the project to the solution as an existing project.
like image 66
Ismail Hawayel Avatar answered Sep 22 '22 07:09

Ismail Hawayel


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 tells 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.

like image 32
Tuomas Hietanen Avatar answered Sep 24 '22 07:09

Tuomas Hietanen