IVSSItem.Spec Property 

Gets a fully qualified SourceSafe path to a file or a project.

Namespace: Microsoft.VisualStudio.SourceSafe.Interop
Assembly: Microsoft.VisualStudio.SourceSafe.Interop (in microsoft.visualstudio.sourcesafe.interop.dll)


ReadOnly Property Spec As String
Dim instance As IVSSItem
Dim value As String

value = instance.Spec
string Spec { get; }
property String^ Spec {
    String^ get ();
/** @property */
String get_Spec ()
function get Spec () : String

Property Value

A string representing a fully qualified SourceSafe path to a file or a project.



HRESULT Spec ([out,retval]BSTR *pSpec);

The Spec property of a file object includes the file name. For example, the Spec property of $/test.txt is $/test.txt.


The following example demonstrates how to use the Spec property to display fully qualified paths of all items contained in the TestFolder project. To run this example:

  • Create a $/TestFolder/ project.

    $/TestFolder/ contains: Folder 1, Folder 2, test.txt and test1.txt


using System;
using Microsoft.VisualStudio.SourceSafe.Interop;

public class IVSSTest
    public static void Main()
        // Create a VSSDatabase object.
        VSSDatabase vssDatabase = new VSSDatabase();

        // Open a VSS database using network name 
        // for automatic user login.
                         Environment.UserName, ""); 

        // Get an IVSSItem reference to the project object.
        IVSSItem vssFolder = vssDatabase.get_VSSItem("$/TestFolder", false);
        foreach (IVSSItem vssItem in vssFolder.get_Items(false))
            Console.WriteLine("The Spec property for {0} is {1}", 
                              vssItem.Name, vssItem.Spec);


The Spec property for Folder 1 is $/TestFolder/Folder 1

The Spec property for Folder 2 is $/TestFolder/Folder 2

The Spec property for test.txt is $/TestFolder/test.txt

The Spec property for test1.txt is $/TestFolder/test1.txt

See Also


IVSSItem Interface
IVSSItem Members
Microsoft.VisualStudio.SourceSafe.Interop Namespace