Search code examples
dllvisual-studio-2013tfscheckin

Updating a binary file (.dll) in a solution to use the latest version of the .dll after a gated check-in build in TFS?


I have a solution file in TFS, located at $/Library/Library.sln, containing the binary files (.dlls) of other built solutions in TFS. Within this Library solution, there is a .dll taken from $/MySQL/bin/Debug/MySQL.dll which has been generated by building my MySQL solution (located at $/MySQL/MySQL.sln).

Normally after making a change to my MySQL solution I build the solution, check it in to TFS and then copy the resulting .dll into my Library solution at $\Library\MySQL\MySQL.dll. However I’d like this process to be automatic i.e. after checking in a change to the MySQL solution, a build is triggered, and the .dll file generated from this build is automatically placed into the Library solution and then checked into TFS. How would be the best way to achieve this? I imagine gated check-ins are something to do with it but I can’t seem to get it to work.


Solution

  • As Daniel said in the comment, NuGet is the way to go for this. Instead of checking in the binaries to TFS, have your MySQL build publish the binaries to a nuget feed. Then have your Library solution "subscribe" to that NuGet feed.