Wednesday, February 10, 2010

Visual Studio: Adding an existing folder to a project


When I read this in the Nitriq blog I felt they took the words out of my mouth. I have always looked for a way to add an existing folder (with its files) to a VS project. The "manual" way is to create the root folder and then multiple select the files in the "add existing files..." context menu. But this is not practical in case there are multiple nested folders with many files in each.

The Nitriq blog gives a partial solution:

1. Copy the destination folder into the project folder (via windows explorer).
2. Click the "show all files" button.
3. Right click the folder --> "Include In Project".

However this has the disadvantage of not working in a "web site" project but only in a regular one. Amazingly enough I have found the trivial way to do the whole thing:

1. Drag the folder to the solution!

How stupid of me to not see it before... The annoying part is that VS should really have an "add existing folder..." context menu item.


What's next? get this blog rss updates or register for mail updates!


fschwiet said...

Haha I always wondered too.