views:

207

answers:

1

How can one add in Visual Studio all the files under a given directory 'as link' (that is, without Visual Studio creating a local copy under current project's directory, which is what happens if one adds a folder as 'existing item')?

In my case, I don't want local copies. Instead, I want to work with existing items in their original locations. And, I don't want to add them by going through each folder. Instead, I want to specify a given folder and click a magic silver bullet button that adds all of the files below it as 'link'.

Thanks in advance.

(Disclaimer - I went through related questions, but all of them result in VS creating local copies.)

+4  A: 

For single files

on the add item dialog you can see a small arrow pointing down on the add button

click that (since it is a button with a dropdown) and chose the add as a link menuitem. that will add the item as link

For multiple files

on the add existing items dialog SELECT all the files you want to add as an link and press the menu item ont he add button add as a link

For Multiple files in multiple locations

If you want to select a folder and add all the items on all subfolders then you can do that this way,

on the open dialog do a search for file types you want to add, select them all and do the "add item as link" action.

Since your question changed twice including the change on the title (once) Visual Studio - how to BULK add files under a given directory as LINK? edited title I have added all the things i think you needs let me know if you still like to do something else

Hope this helps

Dan

dmportella
I know that. I'm asking on how to do that in a 'bulk' manner e.g. by choosing a folder and make VS add all items below it that way, as a link. Thanks anyway.
Ariel
read my updated answer
dmportella
like i said just multi-select all the items you want and do the "add as a link" action.
dmportella
If you want to select a folder and add all the items on all subfolders then you can only do that this way,on the open dialog do a search for file types you want to all, select them all and do the "add item as link" action.
dmportella