views:

489

answers:

3

Hello,

I have a large project that I want to start using visual studio 2005 to edit. I want to tell it "Here are all the files I want you to track, now get on with it" and have them displayed as a directory tree, for example:

Folder 1
 - File A
 - File B
 - File C
Folder 2
 - Folder 3
   - File X
   - File Y
 - File D
 - File E

Right now it's just showing all the header files in one big list, and all the source files in one big list, which I find unhelpful. I also don't want to spend ages creating a folder in the project for each folder on the disk.

Is there any way I can get VS to show me a source tree of everything in the solution, organised by where it is on the actual disk?

Thanks.

+4  A: 

click on the 'show all files' icon in the solution explorer, then select the folders you want to include, right click and select 'include in project'.

Manu
I can't believe I didn't know about this - thanks. I wish it would include the folder hierarchy in the project as well. VS seems to import the files into the project's stupid "Header Files"/"Source Files" project organization (at least for C++). You wouldn't happen to know a trick for this?
Michael Burr
A: 

How do I "select the folders I want to include"? If I show all files, I just get one big list of all the files.

Colen
A: 

To clairfy this: To import a source tree with all subfolders, represented in the VS Explorer View like it is on the filesystem, you have to create a new Solution via the menu entry "Datei >> Neu >> Projekt aus vorhandenem Code" which is the last entry in the "New..." menu in VS2005 Pro (german version) for example. This opens a wizard where you will find the mentioned "Show All Files" and "Select Folders" options.

crayor