Stop Command (Team Foundation Build)

You can use the stop command to stop a currently running build definition for Team Foundation Build.

Required Permissions

To use the stop command, you must have the Stop builds security permission in Visual Studio Team Foundation Server set to Allow. For more information, see Team Foundation Server Permissions.

TFSBuild stop /collection:teamProjectCollectionUrl /buildDefinition:definitionSpec buildNumbers [/noprompt] [/silent]
TFSBuild stop /collection:teamProjectCollectionUrl buildUris [/noprompt] [/silent]  
TFSBuild stop teamProjectCollectionUrl teamProject buildNumbers  [/noprompt] [/silent]  





The URL of the team project collection that contains the builds that you want to stop (for example, http://myserver:8080/tfs/DefaultCollection).


The team project name for which this build exists.


The build or builds that must be stopped. If the build number has spaces, enclose the spaces with quotation marks. For example, "myBuild 123".


The list of build URIs that specify the build definitions that you want to stop.


The specification of the build definition or definitions that you want to stop.




Specifies the team project collection.


Do not prompt when stopping a build.


Do not write output to the console while stopping the build or builds.


Specifies the build definitions that you want to stop.


The following example stops running build number Nightly.025, which is in the AdventureWorks team project in the collection at the following location: http://myserver:8080/DefaultCollection.

>TFSBuild stop http://myserver:8080/DefaultCollection AdventureWorks Nightly.025

The following example stops running a build named Nightly, which is associated with the Nightly.20130.0 definitionspec.

>TFSBuild stop /collection:http://myserver:8080/DefaultCollection /builddefinition:\teamproject\Nightly Nightly.20130.0

The following example stops running two builds defined by the build URIs of "vstfs:///Nightly/Nightly/1" and "vstfs:///Nightly/Nightly/2" on server01.

> TFSBuild stop /collection:http://myserver:8080/DefaultCollection vstfs:///Nightly/Nightly/1 vstfs:///Nightly/Nightly/2

See Also


Stop an In-Progress Build

Create a Basic Build Definition


Run and Monitor Builds

Define Your Build Process

Other Resources

Team Foundation Build Commands