Customizable Team Foundation Build Properties
This page is specific to:.NET Framework Version:2.03.54.0
Visual Studio Team System
Customizable Team Foundation Build Properties

MSBuild properties are key–value pairs you can use to configure builds. For more information, see MSBuild Properties.

The Microsoft.TeamFoundation.Build.targets file defines several MSBuild targets, tasks, and properties for Team Foundation Build. You can modify these properties 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.

In this document

Customizing VC++ builds

Properties Used to Customize Tasks

Properties that can be Overridden

The following table lists the properties that are defined for Team Foundation Build. You can override them in the TfsBuild.proj file to customize the build process. For more information, see How to: Customize the SolutionToBuild Item Group.

Property

Description

CustomPropertiesForClean

Set this property to pass custom values into every solution when Team Foundation Build calls the Clean target.

CustomPropertiesForBuild

Set this property to pass custom values into every solution when Team Foundation Build calls its default target (usually Build).

SkipClean

Set this property to skip the CoreClean target.

IncrementalGet

Set this property to true to do an incremental get. This is a convenience property that sets CleanCompilationOutputOnly to true, SkipInitializeWorkspace to true, and ForceGet to false.

IncrementalBuild

Set this property to true to do an incremental build. This is a convenience property that sets SkipClean to true, SkipInitializeWorkspace to true, and ForceGet to false.

CleanCompilationOutputOnly

Set this property to true to delete only the intermediate assemblies from the sources directory during the CoreClean target execution. If this property is set to false, the entire sources directory will be deleted during CoreClean target execution.

SkipGetChangesetsUpdateWorkItems

Set this property to true to skip the association of changesets and updating of work items for successful builds.

SolutionRoot

Set this property to point to the root of the sources folder on the build computer.

BinariesRoot

Set this property to point to the root of the binaries folder on the build computer.

LabelComment

Set this property to define the comment used by the Label task.

LabelName

Set this label name to define the name used by the Label task.  By default, the label name is set to $(BuildNumber) in the InitializeEndToEndIteration target.

OutDir

Set this property to define the location of the output files in the build working directory.

UpdateAssociatedWorkItemsOnBuildBreak

Set this property to true to update associated work items even for a broken build.

StopOnFirstFailure

Set this property to true to stop cleaning, compiling, and/or testing on the first failure encountered during build execution.

SkipGet

Set this property to skip the CoreGet target.

SkipLabel

Set this property to skip CoreLabel target.

SkipInitializeWorkspace

Set this property to skip the CoreInitializeWorkspace target.

SkipInvalidConfigurations

Set this property to false to generate an error rather than a warning when the user encounters an invalid configuration.

SkipPostBuild

Set this property to skip gathering associated changesets and work items.

SkipDropBuild

Set this property to skip the CoreDropBuild target.

SkipWorkItemCreation

Set this property to skip the CoreCreateWorkItem target.

CustomizableOutDir

Set this property to true when you want to prevent Team Foundation Build from setting OutDir for each solution. Note that you can use the TeamBuildPublishDir property to retrieve the value Team Foundation Build would have assigned to PublishDir if CustomizablePublishDir was set to false.

CustomizablePublishDir

Set this property to true when you want to prevent Team Foundation Build from setting the PublishDir directory for each solution. Note that you can use the TeamBuildPublishDir property to retrieve the value Team Foundation Build would have assigned to PublishDir if CustomizablePublishDir was set to false.

Customizing VC++ builds

Team Foundation Build also supports customizing the building of Visual C++ projects. You can use the following properties to set corresponding properties on the VCBuild task used by MSBuild to build Visual C++ projects. For more information, see VCBuild Task.

Team Build Property

VCBuild Task Property

Description

VCBuildAdditionalLibPaths

AdditionalLibPaths

Specifies additional paths to search for libraries before the LIB environment variable paths are searched (corresponds to the LIBPATH option for LINK.exe).

VCBuildAdditionalOptions

AdditionalOptions

Specifies additional command-line options that do not have dedicated task parameters.

VCBuildToolPath

ToolPath

Specifies the location from where the VCBuild task loads the underlying executable file (VCBuild.exe).

VCBuildUseEnvironment

UseEnvironment

Set this to true to use environment variables for PATH, INCLUDE, LIBS, and LIBPATH. Otherwise, set it to false. This property corresponds to the /useenv option for VCBuild.exe. For more information, see /useenv.

AdditionalVCOverrides

None

Use this property to specify additional options for the VCBuild task sheet file(s) generated by Team Foundation Build and specified in the Override property of the VCBuild task.

Properties Used to Customize Tasks

Each default Team Foundation Build task in the Microsoft.TeamFoundation.Build.targets file also includes a set of properties you can use 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
          TeamFoundationServerUrl="$(TeamFoundationServerUrl)"
          BuildUri="$(BuildUri)"
          BuildNumber="$(BuildNumber)"
          Description="$(WorkItemDescription)"
          TeamProject="$(TeamProject)"
          Title="$(WorkItemTitle)"
          WorkItemFieldValues="$(WorkItemFieldValues)"
          WorkItemType="$(WorkItemType)"
          ContinueOnError="true" />

To customize the work item that is created on build failure, set the WorkItemFieldValues in the TFSBuild.proj file:

NoteNote:

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

Concepts

Community Content

SkipLabel = true
Added by:B. Huard i

Be aware that setting SlipLabel=true will not associate changesets & work items to the build report.

This is because the list of the changesets is obtained by comparing the LastGoodLabel property.

This is only applicable to TFS 2008

Typo on CustomizableOutDir
Added by:Noelle Mallory - MSFT
There is a typo on CustomizableOutDir description. TeamBuildPublishDir should be TeamBuildOutDir.
Aaron Hallberg has posted a superset on his blog:
Added by:Charles Sterling

https://blogs.msdn.com/aaronhallberg/archive/2008/02/12/team-build-2008-property-reference.aspx

SkipGetChangesetsUpdateWorkItems don't exists!
Added by:Vincent Petetin
With TeamBuild 2008 (maybe 2005 too) the property SkipGetChangesetsUpdateWorkItems don't exists, remplace it by SkipGetChangesetsAndUpdateWorkItems !
(line 92 in %ProgramFiles%\MSBuild\Microsoft\VisualStudio\TeamBuild\Microsoft.TeamFoundation.Build.targets file)
CustomizableOutDir description typo
Added by:JamesBristowII
The description

"Set this property to true when you want to prevent Team Foundation Build from setting OutDir for each solution. Note that you can use the TeamBuildPublishDir property to retrieve the value Team Foundation Build would have assigned to PublishDir if CustomizablePublishDir was set to false."

should read

"Set this property to true when you want to prevent Team Foundation Build from setting OutDir for each solution. Note that you can use the TeamBuildOutDir property to retrieve the value Team Foundation Build would have assigned to OutDir if CustomizableOutDir was set to false."

This is supported by Aaron Hallberg's blog http://blogs.msdn.com/aaronhallberg/archive/2007/06/07/preserving-output-directory-structures-in-orcas-team-build.aspx
© 2009 Microsoft Corporation. All rights reserved.   Terms of Use | Trademarks | Privacy Statement
Page view tracker
Rate the Lightweight library
x
Lightweight builds on ScriptFree (loband) by adding features you've requested: a SearchBox and default code language selection.
Do you like the SearchBox?
Do you like the tabbed code blocks?
How useful is this topic?
Tell us more.
Thanks
x
You're helping to improve MSDN Online.
Feedback
Switch View
Classic
Lightweight Beta
ScriptFree
Switch View