views:

922

answers:

1

Is there an easy way to use multiple folders in a project with Visual Studio? It has "filters" which look like folders, but it would be really nice to be able to make folders and insert files in them inside VS. Is there an add-in or secret option to enable this behavior?

+6  A: 

With VC++, the folders do not correspond directly with what's on your file system. They are simply used to help you organize your project in an independent manner.

The reason they have this design decision is because with C++ you typically have many include and source directories.

More on Filters:

At the top of your "Solution Explorer" window you will see a toolbar button that when hovered over says "Show All Files". If this button is pressed it does not show you a Folder/Filter structure. If this button is not pressed it shows you the Folder/Filter structure.

To add a new Folder/Filter, right click on a project of your solution and select Add -> New Filter.

Note that for each Folder/Filter that you create you can go into the Folder/Filter properties and set things such as:

  • Parse files: Whether to parse the files in this folder for auto completion
  • SCC Files: Whether the files in this folder should be considered for source control
  • Filter: Specifies the file types that this folder will hold by default.
Brian R. Bondy