To add a Visual Studio project to source control

About this task

To add all of your source file data to HCL VersionVault control, you must add project files (for example, .dsp or .vpb) and the source files that belong to the project. You do not need to add Visual C++ workspace or Visual J++ solution files to source control because these files contain information regarding IDE settings for the current session. Visual Studio dialog boxes present the files that it recommends you add to source control.

In Visual Studio .NET, you have no control over what files are added to source control.

Before you start

About this task

Follow this procedure before you add a Visual Studio project to source control:

Procedure

  1. If you work in a dynamic view, start the view and activate VOBs.

    In a snapshot view, you can add a project to a VOB regardless of whether load rules exist for elements in the VOB. The view is checked to see whether it has a load rule that includes the project. If no such load rule exists, one is created.

  2. For a new project, perform one of the following actions:
    • In Visual Basic, create the project as usual, and save it in a directory in your view that represents the location in the VOB namespace at which you want the project to reside. Depending on the Visual Studio defaults that you have set, Visual Basic may prompt you to add the project to source control. If it does, click Yes.
    • In Visual Studio .NET, Visual C++, and Visual J++, the New dialog box you use to create a new workspace or solution includes a Location field; use this field to specify that a directory in your view that represents the location in the VOB namespace at which you want the project to reside.
  3. For an existing project, copy or move it (and all related files and directories) into your view at the location that represents the location in the VOB namespace at which you want it to reside.
  4. Follow the steps for your development environment.
    • From Visual Basic
    • From Visual Studio .NET, Visual J++, and Visual C++

From Visual Basic

About this task

To add a Visual Studio project to source control from Visual Basic:

Procedure

  1. Open the project in Visual Basic.
  2. Click Tools > VersionVault > Add Project to VersionVault.
  3. The Add Files to VersionVault window presents the source files that belong to the project (and that have not already been added to source control). Select the project files.
  4. In the Comments field, describe the purpose of the project. These comments are displayed in the properties and the history of the element.
  5. If you work on a UCM project, find and set your view to an activity.
  6. Click OK.

From Visual Studio .NET, Visual J++, and Visual C++

About this task

To add a Visual Studio project to source control from Visual Studio .NET, Visual J++, and Visual C++:

Procedure

  1. Open the project in Visual Studio.
  2. In Project Explorer or FileView, select the files you want to add to source control. (If you set up Visual Studio to recommend files, you can skip this step.)
  3. In Visual Studio .NET, click File > Source Control > Add to Source Control. Otherwise, click Project > Source Control > Add to Source Control.

    In the Add to Source Control window, Visual Studio displays the files you selected in Project Explorer/FileView. (If you set up Visual Studio to recommend files, the window displays all files in the project that can be added to source control.)

  4. In the Comments field, describe the purpose of the project. These comments are displayed in the properties and the history of the element.
  5. To continue working on the project, select the Checkout after adding to source control check box. Otherwise, clear this check box to leave the files and directories checked in.
  6. If you work on a UCM project, find and set your view to an activity.
  7. Click OK.