TFS Deployer and TFS 2008

Mitch Denny from Readify made two great tools available for Team Foundation Server last year. TFS Integrator provides Continuous Integration for TFS by registering for check-in events then triggering Team Builds and Dependency Replication. TFS Deployer provides automated deployment for TFS projects by registering for build quality change events then executing associated PowerShell scripts. Both of these tools were developed for TFS 2005.

TFS 2008 has just RTMed and it already includes check-in triggered builds in the box so TFS Integrator is less useful (except maybe the Dependency Replication but this can be done via other methods). TFS Deployer, though, is still very useful in a TFS 2008 environment… assuming you can get it to work.

TFS Deployer was originally developed against the TFS 2005 client libraries and, of course, we’ve uninstalled VS and TFS 2005 from most of our machines already so Deployer just falls over because it can’t find the libraries.

TFS Deployer is not open-source (yet) so I can’t fix it myself. However, in a comment Mitch suggests using binding redirects in the TFS Deployer config file to enable TFS 2008 support. Unfortunately he doesn’t give specifics.

I decided to drop the TFS Deployer assemblies into Reflector and find the list of TFS libraries it uses so I could write the redirects. I updated the .config file and changed the build quality on some existing builds and happily discovered that it works. If you want to use TFS Deployer with TFS 2008, here is the section to add to the TfsDeployer.exe.config file:

<runtime>
<assemblyBinding xmlns=”urn:schemas-microsoft-com:asm.v1″>
<dependentAssembly>
<assemblyIdentity name=”Microsoft.TeamFoundation.VersionControl.Client” publicKeyToken=”b03f5f7f11d50a3a” culture=”neutral” />
<bindingRedirect oldVersion=”8.0.0.0″ newVersion=”9.0.0.0″/>
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name=”Microsoft.TeamFoundation.VersionControl.Common.Integration” publicKeyToken=”b03f5f7f11d50a3a” culture=”neutral” />
<bindingRedirect oldVersion=”8.0.0.0″ newVersion=”9.0.0.0″/>
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name=”Microsoft.TeamFoundation.Build.Common” publicKeyToken=”b03f5f7f11d50a3a” culture=”neutral” />
<bindingRedirect oldVersion=”8.0.0.0″ newVersion=”9.0.0.0″/>
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name=”Microsoft.TeamFoundation” publicKeyToken=”b03f5f7f11d50a3a” culture=”neutral” />
<bindingRedirect oldVersion=”8.0.0.0″ newVersion=”9.0.0.0″/>
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name=”Microsoft.TeamFoundation.Client” publicKeyToken=”b03f5f7f11d50a3a” culture=”neutral” />
<bindingRedirect oldVersion=”8.0.0.0″ newVersion=”9.0.0.0″/>
</dependentAssembly>
</assemblyBinding>
</runtime>