TeamBuild Class | MSBuild Extension Pack Help 4.0.12.0 |
Valid TaskActions are:
GetLatest (Required: TeamFoundationServerUrl, TeamProject Optional: BuildDefinitionName, Status Output: Info)
Queue (Required: TeamFoundationServerUrl, TeamProject, BuildDefinitionName Optional: DropLocation)
RelatedChangesets (Required: TeamFoundationServerUrl, TeamProject Optional: BuildUri, BuildDefinitionName Output: Info, RelatedItems)
RelatedWorkItems (Required: TeamFoundationServerUrl, TeamProject Optional: BuildUri, BuildDefinitionName Output: Info, RelatedItems)
Remote Execution Support: NA
Inheritance Hierarchy
MSBuild.ExtensionPackBaseTask
MSBuild.ExtensionPack.Tfs2012TeamBuild
Namespace: MSBuild.ExtensionPack.Tfs2012
Assembly: MSBuild.ExtensionPack.Tfs2012 (in MSBuild.ExtensionPack.Tfs2012.dll) Version: 4.0.0.0
The TeamBuild type exposes the following members.
Constructors
Name | Description | |
---|---|---|
TeamBuild |
Properties
Name | Description | |
---|---|---|
BuildDefinitionName |
The name of the build definition.
| |
BuildUri |
Build Uri. Defaults to latest build.
| |
DropLocation |
The name of the Drop folder
| |
Info |
Gets the Build information
| |
RelatedItems |
Gets Related items associated with the build
| |
Status |
Set the Status property of the build to filter the search. Supports: Failed, InProgress, NotStarted, PartiallySucceeded, Stopped, Succeeded
| |
TeamFoundationServerUrl |
The Url of the Team Foundation Server.
| |
TeamProject |
The name of the Team Project containing the build
|
Examples
<Project ToolsVersion="4.0" DefaultTargets="Default" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <PropertyGroup> <TPath>$(MSBuildProjectDirectory)\..\MSBuild.ExtensionPack.tasks</TPath> <TPath Condition="Exists('$(MSBuildProjectDirectory)\..\..\Common\MSBuild.ExtensionPack.tasks')">$(MSBuildProjectDirectory)\..\..\Common\MSBuild.ExtensionPack.tasks</TPath> </PropertyGroup> <Import Project="$(TPath)"/> <PropertyGroup> <TeamFoundationServerUrl>http://YOURSERVER:8080/</TeamFoundationServerUrl> <TeamProject>YOURPROJECT</TeamProject> <BuildUri></BuildUri> <BuildDefinitionName>YOURDEF</BuildDefinitionName> </PropertyGroup> <Target Name="Default"> <!-- Get information on the latest build --> <MSBuild.ExtensionPack.Tfs2012.TeamBuild TaskAction="GetLatest" TeamFoundationServerUrl="$(TeamFoundationServerUrl)" TeamProject="$(TeamProject)" BuildDefinitionName="$(BuildDefinitionName)"> <Output ItemName="BuildInfo" TaskParameter="Info"/> </MSBuild.ExtensionPack.Tfs2012.TeamBuild> <Message Text="BuildDefinitionUri: %(BuildInfo.BuildDefinitionUri)"/> <Message Text="BuildFinished: %(BuildInfo.BuildFinished)"/> <Message Text="BuildNumber: %(BuildInfo.BuildNumber)"/> <Message Text="BuildUri: %(BuildInfo.BuildUri)"/> <Message Text="CompilationStatus: %(BuildInfo.CompilationStatus)"/> <Message Text="CompilationSuccess: %(BuildInfo.CompilationSuccess)"/> <Message Text="DropLocation: %(BuildInfo.DropLocation)"/> <Message Text="FinishTime: %(BuildInfo.FinishTime)"/> <Message Text="KeepForever: %(BuildInfo.KeepForever)"/> <Message Text="LabelName: %(BuildInfo.LabelName)"/> <Message Text="LastChangedBy: %(BuildInfo.LastChangedBy)"/> <Message Text="LastChangedOn: %(BuildInfo.LastChangedOn)"/> <Message Text="LogLocation: %(BuildInfo.LogLocation)"/> <Message Text="Quality: %(BuildInfo.Quality)"/> <Message Text="Reason: %(BuildInfo.Reason)"/> <Message Text="RequestedBy: %(BuildInfo.RequestedBy)"/> <Message Text="RequestedFor: %(BuildInfo.RequestedFor)"/> <Message Text="SourceGetVersion: %(BuildInfo.SourceGetVersion)"/> <Message Text="StartTime: %(BuildInfo.StartTime)"/> <Message Text="TestStatus: %(BuildInfo.TestStatus)"/> <Message Text="TestSuccess: %(BuildInfo.TestSuccess)"/> <!-- Queue a new build --> <MSBuild.ExtensionPack.Tfs2012.TeamBuild TaskAction="Queue" TeamFoundationServerUrl="$(TeamFoundationServerUrl)" TeamProject="$(TeamProject)" BuildDefinitionName="$(BuildDefinitionName)"/> <!-- Retrieve Changesets associated with a given build --> <MSBuild.ExtensionPack.Tfs2012.TeamBuild TaskAction="RelatedChangesets" TeamFoundationServerUrl="$(TeamFoundationServerUrl)" TeamProject="$(TeamProject)" BuildUri="$(BuildUri)" BuildDefinitionName="$(BuildDefinitionName)"> <Output ItemName="Changesets" TaskParameter="RelatedItems"/> </MSBuild.ExtensionPack.Tfs2012.TeamBuild> <Message Text="ID = %(Changesets.Identity), Checked In By = %(Changesets.CheckedInBy), URI = %(Changesets.ChangesetUri), Comment = %(Changesets.Comment)"/> <!-- Retrieve Work Items associated with a given build --> <MSBuild.ExtensionPack.Tfs2012.TeamBuild TaskAction="RelatedWorkItems" TeamFoundationServerUrl="$(TeamFoundationServerUrl)" TeamProject="$(TeamProject)" BuildUri="$(BuildUri)" BuildDefinitionName="$(BuildDefinitionName)"> <Output ItemName="WorkItems" TaskParameter="RelatedItems"/> </MSBuild.ExtensionPack.Tfs2012.TeamBuild> <Message Text="ID = %(Workitems.Identity), Status = %(Workitems.Status), Title = %(Workitems.Title), Type = %(Workitems.Type), URI = %(Workitems.WorkItemUri), AssignedTo = %(Workitems.AssignedTo)"/> </Target> </Project>
See Also