Click to Rate and Give Feedback
MSDN
MSDN Library
Visual Studio 2008
Team Foundation
 How to: Start a Build from the Comm...
Collapse All/Expand All Collapse All
This page is specific to
Microsoft Visual Studio 2008/.NET Framework 3.5

Other versions are also available for the following:
Visual Studio Team System
How to: Start a Build from the Command Line

You can use the TFSBuild start command to start a configured Team Foundation Build type from the command line.

Starting a build from the command line is a useful way of running timed builds by including them in batch or script files. Before you run the TFSBuild start command, you must have the following information:

  • Name of the team project that contains the solution you want to build

  • Name of the Team Foundation Build build definition

  • URL of the Team Foundation server

The following information is optional:

  • Name of the computer where the solutions are built

  • Directory where the build files are stored

    NoteNote:

    If you do not provide values, the default values for the build definition are used.

For more information, see Start Command (Team Foundation Build).

Required Permissions

To complete this procedure, you must have the Team Foundation Server Start a build security permission set to Allow. For more information, see Team Foundation Server Permissions.

The following procedure demonstrates the command-line syntax for starting a Team Foundation Build type.

To start a build definition from the command-line

  1. Click Start, click All Programs, point to Microsoft Visual Studio 9.0, point to Visual Studio Tools, and then click Visual Studio 2008 Command Prompt.

  2. At the command prompt type:

    <root>:\>TFSBuild start http://server01:8080 AdventureWorks Nightlies 

    Where the Team Foundation Server is the server specified by the build definition, "Nightlies" and the built files are saved in the build drop location, which is also specified by the build definition. The <root> specifies the drive, usually "C". The "http://server01" specifies the URL for the Team Foundation server, "AdventureWorks" specifies the team project, and "Nightlies" specifies the build definition.

Setting Up a Scheduled Build

The Team Foundation user interface in Team Foundation Server does not include an ability to run scheduled builds. However, you can access that functionality by using the Windows Task Scheduler service and the TFSBuild start command.

Tags What's this?: Add a tag
Community Content   What is Community Content?
Add new content RSS  Annotations
Processing
© 2012 Microsoft. All rights reserved. Terms of Use | Trademarks | Privacy Statement
Page view tracker