SourceSafe Class

MSBuild Extension Pack

SourceSafe Class MSBuild Extension Pack Help 4.0.12.0
Please be aware that this is a very light wrapper for ss.exe

See the Command Line Reference on MSDN (http://msdn.microsoft.com/en-us/library/003ssz4z(VS.80).aspx) for full details.

Sample TaskActions are as follows, HOWEVER use the URL above for full guidance and additional TaskActions:

Checkout (Required: FilePath Optional: Arguments, Database, SSVersion, SuppressI)

Checkin (Required: FilePath Optional: Arguments, Database, SSVersion, SuppressI)

Cloak (Required: FilePath Optional: Arguments, Database, SSVersion, SuppressI)

Create (Required: FilePath Optional: Arguments, Database, SSVersion, SuppressI)

Decloak (Required: FilePath Optional: Arguments, Database, SSVersion, SuppressI)

Delete (Required: FilePath Optional: Arguments, Database, SSVersion, SuppressI)

Destroy (Required: FilePath Optional: Arguments, SSVersion, SuppressI)

Get (Required: FilePath Optional: Arguments, Database, SSVersion, SuppressI)

Remote Execution Support: No

Inheritance Hierarchy

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

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

The SourceSafe type exposes the following members.

Constructors

  NameDescription
Public methodSourceSafe
Top
Properties

  NameDescription
Public propertyArguments
Sets the Arguments. Defaults to -I- (Ignores all and tells the command not to ask for input under any circumstances) unless SuppressI is set to true. See http://msdn.microsoft.com/en-us/library/hsxzf2az(VS.80).aspx for full options.
Public propertyDatabase
Sets the database.
Public propertyFilePath
Sets the FilePath
Public propertySSVersion
Sets the SourceSafe version. Supports 2005 and 6d. Default is 2005
Public propertySuppressI
Set to true to prevent -I- being added to your custom Arguments. Default is False
Top
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">
        <!-- Perfrom various source control operations -->
        <MSBuild.ExtensionPack.VisualStudio.SourceSafe TaskAction="Get" Database="C:\SourceSafe\2005" UserName="AUser" FilePath="$//DemoFtd" Arguments="-GLC:\Demo2 -R"/>
        <!-- This will perform a recursive checkout to C:\Demo2 -->
        <MSBuild.ExtensionPack.VisualStudio.SourceSafe TaskAction="Checkout" Database="C:\SourceSafe" UserName="AUser" FilePath="$//DemoFtd/*.*" Arguments="-GLC:\Demo2 -R" ContinueOnError="true"/>
        <MSBuild.ExtensionPack.VisualStudio.SourceSafe TaskAction="Checkin" Database="C:\SourceSafe\2005" UserName="AUser" FilePath="$//DemoFtd/*.*" ContinueOnError="true"/>
        <MSBuild.ExtensionPack.VisualStudio.SourceSafe TaskAction="Checkout" Database="C:\SourceSafe\2005" UserName="AUser" FilePath="$//DemoFtd/dts.wav" ContinueOnError="true"/>
        <MSBuild.ExtensionPack.VisualStudio.SourceSafe TaskAction="Checkin" Database="C:\SourceSafe\2005" UserName="AUser" FilePath="$//DemoFtd/dts.wav" ContinueOnError="true"/>
        <MSBuild.ExtensionPack.VisualStudio.SourceSafe TaskAction="Cloak" Database="C:\SourceSafe\2005" UserName="AUser" FilePath="$//DemoFtd" ContinueOnError="true"/>
        <MSBuild.ExtensionPack.VisualStudio.SourceSafe TaskAction="Decloak" Database="C:\SourceSafe\2005" UserName="AUser" FilePath="$//DemoFtd" ContinueOnError="true"/>
        <MSBuild.ExtensionPack.VisualStudio.SourceSafe TaskAction="Create" Database="C:\SourceSafe\2005" UserName="AUser" FilePath="$//DemoFtd22" ContinueOnError="true"/>
        <MSBuild.ExtensionPack.VisualStudio.SourceSafe TaskAction="Delete" Database="C:\SourceSafe\2005" UserName="AUser" FilePath="$//DemoFtd22" Arguments="-I-Y" ContinueOnError="true"/>
        <MSBuild.ExtensionPack.VisualStudio.SourceSafe TaskAction="Destroy" Database="C:\SourceSafe\2005" UserName="AUser" FilePath="$//DemoFtd22" Arguments="-I-Y" ContinueOnError="true"/>
    </Target>
</Project>
See Also

Reference