Search code examples
visual-studio-2013architecturesolutionvisual-studio-2015

How can I add a whole directory structure into a solution?


There's a directory structure (the root folder and a bunch of subfolders with their subfolders in them etc.) and I'd like to keep these in our TFS, as a part of the solution, even if those are not source code files and don't belong to a project.

Optimally, those would be listed as "others" or "solution files". However, I can put them in a project if there's a suitable type of such.

When I tried to add these to the solution, the root directory's files get added but none of the subfolders nor the files in the subfolders. Is it possible to add a non-shallow directory structure to a solution somehow?

enter image description here

As the image depicts, there's a folder called Misc. In that folder, only the files from the root directory get added. How can I add the whole structure with its depth preserved? Or is there a more appropriate way to keep such files within a solution?


Solution

  • From How do I add an existing directory tree to a project in Visual Studio?

    1. Add the folders to your folder directory
    2. Show all files
    3. Include the subdirectory in the solution