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.
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.
Set this property to pass custom values into every solution when Team Foundation Build calls the Clean target.
Set this property to pass custom values into every solution when Team Foundation Build calls its default target (usually Build).
Set this property to skip the CoreClean target.
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.
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.
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.
Set this property to true to skip the association of changesets and updating of work items for successful builds.
Set this property to point to the root of the sources folder on the build computer.
Set this property to point to the root of the binaries folder on the build computer.
Set this property to define the comment used by the Label task.
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.
Set this property to define the location of the output files in the build working directory.
Set this property to true to update associated work items even for a broken build.
Set this property to true to stop cleaning, compiling, and/or testing on the first failure encountered during build execution.
Set this property to skip the CoreGet target.
Set this property to skip CoreLabel target.
Set this property to skip the CoreInitializeWorkspace target.
Set this property to false to generate an error rather than a warning when the user encounters an invalid configuration.
Set this property to skip gathering associated changesets and work items.
Set this property to skip the CoreDropBuild target.
Set this property to skip the CoreCreateWorkItem target.
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.
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 Visual C++ 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
Specifies additional paths to search for libraries before the LIB environment variable paths are searched (corresponds to the LIBPATH option for LINK.exe).
Specifies additional command-line options that do not have dedicated task parameters.
Specifies the location from where the VCBuild task loads the underlying executable file (VCBuild.exe).
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.
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.
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:
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>