Adding a Project or Solution to Source Control

Usually when you add a solution to source control, you want to add the entire solution. If your solution is located on more than one directory, and you select that solution and add it to source control, you are prompted with the Initial Solution Add dialog box. You can choose to add a single solution file (.sln) or only the selected items in the Project Explorer.

You can add individual projects or items to source control when you want detailed control over the versions of those projects or items.

To add a solution to source control

  1. In the Project Explorer, select the solution.

  2. On the Project menu, point to Source Control, and then click Add to Source Control.

  3. In the Initial Solution Add dialog box, choose if you would like to add just the selected items in the Project Explorer, or the entire solution.
  4. In the Add to SourceSafe Project dialog box (or the equivalent dialog box provided by your source control program), choose where you want your project to be placed in source control.
  5. In the Add to Source Control dialog box, select the items you want to add to source control, and then click OK.

    You can add comments and select Keep Checked Out.

To open a project from source control through the development environment

  1. On the File menu, click Open Project.

  2. In the Open Project dialog box, click Source Control.

  3. In the Create Local Project From SourceSafe dialog box, click the SourceSafe project to "download" or open the folder.

    As you make your selections in the SourceSafe project listing, the default folder location for your selection is listed in the Create a new project in the folder list box. Look at that entry to make sure it is correct.

  4. Click OK.

    You now have a local copy of the project. You only need to open the solution file from the local machine to access this project.

To automatically add new projects to source control as you create them

  1. On the Tools menu, click Options.

  2. In the Options dialog box, expand the Environment node and click the Source Control node.

  3. Select the Add new projects to source control check box.

  4. Click OK.