Customizable Team Foundation Build Properties
MSBuild properties are key-value pairs that can be used to configure builds. For more information, see MSBuild Properties.
Microsoft.TeamFoundation.Build.targets file defines several MSBuild targets, tasks, and properties for Team Foundation Build. These properties can be modified in the TfsBuild.proj file to:
Pass values to Team Foundation Build tasks and targets.
Override certain build actions.
For more information about the TfsBuld.proj file, see Understanding Team Foundation Build Configuration Files.
Properties that can be Overridden
The following table lists the properties that are defined for Team Foundation Build and can be overridden in the TfsBuild.proj file to customize the build process.
Property | Description |
---|---|
SkipClean |
Set this property to skip a clean action. |
SkipGet |
Set this property to skip a get action. |
SkipLabel |
Set this property to skip a labeling action. |
SkipInitializeWorkspace |
Set this property to skip a workspace creation action. |
SkipPostBuild |
Set this property to skip gathering associated changesets and work items. |
SkipDropBuild |
Set this property to skip a drop build action. |
SkipWorkItemCreation |
Set this property to skip work item creation on build failure. |
AdditionalVCOverrides |
Property sheets that are passed to the Visual C++ solutions in the build process. |
SolutionRoot |
Specifies the root of the sources folder on build computer. Use this property to specify a file in the build directory regarding the sources folder. For example: SourceFiles="$(SolutionRoot)\HelloWorldTest\HelloWorldTestInstaller\Debug\HelloWorldTestInstaller.msi |
Properties Used to Customize Tasks
Each default Team Foundation Build task in the Microsoft.TeamFoundation.Build.targets file also includes a set of properties that can be used to customize the task. For more information about Team Foundation Build tasks, see Team Foundation Build Tasks. For example, the CreateNewWorkItem task is defined as follows.
<!-- Create WorkItem for build failure -->
<CreateNewWorkItem
BuildId="$(BuildNumber)"
Description="$(WorkItemDescription)"
TeamProject="$(TeamProject)"
TeamFoundationServerUrl="$(TeamFoundationServerUrl)"
Title="$(WorkItemTitle)"
WorkItemFieldValues="$(WorkItemFieldValues)"
WorkItemType="$(WorkItemType)"
ContinueOnError="true" />
To customize the work item that is created on build failure, you set the WorkItemFieldValues in the TfsBuild.proj file:
Note
The following assumes that the Areapath and IterationPath properties have also been set.
<WorkItemFieldValues>Area Path=$(AreaPath);Iteration Path=$(IterationPath);Severity=1;Priority=0;Symptom=build break;Steps To Reproduce=Start the build using Team Build;Source=Development;How Found=Build Break;Assigned To=Active</WorkItemFieldValues>
See Also
Tasks
How To: Use Environment Variables in a Build