Recomendation for common external assemblies?

I use shared open source libraries in a multiproject solution (eg. lib1.dll, lib2.dll referenced in projects 1 (maybe a DLL), 2 (another dll) and 5 (an exe) of solution x).

1) The first problem I have using TFS version control is how to handle these assemblies so everyone else can get a copy of the source code and start to work without worrying about missing/not found assemblies, changing the assembly reference path and so. Ideally visual studio could have a common/shared bin folder in the solution that holded these assemblies (the physical file not just a link) and all projects could reference the assemblies in that location, so when somebody else copies the source code folder or gets as working copy from TFS via get latest version they would get all references. What is the best practice for handling this scenario using VS2005 and TFS

2) The second problem is when a new version of say lib1 is released and I want everyone else using version control to have the updated version of the library via TFS version control. How could I do this

Thanks,

Hector



Answer this question

Recomendation for common external assemblies?

  • Danny Tsai

    Thanks Richard,

    My question would now be: If I create in my machine a folder (using windows explorer) called bins in the solution directory (all projects are in their on subfolders as well), put there my common assemblies and reference them with the browse option, will the .dll files and bin folder be checked-in when I check-in the solution

    Hector


  • nickc

    1) I don't think this is possible at the solution level. Within each project, you can rightclick References -> Add -> Browse: VS will automatically use relative paths. If you have tons of projects, writing a quick script to do this would probably be faster; project files are just XML.

    So long as nobody changes the folder structure, you shouldn't have to worry about broken links.

    2) Simply checkin a new version of the binary, at the same location you pointed your projects to in #1 of course.

    Note: if you're actively developing these components (i.e. not just downloading binaries), you should probably do so in a separate branch to avoid conflicts. Then you can "publish" releases by Merging into the branch(es) where your main projects are being developed.

  • jazg

    No. If you want them to be controlled inside Solution Explorer, you'll also have to add them to the solution itself. Rightclick the solution -> Add -> New Solution Folder, then Add -> Existing Item under that.

    Do this before you change the projects' reference paths since it will copy the files into the new folder.

  • Recomendation for common external assemblies?