This is how I do it. Not sure if there is any other better way:
- Right-click on your solution from the Solution Explorer. Hover over
"Add" and select "New Solution Folder". It's not really a folder
and does not point to any Physical Folder. It's an abstract
construct for grouping projects within a solution, but we'll use it
for something else.
- Call it something like "Referenced Assemblies".
- Next, Right-click on your solution again and click on "Open Folder
in Windows Explorer". In the windows explorer window that pops up
add a new "Physical Folder" (this will be located right underneath
the Solution's root folder).
- You can call it "Referenced Assemblies" so that the Solution Folder and Physical Folder share the same name so as to avoid confusion.
- Grab all those DLL's lurking everywhere (i.e. the
AjaxControlToolkit.dll or the DocumentFormat.OpenXml.dll buried in
program files) and copy (DO NOT DRAG - keep the originals where they
are) them into the "Referenced Assemblies" folder in Windows Explorer
(NOT IN THE SOLUTION).
- Now you can drag those copied dll's from the "Referenced Assemblies"
Physical Folder in Windows Explorer into the "Referenced Assemblies" Solution Folder
in Visual Studio's Solution Explorer.
- Go through each project in your solution and remove all references
to the assemblies you will be referencing from the "Referenced
Assemblies" folder.
- Add the references back in, but this time (under the project)
right-click on "References", click "Add Reference...", select the
"Browse" tab, click the folder icon with the green arrow (says "Up
One Level" when hovering over it), double-click the "Reference
Assemblies" folder, select all the dll's you wanna reference and
click "OK".
You're done. Now that your solution knows of these dll's and where to find them, when you check in your code (via SVN, TFS, or whatever) it will push them up and copy them down for others to use.
If your using TortiseSVN you don't have to do anything if you're also using the AnkhSVN plug-in for Visual Studio. It studies your solution file (just like TFS does) to find files referenced by the solution. In this case it will pick up on the new dll's being referenced by the "Referenced Assemblies" Solution Folder and automatically add source-control tracking before committing them (that is if you commit your solution changes from the Solution Explorer in Visual Studio like I do).
Hope this helps.