WorkspaceItemConverterTask Task

The WorkspaceItemConverterTask task converts server items to local items and local items to server items.

Parameters

Property

Description

Condition

Specifies a Boolean expression that the MSBuild engine uses to determine whether this task will be executed. For information, see MSBuild Conditions.

TeamFoundationServerUrl

Specifies the Team Foundation Server URL. For example, http://MyServer:8080.

WorkspaceName

Specifies the workspace name.

WorkspaceOwner

Specifies the workspace owner.

ServerItems

Input/output parameter. Specifies the server items that are converted to local items. This parameter also receives the converted local items.

LocalItems

Input/output parameter. Specifies the local items that are converted to server items. This parameter also receives the converted server items.

Remarks

The Microsoft.TeamFoundation.Build.targets file contains an instance of the WorkspaceItemConverterTask task that Team Foundation Build uses as a default implementation for the ResolveSolutionPathsForEndToEndIteration or ResolveTestFilesForEndToEndIteration target.

The <root>:\Program Files\MSBuild\Microsoft\VisualStudio\TeamBuild folder on the Team Foundation Build computer contains the Microsoft.TeamFoundation.Build.targets file.

Example

The following XML describes the instances of WorkspaceItemConverterTask in the Microsoft.TeamFoundation.Build.targets file that are used to resolve the test file paths.

<WorkspaceItemConverterTask
    Condition=" '@(MetaDataFile)' != '' "
    TeamFoundationServerUrl="$(TeamFoundationServerUrl)"
    WorkspaceName="$(WorkspaceName)"
    WorkspaceOwner="$(WorkspaceOwner)"
    ServerItems="@(MetaDataFile)">
    <Output TaskParameter="LocalItems" ItemName="LocalMetaDataFile" />
    </WorkspaceItemConverterTask>

<WorkspaceItemConverterTask
    Condition=" '@(TestContainer)' != '' "
    TeamFoundationServerUrl="$(TeamFoundationServerUrl)"
    WorkspaceName="$(WorkspaceName)"
    WorkspaceOwner="$(WorkspaceOwner)"
    ServerItems="@(TestContainer)">
    <Output TaskParameter="LocalItems" ItemName="LocalTestContainer" />
</WorkspaceItemConverterTask>

The following XML describes the instances of WorkspaceItemConverterTask in the Microsoft.TeamFoundation.Build.targets file that are used to resolve the solution file paths.

<WorkspaceItemConverterTask
    Condition=" '@(SolutionToBuild)' != '' " 
    TeamFoundationServerUrl="$(TeamFoundationServerUrl)"
    WorkspaceName="$(WorkspaceName)"
    WorkspaceOwner="$(WorkspaceOwner)"
    ServerItems="@(SolutionToBuild)">
  <Output TaskParameter="LocalItems" ItemName="LocalSolutionToBuild" />
</WorkspaceItemConverterTask>

<WorkspaceItemConverterTask
    Condition=" '@(SolutionToPublish)' != '' " 
    TeamFoundationServerUrl="$(TeamFoundationServerUrl)"
    WorkspaceName="$(WorkspaceName)"
    WorkspaceOwner="$(WorkspaceOwner)"
    ServerItems="@(SolutionToPublish)">
    <Output TaskParameter="LocalItems" ItemName="LocalSolutionToPublish" />
</WorkspaceItemConverterTask>

See Also

Tasks

Customize Build Numbers

Other Resources

Team Foundation Build Targets, Tasks, and Properties