The VSSDump Tool
The VSSDump (Vssdump.exe) tool is used by the indexing script for Microsoft Visual SourceSafe. It gathers the list of source files to be indexed. This program is also a valuable command-line utility that you can use to examine which files may be processed by the indexing script.
To prepare for source indexing, edit Srcsrv.ini so that it contains an entry for your version control server. This is an operation that you must do only once. Details are listed in the sample version Srcsrv.ini. You can use an environment variable or switch to the indexing script to denote the location of this file. However, it is best to put it in the same directory as the script because the contents of this file are intended to be global across all projects in your business or development system. This file serves to uniquely identify different version control servers. Note that you can provide a different version of this file to debuggers so that they look at a replicated copy of the version control server, which can be useful if you want to reduce traffic on the server.
To source-index a particular build, make certain that no source files are checked out on the build computer. If any files are checked out and edited, those changes are not reflected in the final source indexed .pdb files. Furthermore, if your build process includes a pre-compilation pass that generates source files from other files, you must check in those generated files to version control as part of the pre-compilation.
Upon completion of the build, set the current working directory to be the root of all source files and generated .pdb files. Then run SSIndex. You must specify what version control system you are using as a parameter. For example:
SSIndex accepts parameters that allow you to run the script from anywhere and to specify the location of the source files and .pdb files separately. This is most useful if the source is kept in another location from the output .pdb files. For example:
ssindex.cmd -server=vss -source=c:\source -symbols=c:\outputdir
These directories can also be specified with environment variables. Use the -? or -?? command line options for more information.
Here is an example of the output generated by this script:
## C:\ >ssindex.cmd -system=vss -? SSIndex.cmd [/option=<value> [...]] [ModuleOptions] [/Debug] General SrcSrv settings: NAME SWITCH ENV. VAR Default ----------------------------------------------------------------------------- 1) srcsrv.ini Ini SRCSRV_INI .\srcsrv.ini 2) Source root Source SRCSRV_SOURCE . 3) Symbols root Symbols SRCSRV_SYMBOLS . 4) Control system System SRCSRV_SYSTEM <N/A> 5) Save File (opt.) Save SRCSRV_SAVE <N/A> 6) Load File (opt.) Load SRCSRV_LOAD <N/A> Visual Source Safe specific settings: NAME SWITCH ENV. VAR Default ----------------------------------------------------------------------------- A) VSS Server Server SSDIR <N/A> B) VSS Client Client SSROOT <Current directory> C) VSS Project Project SSPROJECT <N/A> D) VSS Label Label SSLABEL <N/A> Precedence is: Default, environment, cmdline switch. (ie. env overrides default, switch overrides env). Using '/debug' will turn on verbose output. Use "SSIndex.cmd -??" for verbose help information. ## See SrcSrv documentation for more information.
You can also use one of the provided wrapper scripts (Vssindex.cmd) to avoid specifying the version control system. The script source-indexes all .pdb files found in the current directory and below with version control information to locate all source files found in the current directory and below. You can specify different locations for these files by using environment variables and command-line switches.
Upon completion of the source indexing, you can test the output by running SrcTool on the .pdb files. This program displays data that indicates whether or not the .pdb file is source indexed. It also displays the specific information for every source file. Lastly, it displays the number of indexed sources and the number of sources that no indexing information was found for. It sets an %ERRORLEVEL% of -1 if the file is not source-indexed. Otherwise, it sets %ERRORLEVEL% to the number of indexed source files.
VSSDump can also be used independently to diagnose issues while source-indexing. The syntax is as follows:
Options can be any combination of the following options.
Causes all projects to be searched, rather than restricting to the current project. This option may not be used with the -p option.
Causes VSSDump to restrict its search to the project specified by ProjectName. If this option is not present, the current project is used. This option may not be used with the -a option.
Causes VSSDump to restrict its search to the root directory specified by RootDirectory. If this option is not present, the current directory is used.
Causes VSSDump to list only those files with a label that matches that specified by Label.
Specifies that the location of the Virtual SourceSafe database is in SharePath. This option overrides the path specified in the SSDIR environment variable.
Causes VSSDump to search subdirectories recursively.
Causes VSSDump to list directories containing source files without listing the files themselves.
Causes VSSDump to ignore the current directory and list the entire project. This option may not be used with -r.
Causes VSSDump to format output for use with script files.
Causes VSSDump to display only the Virtual SourceSafe configuration information.