Start Command (Team Foundation Build)
Use the start command to run a configured build definition for Team Foundation Build.
To use the start command, you must have the Queue builds and View build definition security permissions in Visual Studio Team Foundation Server set to Allow. Additionally, the application-tier service account and the Team Foundation Build service account must have read/write permissions to the build drop location. For more information, see Team Foundation Server Permissions.
TFSBuild start /collection:teamProjectCollectionUrl /builddefinition:definitionSpec [/droplocation:droplocation] [/getoption:getoption] [/customgetversion:versionSpec] [/priority:priority] [/requestedfor:userName] [/msbuildarguments:args] [/shelveset:shelvesetName [/checkin]] [/silent] [/queue]
TFSBuild start teamProjectCollectionUrl teamProject definitionName [/droplocation:droplocation] [/getoption:getoption] [priority:priority] [/customgetversion:versionSpec] [/requestedfor:userName] [/shelveset:shelvesetName [/checkin]] [/msbuildarguments:args] [/silent] [/queue]
URL of the team project collection that contains the solutions and projects that are being built.
Name of the team project that contains the solutions and projects being built.
Name of the build definition in the team project that you want to use for the build.
Path to the public folder where the build's binaries and log files are stored after the build is completed. For example, \\server\share. This is used with the /droplocation option.
Used with the /getoption option. Valid values are LatestOnQueue, LatestOnBuild, and Custom.
Queue priority to use for the build definition. You use this argument with the /priority option.
Valid values are Low, BelowNormal, Normal, AboveNormal, and High.
Name of the user whom you want to associate with the completed build.
Command-line arguments to pass to MSBuild.
Specify the name of a shelveset if you want to start a private build or are starting a build that is defined with the gated check-in trigger.
Specifies the team project collection.
Optional. Specifies the directory where the build process occurs. It can be abbreviated as /d. By default, the build directory specified in the build definition is used.
When you select the build directory, make sure that the build space is sufficient because insufficient space will lead to canceled builds.
Optional. Specifies the files that you want to get from version control.
Optional. Specifies the custom version of files that you want to get if you specify the value of /getoption as Custom.
Optional. Specifies the build queue priority.
Optional. Specifies for whom the build was requested.
Optional. Specifies command-line arguments to pass to MSBuild.
The general format is:
Optional. Specify the name of a shelveset if you want to start a private build or are starting a build that is defined with the gated check-in trigger.
Optional. This option applies only if you are starting a build that is defined with the gated check-in trigger. Specify this option if you want the system to check in the files if the build is successful.
Optional. When you specify this option, the output is not written to the Command Prompt window when the build is running.
Inserts the build's start request into the build queue and returns immediately.
You can use the Team Foundation command-line command TFSBuild start with the Task Scheduler service to perform recurring or nightly builds.
If you build more than one solution, consider one solution having dependencies on another when you determine the order in which they are built. For example, set Solution1 to be built before Solution2 in the case where Solution2 has a dependency on Solution1.
By default, the drop directory is not automatically created as a share. Therefore, it is not available for publishing builds and test results. You must manually establish a share and add write permissions to the Windows directory and share permissions for both the account that is used to run the Team Build Service for dropping builds and for the tester's account for publishing test results.
The following example builds the Nightlies build type that is in the AdventureWorks team project in the team project collection at http://myserver:8080/DefaultCollection. The resulting build is located in the BuildDrop directory.
>TFSBuild start http://myserver:8080/DefaultCollection /builddefinition:"AdventureWorks\Nightlies" /droplocation:"\\computername\buildDrops"
The following example builds the Nightlies build type that is in the AdventureWorks team project in the collection at http://myserver:8080/DefaultCollection. The resulting build is in the BuildDrop directory. Use the /msbuildarguments option to pass in the MSBuild verbosity level of diagnostic. For more information, see MSBuild Command Line Reference.
>TFSBuild start http://myserver:8080/DefaultCollection /builddefinition:"AdventureWorks\Nightlies" /droplocation:"\\computername\buildDrops" /msbuildarguments:"/flp:verbosity=diag"