Adding a Project or Solution to Source Control
See Also
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
-
In the Project Explorer, select the solution.
-
On the Project menu, point to Source Control, and then click Add to Source Control.
-
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.
-
Click Selection to add just the solution file (.sln file) to source control.
-
Click Solution to add the solution file, the projects, and all their items to source control.
-
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.
-
In the Add to SourceSafe dialog box, click Create. Enter the new source control folder name. Click OK.
-
Select an existing source control folder in which to place your items if you are certain that the existing source control folder's directory structure and files will not conflict with the new item and any corresponding directory structure of the new item.
-
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
-
On the File menu, click Open Project.
-
In the Open Project dialog box, click Source Control.
-
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.
-
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
-
On the Tools menu, click Options.
-
In the Options dialog box, expand the Environment node and click the Source Control node.
-
Select the Add new projects to source control check box.
-
Click OK.