What is a solution folder in Visual Studio?

I also would like to be able to add physical folders to a solution, but unfortunately you can’t do so outside a project.

The best solution I have found is to add a solution folder with the same name as the physical folder (myFolder in your example), then add files from that physical folder to the solution folder.

However Visual Studio does not maintain a mapping between the solution folder and the physical folder which means that:

  • new files subsequently created in the solution folder using Visual Studio are not automatically placed in the physical subfolder (I think they are created in the solution root folder by default)

  • files added to the physical folder are not automatically visible in the solution folder, even with “Show All Files”.

To add new files, I therefore always create the new file in the physical folder outside Visual Studio, then add it to the solution folder using “Add/Existing Item”

Leave a Comment