TfsSource Class

TFS Build Extensions

Collapse image Expand Image Copy image CopyHover image
Activity to wrap TF.exe commands for simple integration in the build process.

Valid Action values are:

Add - Add an item

Checkin - Checkin pending changes

Checkout - Checkout an item

Delete - Delete an item

Undelete - Undelete a deleted item

UndoCheckout - Undo a checked out item

Namespace: TfsBuildExtensions.Activities.TeamFoundationServer
Assembly: TfsBuildExtensions.Activities (in TfsBuildExtensions.Activities.dll) Version: 1.0.0.0 (1.0.0.6)

Examples

CopyXML
<Sequence DisplayName="TFSBuildExtensions TfsSource Sequence">
<Sequence.Variables>
    <Variable x:TypeArguments="x:String" Default="C:\Builds\1\Tailspin Toys\Tailspin Toys - Iteration 2 - Extension\Sources\Development\Iteration 2\VB6\Class1.cls" Name="ItemSpec" />
    <Variable x:TypeArguments="x:String" Default="C:\Builds\1\Tailspin Toys\Tailspin Toys - Iteration 2 - Extension\Sources\Development\Iteration 2\VB6" Name="WorkingDirectory" />
    <Variable x:TypeArguments="x:String" Default="A checkin comment" Name="CheckinComment" />
    <Variable x:TypeArguments="x:String" Default="A policy override reason" Name="OverrideReason" />
    <Variable x:TypeArguments="x:String" Default="DefaultCollection" Name="ProjectCollection" />
</Sequence.Variables>
<!-- Add item to version control -->
<tat:TfsSource 
    DisplayName="Add file" 
    Action="[TfsAction.Add]" 
    Itemspec="[ItemSpec]" 
    WorkingDirectory="[WorkingDirectory]" />
<!-- Checkin pending changes with comment -->
<tat:TfsSource 
    DisplayName="Checkin" 
    Action="[TfsAction.Checkin]" 
    Collection="[ProjectCollection]" 
    Comments="[CheckinComment]" 
    OverrideReason="{x:Null}" 
    Notes="{x:Null}" 
    Recursive="{x:Null}" 
    WorkingDirectory="[WorkingDirectory]" />
<!-- Checkin pending changes with policy override -->
<tat:TfsSource 
    DisplayName="Checkin" 
    Action="[TfsAction.Checkin]" 
    Collection="[ProjectCollection]" 
    OverrideReason="[OverrideReason]" 
    WorkingDirectory="[WorkingDirectory]" />
<!-- Checkout item from version control -->
<tat:TfsSource 
    DisplayName="Checkout" 
    Action="[TfsAction.Checkout]" 
    Itemspec="[ItemSpec]" 
    WorkingDirectory="[WorkingDirectory]" />
<!-- Delete item from version control -->
<tat:TfsSource 
    DisplayName="Delete file" 
    Action="[TfsAction.Delete]" 
    Collection="[ProjectCollection]" 
    Itemspec="[ItemSpec]" 
    WorkingDirectory="[WorkingDirectory]" />
<!-- Undelete delete from version control -->
<tat:TfsSource 
    DisplayName="Undelete file" 
    Action="[TfsAction.Undelete]" 
    Itemspec="[ItemSpec]" 
    WorkingDirectory="[WorkingDirectory]" />
<!-- Undo Checkout -->
<tat:TfsSource 
    DisplayName="Undo Checkout" 
    Action="[TfsAction.UndoCheckout]" 
    Collection="[ProjectCollection]" 
    Itemspec="[ItemSpec]" 
    WorkingDirectory="[WorkingDirectory]" />
</Sequence>

Inheritance Hierarchy

System..::..Object
  System.Activities..::..Activity
    System.Activities..::..CodeActivity
      TfsBuildExtensions.Activities..::..BaseCodeActivity
        TfsBuildExtensions.Activities.TeamFoundationServer..::..TfsSource

See Also