Visual Studio – Vanishing solution node when adding projects

A friend of mine today was quibbling a bit while using Visual Studio 2010 to create a solution and then to add projects to it. The normal behavior one would expect is as follows:

  1. Create an empty solution. One would expect to see the solution name (say MySolution) in the solution explorer. And it does show up.

image image

2. Then Right Mouse on the solution and click on Add Project, and give a project name (say MyProject1)

image image

3. One should expect to see the solution node and underneath it the project. Well this does not happen. Instead what happens is the solution node disappears and one can only see the project(My Project). Try as much you can’t get to see what you would normally expect to see the solution node also.

image

4. The scenario is to create a solution node (MySolution) and then add a few existing projects(MyProject1, MyProject2 and so on ) underneath it, which is normal.

5. To do this now one has to go to the File menu on the Left of the VS IDE (at the Menu bar) and then choose Add project.

image image

6. This will provide you the option to add existing projects by opening the file selection dialog box. Choose the project of interest. In the above example I just gave a new Project “MyProject2”.

7. Viola – now you will see your original MySolution solution node and then the two projects underneath it.

image

Enjoy the quirks of Visual Studio IDE. This exists in VS 2008 and VS 2010 versions.