Getting Started with TFS Dependency Replicator
December 14, 2007
Continuing with the theme of releasing some of our internal tools as open source I have just uploaded the source and created a release on CodePlex for another tool that we have been using for a while called TFS Dependency Replicator. The project description up on CodePlex is as follows:
“The TFS Dependency Replicator is a tool that monitors the Team Foundation Server Build Store for the successful completion of new builds, or the change in qualify status of existing builds. When a change is detected TFS Dependency Replicator looks up a configuration file in the version control store and determines if any files from the build drop location need to be copied back into the source tree.
TFS Dependency Replicator is useful for complex build scenarios where a common framework is used across a range of products and once a new build of that framework is completed it needs to be published back into the source tree in binary for so other code bases automatically start using it.
This tool saves development teams the tedious task of manually updating binary dependencies produced from upstream builds.”
Once again, as with the TFS Build Virtualizer, if you would like to get involved with this project please contact me via my CodePlex profile page.
Installing and Configuring the Dependency Replicator Component
in order to install the Dependency Replicator component you need to first download the release from CodePlex. From this zip file you need to extract the following files:
- DependencyReplicator.exe
- DependencyReplicator.exe.config
These two files should be placed somewhere on the file system of your TFS server. I would recommend “C:\Program Files\Dependency Replicator”. Once these files are in place you should issue the following command at the command prompt:
- C:\Windows\Microsoft.NET\Framework\v2.0.50727\InstallUtil.exe /i “[install path]\DependencyReplicator.exe”
During the installation process a dialog will be displayed asking for valid windows credentials. Typically I woul use the build service account (e.g. [DOMAIN]\TFSBUILD) for this purpose. Once this is configured you need to modify the configuration file, DependencyReplicator.exe.config, the contents of the file are as follows.
You need to update both the name of the TFS server, and optionally the location in which the TFS Dependency Replicator will perform source control operations. This configuration shows that the dependency replicator is configured to poll the TFS build store every five seconds, you may want to revise that upwards a little bit in your environment depending on how stressed your TFS server is.
Once this configuration is complete, TFS Dependency Replicator is ready to be switched on. Issue the following command at the command prompt.
- net start DependencyReplicator
Once the dependency replicator is running you then need to put configuration files into the source code repository to control what files will be replicated from successful builds.
Configuring Your Builds for Dependency Replication
Dependency replication configuration files are stored under each Team Project in a well known location so that the tool can find it and process them when the build store is updated. The file is called “DependencyReplicator.xml” and is located under each projects TeamBuildTypes folder, for example “$/HelloWorld/TeamBuildTypes/DependencyReplicator.xml”. The following sample file shows the configuration required to have a single file be replicated from the drop folder relative path (Source) to the absolute location in version control (Destination).
Another way of configuring the dependency replicator is to not have it replicate after each successful build, but rather to have it replicate only after a specific build quality has been reached and flagged in the build store. The configuration below shows how to listen for the QualityChanged events, and the BuildQuality attribute specifies which quality level the replication activity is triggered on.
What’s next? Want to help out?
If you have any feedback please use the Issue Tracker and create a work item. Finally if you would like to help out with the project I’ve got the following roles available:
- Documentation Writer; responsible for updating CodePlex wiki and producing installation guide.
- Tester; responsible for testing installation process and operation of the tool.
- Developer; joint responsibility with me in designing and developing the TFS Depenency Replicator moving forward.
If you are interested contact me via my CodePlex profile page. Thanks for listening! I hope you find the TFS Dependency Replicator useful in your organisation.
P.S. Please note that once we get real documentation in the CodePlex wiki this page will become obsolete, but I will put a link to the equivalent documentation at the top of the page.
December 19, 2007 at 1:47 pm
[...] Mitch Denny on Getting Started with TFS Dependency Replicator. [...]
December 21, 2007 at 2:09 am
[...] 18 09 2006 ATTENTION: TFS Integrator is now obsolete. Please use TFS Continuous Integrator and TFS Dependency Replicator. For more information, read the post on why TFS Integrator is now [...]
December 27, 2007 at 4:46 pm
What happened to the images embedded in this blog post? The config file images are now replaced with the faux sys admin keyboard.
Also, does this new version on the DependecyReplicator work with TFS 2008?
December 28, 2007 at 6:46 am
Hi Tony,
Not sure – I think that there is some glitch with WordPress. Hopefully it’ll get fixed up soon, but if not I might have to consider moving hosts.
January 7, 2008 at 1:07 pm
[...] TFS Dependency Replicator, which allows you to have the outputs of a build replicated into the source of another build (usually a "Dependencies" or "/lib" folder), which can then trigger other builds. [...]
January 22, 2008 at 11:11 pm
Does anybody have a sample DependencyReplicator.xml file?
March 7, 2008 at 12:05 pm
[...] based continuous integration solution. Of course, it’s built in if you are using TFS 2008.TFS Dependency replicator – A tool to make changes in the source tree when certain events occur (like copying files when a [...]
March 13, 2008 at 2:06 am
Hi Mitch would you like to be specific on the screenshot you put up there. I have some difficulty to setup the DependencyReplicator or it will be great if you can create a doc and screenshot with the detail DependencyReplication.xml script attacth on the deck. I guess this is the best custom third party tool I looking for to fit my project environment. Appreciate if you can make this happen ASAP.
March 28, 2008 at 8:30 pm
Would you give more detail explaination regarding the following statement “This configuration shows that the dependency replicator is configured to poll the TFS build store every five seconds” Since I am still investigating this configuration setting and provide feedback to our Enterprise Arch team before we are planning to implement this tool for one of our particular project. I have tested this tools and works great for me. How far down the road about this tool to support TFS 2008??
April 8, 2008 at 8:25 pm
Hi James,
Check out http://www.codeplex.com/tfsdepreplicator/ there is a public beta build with TFS 2008 support there right now. Dependency Replication is poll based rather than event based because I found the TFS eventing mechanism to be too complex and unreliable for the way this needed to work. So I went polling instead – works well as you have indicated
September 9, 2008 at 9:48 pm
This looks like it could fit a real need on my team–but this page appears to be the only documentation, and with the improper images, I can’t tell what’s supposed to be in the DependencyReplicator.xml file. Is there any way to get more information?
October 8, 2008 at 11:23 am
Hi Mitch,
It seems as if your images are broken. Would you mind fixing these?
Thanks,
Donn
January 20, 2009 at 11:19 pm
I am having an issue configuring this app with the release of the 1.1 Beta. How are you supposed to set up the workspace used by the app? I think I have almost everything figured out … but it seems to create a workspace in TFS with the path/name I specify, but then it doesn’t issue a ‘get’ or anything there before looking in this path for a DLL to copy from the latest successful build. I’ve tried to issue the get myself as the tfsbuild account but that ends up with the application deleting the workspace before working with it. Am I missing something completely obvious?
February 14, 2009 at 8:02 am
Hi Ray,
I’m not sure what the problem could be there. Does the account you are using have rights to access the Team Projects?
June 9, 2009 at 12:08 pm
Hi Mitch,
TFS Dependency Replicator 1.1 Beta build is not working with TFS 2008. What will be the issue behind it? I followed all the required steps involved in the documentation. Dependency replicator service is running properly.