Teamprise Knowledge Base

TKB00070 Installing the Teamprise Extensions for Team Foundation Build

Last updated 2008-02-07 11:45:25 UTC by Martin Woodward

Overview

The following instructions are designed to help you install the Teamprise Extensions for Team Foundation Build to allow you to build a Java application from a Microsoft Visual Studio Team Foundation Server Build (Team Build). Team Build is only able to execute MSBuild scripts to perform builds. Team Build creates a master build file - a bit like a boot strap build file. This is a file called TFSBuild.proj and is checked in to source control at the time a build is created. The default Team Build scripts have some useful functionality for labeling, downloading source, updating work items, calculating changes etc. For .NET based builds, the default script then fires off a child MSBuild processes to compile, test and deploy the .NET projects. The Teamprise Extensions for Team Foundation Build provide a custom MSBuild target allows you to easily call Ant from with-in the TFSBuild.proj file created by Team Build. As well as making the calling of Ant easier, the task reports data of the build progress into TFS. The Team Build portions of Team Foundation Server has had major overhaul as part of TFS 2008, therefore there are two versions of the custom target, one for TFS 2005 and for TFS 2008.

The TFSBuild.proj files created by the "New Build Definition" functionality in Teamprise 3.0 assume that the Teamprise Build Extensions are installed on the build agent.

Prerequisites

You must have the following installed on the same server as your TFS Build Agent:-

  • Java JDK (the latest one from Sun is recommended)
  • Ant (the latest version is recommended as Ant 1.7.0 had some changes that make the running of JUnit tests easier).

Installing the Teamprise Extensions for Team Foundation Build

The Teamprise Extensions for Team Foundation Build consist of the follow components:-

  • Teamprise.Build.Ant.targets file, that in turn uses;
  • Teamprise Build tasks assembly (Teamprise.Build.dll)

Due to the differences in the build functionality provided by TFS 2005 and TFS 2008, there are current two versions of these, v1 and v2 for TFS2005 and TFS 2008 respectively.

Using the Installer

By far the easiest way to install the build extensions is to run the TeampriseBuildExtensions installer (msi) on the machine running the Team Foundation Build Server process (the build agent). This will install the necessary components into the MSBuild extensions path – usually located at %ProgramFiles%\MSBuild.

Manual Installation

A manual installation zip archive is provided. If using this method, the contents of the archive should be extracted to disk and then the contents of the targets folder copied to %ProgramFiles%\MSBuild\Teamprise.

Post Installation Tasks

Once you have installed the Teamprise Extensions for Team Foundation Build onto the build agent, you will need to configure the machine to provide the locations of Ant and your desired JDK. This is performed by setting the following environment variables at the machine level.

  • ANT_HOME - The location of your chosen version of Ant.
  • JAVA_HOME - The version of Java that you wish to use to perform your builds. Note that you do not need to configure JAVA_HOME if the default JDK for your system is already installed and it is the JDK that you wish to compile your builds with.

To set environment variables, log onto the build agent machine and go to Control Panel, System, Advanced and press the Environment Variables button.

System properties dialog

Then, in the System Variables section, press New and enter the environment variable value.

System properties dialog

For the Team Build Server to pick up the new environment variable values, you will need to restart the build agent process. To do this, open up a command prompt as a user with administrative rights on the build agent and type:-

  • For TFS 2005
    net stop "Team Build Service"
    net start "Team Build Service"

  • For TFS 2008
    net stop "Visual Studio Team Foundation Build"
    net start "Visual Studio Team Foundation Build"

Products affected:

  • Teamprise Explorer
  • Teamprise Plugin for Eclipse

Releases affected:

  • 3.0

Platforms affected:

  • Microsoft Windows (x86)
Keywords: tfs build, team build, ant, team foundation build, msbuild