Most software development groups understand and probably have experienced at least once during a product's life cycle the value of using a source-code control software package,such as Microsoft's Visual SourceSafe (VSS). And now that VSS has been integrated with Microsoft Visual Studio 2005 and SQL Server Management Studio it's easy to administer, making it the source-code management software of choice for a Microsoft environment.VSS tracks changes made to the code over time, recording not only the change but also who made it, when it was applied, and why it was made, all in an easy-to-read format. Let's take a look at how to install the client application, set VSS options for your environment, add a user to the environment, and check files in and out of VSS.
VSS Installation Overview
VSS comes in two versions—a standalone version for individual users whose database is stored on a local machine, and a Shared Database Server version for an enterprise that stores its database on a server for shared use. We'll focus on the shared VSS application. For more information about installing the standalone VSS version, see the Microsoft article "Installing Standalone VSS" at http://msdn.microsoft.com/library/default.asp?url =/library/en-us/guides/html/vstskinstallingstandalonevss.asp. For a quick overview about installing the Shared Database Server version, see the Microsoft article"Installing the Shared Database Server" at http://msdn.microsoft.com/library/default.asp?url=/library/en-us/guides/html/vstskInstallingshareddatabaseserver.asp.
Before you install VSS in your enterprise, the project team should meet to discuss the different roles team members will be assigned for the project and the processes that need to be established for using VSS. For more information, see the Web-exclusive sidebar "Defining VSS Roles and Processes" at http://www.windowsitpro.com, InstantDoc ID 49478.
Installing VSS is a two-step process:The VSS administrator needs to install the VSS administration application on a server, configure the Project environment, and add all the users who will be able to check files in and out of VSS. Then, users install the VSS client application on their workstation.
Only users who have been configured with the Admin role and password ( configured during the installation process) can access the VSS Administrator application.As part of the installation process, the VSS Administrator specifies a location on the server for the VSS folders.VSS uses this location to create a directory structure for the following VSS folders:
- Data folder—contains multiple sub-folders that act as the database for all code files.VSS uses a file system as a database rather than a typical database such as Microsoft Access.
- Users folder—contains the initialization (.ini) files for each user. Each .ini file stores the VSS interface settings configured for a user. For example, the .ini file stores the location of working folders for each user. (We discuss working folders later in this article.)
- Temp folder—stores temporary files.
- Win32 folder—stores the Windows utilities that the VSS administrator uses to maintain the database for VSS.
- Setup folder—stores files used by the Setup program to install additional components or uninstall VSS.
- NetSetup folder—contains the files used to install the client version of VSS.
- Template folder—stores the VSS template used to create initialization files for each user.VSS copies this template file to the Users folder.You can customize this template for each user.
Setting VSS Options
After you've installed the Shared Database Server,the VSS administrator should log on to VSS.The first window the administrator sees is the Visual SourceSafe Administrator window, with four options on the VSS toolbar: User, Tools,Archive, and Help. Select Tools, Options to display the SourceSafe Options tabs.
The SourceSafe Options tabs (which Figure 1 shows) let administrators customize VSS to their company's needs. We'll explain how to use the General, Project Rights, Shadow Folders, and File Types tabs in this window to configure VSS options for the enterprise's development environment before each user installs the client interface on his or her workstation.(Note that the FileTypes tab isn't visible in Figure 1, and we don't discuss the Web tabs in this article.)
General tab. The VSS administrator uses this tab to set up the VSS environment. Select Allow multiple checkouts if you want developers to have the flexibility to work on the same piece of code simultaneously. Although this is a useful feature, be aware that when developers check multiple versions of the same code into VSS, modifications are merged into one file.
Select Use network name for automatic user log in if you want to bypass the VSS security and rely on network security to grant access to the VSS database.(See"Adding a User"later in this article for information about assigning a user ID and password that are independent of the server security schema.) Selecting this option makes access to the database less secure but makes the integration of VSS into your network environment seamless.
In the Default Database name: field, enter the name of the default VSS database. If the development team is working on a large code base or if different development groups are working with various databases, you should configure a different default database for each project or department. The VSS administrator must assign the default database name before the developers install the VSS client software on their workstations; otherwise, the client software won't be aware of the configured default database name.
Each file checked in and out of VSS has its own history log. Enter a filename (or use the Browse button) in the Log all actions in journal file: field if you want VSS to save the actions logged for all files in a separate journal file.This option provides a centralized repository for changes made to files to support administrative review.