Svn ClassMSBuild Extension Pack Help 4.0.12.0
Valid TaskActions are:

Version (Required: Item Output: Info Optional: UserName, UserPassword)

Info (Required: Item Output: Info Optional: UserName, UserPassword)

GetProperty (Required: Item, PropertyName Output: PropertyValue Optional: UserName, UserPassword)

SetProperty (Required: Item, PropertyName, PropertyValue Optional: UserName, UserPassword)

Checkout (Required: Items, Destination Optional: UserName, UserPassword)

Update (Required: Items Optional: UserName, UserPassword)

Add (Required: Items Optional: UserName, UserPassword)

Copy (Required: Items, Destination Optional: UserName, UserPassword, CommitMessage)

Delete (Required: Items Optional: UserName, UserPassword)

Move (Required: Items, Destination Optional: UserName, UserPassword)

Commit (Required: Items Optional: UserName, UserPassword, CommitMessage)

Export (Required: Item, Destination Optional: UserName, UserPassword, Force)

Inheritance Hierarchy

SystemObject
  Microsoft.Build.UtilitiesTask
    MSBuild.ExtensionPackBaseTask
      MSBuild.ExtensionPack.SubversionSvn

Namespace: MSBuild.ExtensionPack.Subversion
Assembly: MSBuild.ExtensionPack (in MSBuild.ExtensionPack.dll) Version: 4.0.0.0

The Svn type exposes the following members.

Constructors

  NameDescription
Public methodSvn
Top
Properties

  NameDescription
Public propertyCommitMessage
The commit message that the Commit action sends with the commit to the repository
Public propertyDestination
The destination that the Checkout, Copy, Move and Export actions use.
Public propertyForce
Set whether to use Force on Export. Default is false.
Public propertyInfo
Filled up by the Version and Info actions.
Public propertyItem
The item that the Version, Info, GetProperty, SetProperty and Export actions use.
Public propertyItems
The items that the Checkout, Update, Add, Copy, Delete, Move and Commit actions use.
Public propertyPropertyName
The name of the property that the GetProperty and SetProperty actions use.
Public propertyPropertyValue
The value of the property that the GetProperty action returns and the SetProperty action sets.
Public propertyTaskAction (Overrides BaseTaskTaskAction.)
Top
Remarks

The task needs a command-line SVN client (svn.exe and svnversion.exe) to be available. The following are supported and automatically detected:

  • any SVN client in the PATH environment variable
  • Cygwin 1.7, with the subversion package installed
  • TortoiseSVN 1.7, with the command line component installed
  • CollabNet Subversion Client 1.7
  • Slik SVN 1.7, with the Subversion client component installed

If you publish a project that uses this task, remember to notify your users that they need one of the mentioned clients in order to build your code. The PATH detection allows everyone to set a preference, the other detections are there so that it will just work for most users.

The Version action calls svnversion.exe, all other actions call subcommands of svn.exe. Some parameters also accept URL's, not just local paths. Please refer to SVN's documentation for more information.

Examples

<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)"/>
    <Target Name="Default">
        <!-- Version -->
        <MSBuild.ExtensionPack.Subversion.Svn TaskAction="Version" Item="c:\path">
            <Output TaskParameter="Info" ItemName="VInfo"/>
        </MSBuild.ExtensionPack.Subversion.Svn>
        <Message Text="MinRevision: %(VInfo.MinRevision), MaxRevision: %(VInfo.MaxRevision), IsMixed: %(VInfo.IsMixed), IsModified: %(VInfo.IsModified)"/>
        <Message Text="IsSwitched: %(VInfo.IsSwitched), IsPartial: %(VInfo.IsPartial), IsClean: %(VInfo.IsClean)"/>
        <!-- Info -->
        <MSBuild.ExtensionPack.Subversion.Svn TaskAction="Info" Item="c:\path">
            <Output TaskParameter="Info" ItemName="IInfo"/>
        </MSBuild.ExtensionPack.Subversion.Svn>
        <Message Text="EntryKind: %(IInfo.EntryKind), EntryRevision: %(IInfo.EntryRevision), EntryURL: %(IInfo.EntryURL)"/>
        <Message Text="RepositoryRoot: %(IInfo.RepositoryRoot), RepositoryUUID: %(IInfo.RepositoryUUID)"/>
        <Message Text="WorkingCopySchedule: %(IInfo.WorkingCopySchedule), WorkingCopyDepth: %(IInfo.WorkingCopyDepth)"/>
        <Message Text="CommitAuthor: %(IInfo.CommitAuthor), CommitRevision: %(IInfo.CommitRevision), CommitDate: %(IInfo.CommitDate)"/>
        <!-- GetProperty -->
        <MSBuild.ExtensionPack.Subversion.Svn TaskAction="GetProperty" Item="c:\path" PropertyName="svn:externals">
            <Output TaskParameter="PropertyValue" PropertyName="GProp"/>
        </MSBuild.ExtensionPack.Subversion.Svn>
        <Message Text="PropertyValue: $(GProp)"/>
        <!-- SetProperty -->
        <MSBuild.ExtensionPack.Subversion.Svn TaskAction="SetProperty" Item="c:\path" PropertyName="test" PropertyValue="hello"/>
        <!-- Checkout -->
        <MSBuild.ExtensionPack.Subversion.Svn TaskAction="Checkout" Items="http://repository/url" Destination="c:\path"/>
        <!-- Update -->
        <MSBuild.ExtensionPack.Subversion.Svn TaskAction="Update" Items="c:\path1;c:\path2"/>
        <!-- Add -->
        <MSBuild.ExtensionPack.Subversion.Svn TaskAction="Add" Items="c:\path\newfile"/>
        <!-- Copy -->
        <MSBuild.ExtensionPack.Subversion.Svn TaskAction="Copy" Items="c:\path\file1;c:\path\file2" Destination="c:\path\directory"/>
        <!-- Delete -->
        <MSBuild.ExtensionPack.Subversion.Svn TaskAction="Delete" Items="c:\path\something"/>
        <!-- Move -->
        <MSBuild.ExtensionPack.Subversion.Svn TaskAction="Move" Items="c:\path\file1;c:\path\file2" Destination="c:\path\directory"/>
        <!-- Commit with default commit message -->
        <MSBuild.ExtensionPack.Subversion.Svn TaskAction="Commit" Items="c:\path\something"/>
        <!-- Commit with commit message -->
        <MSBuild.ExtensionPack.Subversion.Svn TaskAction="Commit" Items="c:\path\something" CommitMessage="MsBuild committed from something directory" />
        <!-- Export -->
        <MSBuild.ExtensionPack.Subversion.Svn TaskAction="Export" Item="c:\path\workingcopy" Destination="c:\path\exported"/>
    </Target>
</Project>
See Also

Reference