Share via


GetBuildProperties Task

The GetBuildProperties task outputs the initial values for the build properties.

Parameters

Parameter

Description

TeamFoundationServerUrl

Specifies the Team Foundation Server URL. For example, http://MyServer:8080.

BuildUri

Specifies the build URI.

BuildAgentName

Output parameter. Specifies the build agent name.

BuildAgentUri

Output parameter. Specifies the build agent URI.

BuildDirectory

Output parameter. Specifies the build directory on the build agent.

BuildDefinitionName

Output parameter. Specifies the build definition name.

BuildDefinitionUri

Output parameter. Specifies the build definition URI.

BuildNumber

Output parameter. Specifies the build number.

CompilationStatus

Output parameter. Specifies the build's compilation status.

CompilationSuccess

Output parameter. Specifies a Boolean value that indicates whether the compilation succeeded or failed.

ConfigurationFolderUri

Output parameter. Specifies the version control URI of the folder in which the TFSBuild.proj and TFSBuild.rsp files are stored.

Droplocation

Output parameter. Specifies the shared folder where the build binaries and log files are stored.

LabelName

Output parameter. Specifies the name of the label that is being created for the build.

LastChangedBy

Output parameter. Specifies the user who changed the build most recently.

LastChangedOn

Output parameter. Specifies the the date and time when the build changed most recently.

LogLocation

Output parameter. Specifies the location of the log file for the build.

MachineName

Output parameter. Specifies the name for build agent computer.

MaxProcesses

Output parameter. Specifies the maximum number of processes that can run on the build agent.

Port

Output parameter. Specifies the port that is used to communicate with Team Foundation application services.

Quality

Output parameter. Specifies the quality of the build.

Reason

Output parameter. Specifies the internal name that indicates whether the build was queued manually by a user or automatically by the build definition trigger.

RequestedBy

Output parameter. Specifies the person who requested the build.

RequestedFor

Output parameter. Specifies the person on whose behalf the build was requested.

SourceGetVersion

Output parameter. Indicates the version specification of the files that were downloaded from version control.

StartTime

Output parameter. Specifies the build start time.

Status

Output parameter. Specifies the overall status of the build.

TeamProject

Output parameter. Specifies the name of the team project that is being built.

TestStatus

Output parameter. Specifies the status of the test phase of the build.

TestSuccess

Output parameter. Specifies a Boolean value that indicates whether the tests succeeded or failed. If no tests were run, the value of this parameter is set to True.

Remarks

The GetBuildProperties task is defined in the Microsoft.TeamFoundation.Build.Tasks.VersionControl.dll. The Microsoft.TeamFoundation.Build.targets file contains an instance of the GetBuildProperties task that Team Foundation Build uses as a default implementation for the InitializeBuildProperties target.

The <root>:\Program Files\MSBuild\Microsoft\VisualStudio\TeamBuild folder on the Team Foundation Build computer contains the Microsoft.TeamFoundation.Build.targets file.

Example

The following example shows the default instance of GetBuildProperties task defined in the Microsoft.TeamFoundation.Build.targets file.

<GetBuildProperties     TeamFoundationServerUrl="$(TeamFoundationServerUrl)"
     BuildUri="$(BuildUri)">
    <Output TaskParameter="BuildAgentName" PropertyName="BuildAgentName" />
    <Output TaskParameter="BuildAgentUri" PropertyName="BuildAgentUri" />
    <Output TaskParameter="BuildDirectory" PropertyName="BuildDirectory" />
    <Output TaskParameter="BuildDefinitionName" PropertyName="BuildDefinitionName" />
    <Output TaskParameter="BuildDefinitionUri" PropertyName="BuildDefinitionUri" />
    <Output TaskParameter="BuildNumber" PropertyName="BuildNumber" />
    <Output TaskParameter="CompilationStatus" PropertyName="CompilationStatus" />
    <Output TaskParameter="CompilationSuccess" PropertyName="CompilationSuccess" />
    <Output TaskParameter="ConfigurationFolderUri" PropertyName="ConfigurationFolderUri" />    <Output TaskParameter="DropLocation" PropertyName="DropLocation" />
    <Output TaskParameter="LabelName" PropertyName="FullLabelName" />
    <Output TaskParameter="LastChangedBy" PropertyName="LastChangedBy" />
    <Output TaskParameter="LastChangedOn" PropertyName="LastChangedOn" />
    <Output TaskParameter="LogLocation" PropertyName="LogLocation" />
    <Output TaskParameter="MachineName" PropertyName="MachineName" />
    <Output TaskParameter="MaxProcesses" PropertyName="MaxProcesses" />
    <Output TaskParameter="Port" PropertyName="Port" />
    <Output TaskParameter="Quality" PropertyName="Quality" />
    <Output TaskParameter="Reason" PropertyName="Reason" />
    <Output TaskParameter="RequestedBy" PropertyName="RequestedBy" />
    <Output TaskParameter="RequestedFor" PropertyName="RequestedFor" />
    <Output TaskParameter="SourceGetVersion" PropertyName="SourceGetVersion" />
    <Output TaskParameter="StartTime" PropertyName="StartTime" />
    <Output TaskParameter="Status" PropertyName="Status" />
    <Output TaskParameter="TeamProject" PropertyName="TeamProject" />
    <Output TaskParameter="TestStatus" PropertyName="TestStatus" />
    <Output TaskParameter="TestSuccess" PropertyName="TestSuccess" />
</GetBuildProperties>

See Also

Tasks

How to: Customize Build Numbers

Concepts

Team Foundation Build Tasks

Other Resources

Customizing Team Foundation Build

Team Foundation Build Targets, Tasks, and Properties