TfsSource Class | MSBuild Extension Pack Help 4.0.12.0 |
Add (Required: ItemPath or ItemCol Optional: Login, Server, Version, WorkingDirectory, Recursive Output: ExitCode)
AddLabel (Required: LabelName, ItemPath or ItemCol Optional: Login, Server, LabelScope, Recursive, VersionSpec, CommentsOutput: ExitCode)
Checkin (Required: ItemPath or ItemCol Optional: Login, Server, Comments, Notes, Version, WorkingDirectory, Recursive, Bypass Output: ExitCode)
Checkout (Required: ItemPath or ItemCol Optional: Login, Server, Version, WorkingDirectory, Recursive Output: ExitCode)
Delete (Required: ItemPath or ItemCol Optional: Login, Server, Version, WorkingDirectory, Recursive Output: ExitCode)
DeleteLabel (Required: LabelNameOptional: Login, Server, LabelScopeOutput: ExitCode)
Get (Required: ItemPath or ItemCol Optional: Login, Server, Version, WorkingDirectory, Recursive, Force, Overwrite, All Output: ExitCode)
GetChangeset (Required: VersionSpec Optional: Login, Server, WorkingDirectory Output: ExitCode, Changeset)
GetWorkingChangeset (Required: ItemPath Optional: Login, Server, WorkingDirectory, Recursive Output: ExitCode, Changeset)
Merge (Required: ItemPath, Destination Optional: Login, Server, Recursive, VersionSpec, Version, Baseless, Force Output: ExitCode)
Resolve (Required: ItemPath or ItemCol Optional: Login, Server, Recursive, Version, Auto, NewName)
GetPendingChanges (Required: ItemPath Optional: Login, Server, Recursive, Version Output: PendingChanges, PendingChangesExist Output: ExitCode, PendingChangesExistItem)
UndoCheckout (Required: ItemPath or ItemCol Optional: Login, Server, Version, WorkingDirectory, Recursive Output: ExitCode)
Undelete (Required: ItemPath or ItemCol Optional: Login, Server, Version, WorkingDirectory, Recursive Output: ExitCode)
Remote Execution Support: NA
MSBuild.ExtensionPackBaseTask
MSBuild.ExtensionPack.VisualStudioTfsSource
Namespace: MSBuild.ExtensionPack.VisualStudio
Assembly: MSBuild.ExtensionPack (in MSBuild.ExtensionPack.dll) Version: 4.0.0.0
The TfsSource type exposes the following members.
Name | Description | |
---|---|---|
TfsSource |
Name | Description | |
---|---|---|
All |
Forces all files to be retrieved, not just those that are out-of-date.
| |
Auto |
Resolves outstanding conflicts between different versions of specified items in the current workspace
AcceptMerge, AcceptTheirs, AcceptYours, OverwriteLocal, DeleteConflict, AcceptYoursRenameTheirs
| |
Baseless |
Set to true to perform a merge without a basis version
| |
Bypass |
Bypasses a gated check-in requirement. Default is false.
| |
Changeset |
Gets the Changeset details
| |
Comments |
Sets the comments.
| |
Destination |
Sets the Destination for a Merge
| |
ExitCode |
Gets the ExitCode
| |
Force |
Implies All and Overwrite.
| |
ItemCol |
Sets the Item Collection of files to use.
| |
ItemPath |
Sets the files or folders to use.
| |
LabelName |
Sets the Label Name.
| |
LabelScope |
Sets the Label Scope
| |
Login |
Sets the Login. TFS2010 and greater only.
| |
NewName |
Used to resolve a name collision conflict. Can only be used in conjunction with AcceptMerge and AcceptYoursRenameTheirs. With AcceptMerge, /newname is only valid with conflicts that involve rename and/or undelete. If used, you must supply a new path.
| |
Notes |
Sets the notes.
| |
OverrideText |
Lets you set text to override check-in policies
| |
Overwrite |
Overwrites writable files that are not checked out.
| |
PendingChanges |
Gets the pending changes in the format '/Format:detailed'
| |
PendingChangesExist |
Gets whether pending changes exist for a given ItemPath
| |
PendingChangesExistItem |
Task Item stores whether changes exist for the given ItemPath. Identity stores the path, PendingChangesExist metadata stores boolean.
| |
Recursive |
Sets whether the Tfs operation should be recursive. Default is true.
| |
Server |
Sets the TFS Server
| |
Version |
Sets the version of Tfs. Default is 2013
| |
VersionSpec |
Sets the version spec for Get or changeset number for GetChangeset. If no VersionSpec is provided for GetChangeset, then /latest is used.
| |
WorkingDirectory |
Sets the working directory. If the directory is mapped in a workspace, then there is no need to specify the Server.
|
<Project ToolsVersion="4.0" DefaultTargets="Default" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <PropertyGroup> <TPath>$(MSBuildProjectDirectory)\..\MSBuild.ExtensionPack.tasks</TPath> <TPath Condition="Exists('$(MSBuildProjectDirectory)\..\..\Common\MSBuild.ExtensionPack.tasks')">$(MSBuildProjectDirectory)\..\..\Common\MSBuild.ExtensionPack.tasks</TPath> </PropertyGroup> <Import Project="$(TPath)"/> <ItemGroup> <FilesToAdd Include="C:\Projects\SpeedCMMI\Demo1\*"/> </ItemGroup> <Target Name="Default"> <!-- Check for pending changes --> <MSBuild.ExtensionPack.VisualStudio.TfsSource TaskAction="GetPendingChanges" ItemPath="$/AProject/APath" WorkingDirectory="C:\Projects\SpeedCMMI"> <Output TaskParameter="PendingChanges" PropertyName="PendingChangesText" /> <Output TaskParameter="PendingChangesExist" PropertyName="DoChangesExist" /> </MSBuild.ExtensionPack.VisualStudio.TfsSource> <Message Text="Pending Changes Report: $(PendingChangesText)"/> <Message Text="Pending Changes Exist: $(DoChangesExist)"/> <MSBuild.ExtensionPack.VisualStudio.TfsSource TaskAction="GetPendingChanges" ItemPath="$/AProject/ADifferentPath" WorkingDirectory="C:\Projects\SpeedCMMI"> <Output TaskParameter="PendingChangesExistItem" ItemName="PendingChangesExistItem3" /> </MSBuild.ExtensionPack.VisualStudio.TfsSource> <!-- Get a summary of whether changes exist using the PendingChangesExistItem --> <Message Text="%(PendingChangesExistItem3.Identity) = %(PendingChangesExistItem3.PendingChangesExist)"/> <!-- Perfrom various other source control operations --> <MSBuild.ExtensionPack.VisualStudio.TfsSource TaskAction="Checkout" ItemPath="C:\projects\SpeedCMMI\Demo1" Version="2008" WorkingDirectory="C:\projects\SpeedCMMI"/> <MSBuild.ExtensionPack.VisualStudio.TfsSource TaskAction="Checkin" ItemPath="C:\projects\SpeedCMMI\Demo1" WorkingDirectory="C:\projects\SpeedCMMI" Comments="Testing" Notes="Code reviewer=buildrobot" OverrideText="Justdoit" /> <MSBuild.ExtensionPack.VisualStudio.TfsSource TaskAction="Add" ItemPath="C:\projects\SpeedCMMI\Demo1" Version="2008" WorkingDirectory="C:\projects\SpeedCMMI"/> <MSBuild.ExtensionPack.VisualStudio.TfsSource TaskAction="Checkin" ItemCol="@(FilesToAdd)" WorkingDirectory="C:\projects\SpeedCMMI" ContinueOnError="true"/> <MSBuild.ExtensionPack.VisualStudio.TfsSource TaskAction="Checkout" ItemCol="@(FilesToAdd)" WorkingDirectory="C:\projects\SpeedCMMI"/> <MSBuild.ExtensionPack.VisualStudio.TfsSource TaskAction="UndoCheckout" ItemCol="@(FilesToAdd)" WorkingDirectory="C:\projects\SpeedCMMI"/> <MSBuild.ExtensionPack.VisualStudio.TfsSource TaskAction="Delete" ItemCol="@(FilesToAdd)" WorkingDirectory="C:\projects\SpeedCMMI"/> <MSBuild.ExtensionPack.VisualStudio.TfsSource TaskAction="Checkin" ItemPath="C:\projects\SpeedCMMI\Demo1" WorkingDirectory="C:\projects\SpeedCMMI" ContinueOnError="true"/> <MSBuild.ExtensionPack.VisualStudio.TfsSource TaskAction="Undelete" ItemCol="@(FilesToAdd)" WorkingDirectory="C:\projects\SpeedCMMI"/> <MSBuild.ExtensionPack.VisualStudio.TfsSource TaskAction="Checkin" ItemCol="@(FilesToAdd)" WorkingDirectory="C:\projects\SpeedCMMI" ContinueOnError="true"/> <MSBuild.ExtensionPack.VisualStudio.TfsSource TaskAction="Get" ItemPath="C:\Projects\SpeedCMMI\Demo1" WorkingDirectory="C:\projects\SpeedCMMI"/> <MSBuild.ExtensionPack.VisualStudio.TfsSource TaskAction="Merge" ItemPath="C:\Projects\SpeedCMMI\Client2" Destination="C:\Projects\SpeedCMMI\Client" WorkingDirectory="C:\projects\SpeedCMMI"/> <MSBuild.ExtensionPack.VisualStudio.TfsSource TaskAction="Checkin" ItemPath="C:\projects\SpeedCMMI\Client" WorkingDirectory="C:\projects\SpeedCMMI" Comments="Testing" Notes="Code reviewer=buildrobot" OverrideText="Justdoit" /> </Target> </Project>