TFS Automatically Adds Built DLLs to Source Control

tfs

  • 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?

Best Answer

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.

Related Topic