How To Set Up Source Code Control with Visual SourceSafe

This article was previously published under Q157636
This article has been archived. It is offered "as is" and will no longer be updated.
This article describes how to setup a Visual FoxPro for Windows projectunder SourceCode Control so that it can be accessed by multiple users.
  1. Run Visual SourceSafe Administrator. On the Tools menu, click Options. In the General tab of the "SourceSafe Options" dialog box, check the "Allow Multiple Checkouts" option and clear the "Use network name for automatic user log in" option if you are opening two sessions of SourceSafe on the same computer.
  2. Add two new users in Visual SourceSafe: SCTST1 and SCTST2. Close the Visual SourceSafe Administrator.
  3. Run the Visual SourceSafe Client and login as SCTST1. On the File menu, click Set Working Directory. Enter "..\SCTST1wd" as the working directory and click the "Create Dir" button to create the directory if it does not already exist. Close Visual SourceSafe.
  4. Run Visual SourceSafe Client. Repeat step 3 above, but this time login in as SCTST2, and set the working directory to "..\SCTST2wd". Close Visual SourceSafe.
  5. Run Visual FoxPro for Windows. On the Tools menu, click Options.
  6. Select the Projects tab and set "Active Source Control Provider" to "Microsoft Visual SourceSafe."
  7. Click on the "Set as Default" button, and close the Options dialog box.
  8. Open the Tastrade project in "..\Vfp\Samples\Tastrade\."
  9. On the Project menu, click "Add Project to Source Control." When prompted, log on to Visual SourceSafe as SCTST1.
NOTE: After being added to Source Control, the project and its componentsremain in the same directory, and a project meta file (.pjm) is added tothat directory. In the case of this example, the name of the .pjm file isTastrade.pjm. For more information on the project meta file, please referto the "Managing Visual FoxPro Projects Under Source Control" topic in the"Developing in Teams" chapter of the Visual FoxPro Developer's Guide.

  1. After the project is added to source code control, start a second instance of Visual FoxPro for Windows on the same or different machine. If Visual SourceSafe is not set up as the active source control provider, follow steps 5, 6, and 7 above to do so.
  2. On the File menu, click "Join Source Control Project." When prompted log on to Visual SourceSafe as SCTST2.
  3. In the "Open SourceSafe Project" dialog box, select the Tastrade project. Click the Browse button from the "Open SourceSafe Project" dialog box. The "Browse Directory" dialog box appears. Locate the working directory. If the working directory does not exist, enter the directory name, "..\SCTST2wd" for example, and click the "Create Dir" button. Close the "Browse Directory" dialog box.
  4. Select "Yes All" in all the dialog boxes that come up.
NOTE: The "Join Source Control Project" process copies the project and itscomponents, which were placed under Source Control, to the workingdirectory that is specified for the user(SCTST2) in Visual SourceSafe. Thisprocess also checks out a copy of the .pjm file (Tastrade.pjm) to theworking directory.

  1. Close the project in both sessions of Visual FoxPro for Windows.
  2. In the First Session of Visual FoxPro for Windows, open the Tastrade Project in the "..\Vfp\Samples\Tastrade\" directory.
  3. In the second session of Visual FoxPro for Windows, open the Tastrade project in "...\SCTST2wd."
  4. The user should be able to Check Out, Modify, and Check In files from both sessions of Visual FoxPro.
  5. To update the Projects in each session, use the "Update Project List" option in the "Source Control" menu under the Project menu.
The user (SCTST1) who Added the project to source control may want to workon the project in a directory other than "..\Vfp\Samples\Tastrade\." Toallow this, repeat steps 11-12 with the following exceptions:

  • In step 11, log on to Visual SourceSafe as SCTST1.
  • In step 12, instead of selecting "..\SCTST2wd" as the working directory, select "..\SCTST1wd".
Visual FoxPro Online Developer's Guide, Developing in Teams chapter,"Managing Visual FoxPro Projects Under Source Control"

Article ID: 157636 - Last Review: 02/24/2014 08:26:16 - Revision: 1.1

  • Microsoft Visual SourceSafe 5.0 Standard Edition
  • Microsoft Visual SourceSafe 6.0 Standard Edition
  • Microsoft Visual FoxPro 5.0 Standard Edition
  • kbnosurvey kbarchive kbhowto kbinterop KB157636