Using Solution Folders

Menu:  Project -> Add New Solution Folder; [Right-Click Solution] -> Add -> New Solution Folder
Command:  Project.AddNewSolutionFolder
Versions:  2008,2010
Published:  3/27/2010
Code:  vstipProj0009

 

Did you know there are special folders to help you organize large solutions?  There is!  They are called, appropriately enough, Solution Folders.  To create one just Right-Click on your solution (or go to Project -> Add New Solution Folder) and you will see this in Solution Explorer:

image

 

Simply give the folder a name and you are good to go.  But so what?  I mean, what can you actually DO with these things?  Here is a list of stuff you can do:

  • Move or add projects to them. Solution Folders can be nested to create greater organizational structure.

  • Add, delete, or rename Solution Folders at any time, if the organizational requirements of the solution change.

  • Unload all projects in a Solution Folder to make them temporarily unavailable for building.

  • Collapse or hide entire Solution Folders so that you can work more easily in Solution Explorer. Hidden projects are built when you build the solution. 

  • Build or rebuild all the projects. The projects are built in the order specified by the project dependencies.

SPECIAL NOTE:  

Solution Folders are an organizational tool in Solution Explorer; corresponding Windows folders are not created.  Microsoft recommends that you organize your projects on disk in the same way that you organize them in the solution.  But that is your call :)