Get Task

The Get task retrieves a read-only copy of the files and folders in a workspace by using specified options.

Parameters

Property Description

Workspace

Specifies the workspace name.

Recursive

Specifies whether or not files are retrieved recursively. Set the RecursiveGet property to false in the TfsBuild.proj file to do a non-recursive get in a Team Foundation Build type.

Force

Specifies whether or not the files are retrieved incrementally. To do an incremental get in a Team Foundation Build type, set the ForceGet property to false in the TfsBuild.proj file.

Remarks

The Get task is defined in the Microsoft.TeamFoundation.Build.Tasks.VersionControl.dll. The Microsoft.TeamFoundation.Build.targets file contains an instance of the Get task that Team Foundation Build uses as a default implementation for the CoreGet target. You can also customize the build process by defining a different instance of the Get task for a build type in the TfsBuild.proj file. For more information about how to customize a task, see How to: Modify the Scope of Changesets and Work Items Associated With a Build Type.

Microsoft.TeamFoundation.Build.targets file is stored in the <root>:\Program Files\MSBuild\Microsoft\VisualStudio\v8.0\TeamBuild folder on the Team Foundation Build computer.

Example

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

<Get
    Condition=" '$(SkipGet)'!='true' "
    Workspace="$(WorkspaceName)"
    Recursive="$(RecursiveGet)"
    Force="$(ForceGet)" />

See Also

Tasks

How to: Customize Build Numbers

Reference

Get Command

Concepts

Team Foundation Build Tasks

Other Resources

Customizing Team Foundation Build
Team Foundation Build Targets, Tasks, and Properties