How to: Stop a Build (Command-Line)
The Team Foundation user interface in Team Foundation Server enables you to stop a build already in progress. However, you can also stop a build by using the command TFSBuild stop.
Before you run the TFSBuild stop command, you must have the following information:
Name of the team project that contains the solution that is being built
Build number of the Team Foundation Build type you want to stop
URL of the Team Foundation server
For more information, see Stop Command (Team Foundation Build).
To complete this task, you must have Administer a build permission set to Allow. For more information, see Team Foundation Server Permissions.
The following steps show you how to stop a build already in progress.
To stop a currently running build
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.
At the command prompt type:
c:\>TFSBuild stop http://servername:8080 TeamProjectName BuildNumber
The BuildNumber must be enclosed in quotation marks if it contains spaces. The typical format for the BuildNumber is BuildType_yyyymmdd.x, where the yyyy specifies the year, for example, 2010. The mm specifies month, for example, 05, and dd specifies the day, for example, 21. The x specifies the build increment on that day, for example, for the first build of a given date x would be 1. You can also customize the build numbering format. For more information, see How to: Customize Build Numbers
When you are prompted, type "y" at the command prompt to begin stopping the build. As an option, you can enter the /noprompt option to run the command without prompts.
The build status icon on the Queued tab of Build Explorer changes to Stopped.
For more information, see How to: View Build Summary Status.