If you are working on a large project, your Solution Explorer can get unwieldy and difficult to manage. Solution Folders can help.
Solution folders are logical folder groupings of projects or files within a project.
For example, here is a solution with a set of projects:
There are only 11 projects here, which may be small compared to a "real" application, but it will demonstrate the usefulness of solution folders.
To add folders at the solution level to organize your projects:
- Click on the solution in Solution Explorer.
- Select Add | New Solution Folder.
- Give the folder a logical name.
- Drag and drop projects in Solution Explorer into the new folder.
Note: This does not create folders in your file system. It only defines logical folders within your solution.
After Step 2, the folder then appears in Solution Explorer:
In this example, we want to move all of the test projects into a folder, so the solution folder is named "Test Projects". The test projects are then dragged to the new folder. The result is shown below:
When you aren't working with your test projects, you can close the folder, making Solution Explorer a little easier to work with.
To add folders at the project level to organize your project files:
- Click on the project in Solution Explorer.
- Select Add | New Folder.
- Give the folder a logical name.
- Drag and drop project file in Solution Explorer into the new folder.
Note: This does create folders in your file system and moves the dragged files to that folder.
In this example, we want to group the python files into their own folder.
The result is shown below:
Use this technique any time you want to organize your projects or project files into folders.
Enjoy!
EDIT [7/13/10]: Added a second note to make it clear that folders defined at the solution level do *not* create folders in the file system. Folders defined within a project *do* created folders in the file system.