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

2

2 Answers

3
votes

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.

0
votes

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?