tags:

views:

791

answers:

2
  • I have a multi-project solution being stored in TFS.
  • Each project has separate Debug/Release build configuration folder specified.
  • The main project's bin folder is "included" in source control because it contains some third party DLLs that are included in the repository.
  • Each reference is a "project" reference type as per MS/TFS best practices.

Every time I build the solution, VS/TFS copies all of the built dependencies for the main project into both the build configuration folder (debug/release), and the root bin folder. When the file appear in the root bin folder, they get added to source control (or if they were already there due to this same issue, checked out)

For now, I have removed the bin folder from source control, but this is less than ideal, because now each developer must maintain the local DLLs, rather than just getting them from source control.

My ideal solution would be to just use SVN instead of TFS, but I'm locked into this one.

What's the best practice in this scenario?

+1  A: 

If you want to include binaries in your source control (and some people would burn you at the stake for doing so) I would do the following:

  • Create a "Binaries" folder inside the project
  • Copy the dependencies in there
  • Add references to those DLLS in that location

The project file will then contain relative paths to them, so you can safely include that directory in source control and have it work for all devs, without having to add your "bin" directory to source control.

Steven Robbins
I couldn't quite use that approach as the final project is a web application. So that "Binaries" folder would end up getting published to the web site and be exposed to the public.I went with a similar approach of adding an "Externals" folder at the solution level, placing the binary files in it, and including them in the solution. Then I was able to add file references to the DLLs.Thanks for your help.
ulty4life
A: 

After using the solution outlined in the above answer and comment, I've found that for some reason, one of the DLLs is not being copied to the bin folder when the solution is built. (Copy local is set to true for the reference.) The DLL is copied into the build configuration folder, but not the main bin folder. It is used in the application, so dependency checking should pick it up. As it is now, a runtime error occurs whenever code attempts to access this component (as would be expected with a missing DLL.

Any ideas?

ulty4life
Had to go back to a single bin folder (no Debug/Release subfolders), so that all the files copied to a single location.
ulty4life