Creating a Build Definition for Visual Studio 2005 Team Foundation Server
Before you can build your application, you must first create a build definition. A build definition specifies which Eclipse projects to compile, and where builds should occur. After you create a build definition, you can queue builds.
When you create build definitions for Visual Studio 2005 Team Foundation Server, you must manually run those builds. For more information, see Queuing a Build for Visual Studio 2005 Team Foundation Server.
To create a build definition for Visual Studio 2005 Team Foundation Server, you perform the following tasks:
You should complete the sections of this process in order. The task is broken out into smaller procedures to improve readability.
To perform this procedure, you must have the Edit Build Definition permission set to Allow. For more information, see the following page on the Microsoft Web site: Team Foundation Server Permissions.
Start the Create Build Configuration Wizard
In Team Explorer, expand the team project for which you want to create a build definition.
Right-click the Builds node and click New Build Definition.
The Create Build Configuration Wizard appears.
In the Wizards list, verify that MS Build Configuration from Existing Ant Builds is highlighted.
Next, you specify a name and description for your build definition.
Specify a Name and Description for the Build Definition
In Build definition name, type the name that you want to give this build definition.
The specified name must be unique within the team project.
(Optional) In Description, provide a description for this build definition.
Next, you specify the workspace folders that you want to include in the build.
Specify the Working Folders to Include in the Build
On the Build Workspace tab, you specify the folders to include in the build. Each path is mapped to a relative location underneath a root build directory on the build agent that is referenced as $(SourceDir). The build agent will be running on a Windows operating system. Therefore, the relative Local Folder paths must be provided by using naming conventions for Windows directories. For example, you must use the backslash (\) as a path separator. These mappings are used to produce a file that is named WorkspaceMappings.xml that is used by Team Foundation Build.
By default, the whole team project is included, but you should consider including only the folders that are required for your build definition. By doing this, you can reduce the number of files that are downloaded from version control to perform the build.
To change the Working folders, perform one of the following tasks:
To copy another Team Foundation Server workspace definition, click Copy Existing Workspace and then specify the Team Foundation Server workspace that you want to copy.
To add a new working folder, click Click here to enter a new working folder. Specify a Source Control Folder, and a Local Folder for each working folder that you add. You can click browse (...) to specify the folders.
To remove a working folder, right-click the folder that you want to delete, and click Delete.
Next, you specify the Ant build file for the build.
Specify the Ant Build File for this Build
You must specify an Ant build file (typically named build.xml). Otherwise, the build will fail because it will be unable to find the build file during the build process.
In Build File, specify the Ant build file on the version control server.
Next, you specify the build location.
Specify the Build Location
In On which machine would you like to build the selected project, specify the name of the computer on which you want the build to run.
This name must be addressable by the Team Foundation Server application tier. You can specify either a short name, such as MyTfsServer, or a fully qualified domain name, such as MyTfsServer.MyCompany.com.
In Build directory on selected machine, specify a valid directory on the build server that you want to use to perform the build.
Because the build agent runs on Windows, you must specify a valid Windows path.
In Drop location, provide a valid path to a Windows file share (or a Server Message Block share). The build server will copy the build output to this path.
You must specify the path in the Uniform Naming Convention (UNC) format, such as \\ServerName\Share.
Click Finish to save your build definition to Team Foundation Server.
If you need to later modify your build definition, you must modify the build definition files. For more information, see Modifying a Build Definition for Visual Studio 2005 Team Foundation Server.