If you would like to add a solution to a source control database, you can do so from within Visual Studio .NET using the File Source Control menu. This menu presents two options with which you can add items to source control. "Add solution to source control" allows you to connect to a source control database and add the entire solution, including all the projects and files it contains, to that database. "Add selected projects to source control" allows you to add only projects that are currently selected in the Solution Explorer.
If you select either of these options, you will be presented with the Visual SourceSafe Login dialog box, as shown in Figure D-2.
If you wanted to connect to a different database than the one displayed, you can select the Browse button and browse to the directory that contains the database to which you would like to connect.
|
Once you connect, a dialog allowing you to select where your solution will go in the SourceSafe database's hierarchy will appear. If you just press Enter, you will get a dialog asking if you want to create a project with the name of your solution. The term project means something quite different to SourceSafe than it does to VS.NET; in fact, a VSS project is most closely related to a solution in VS.NET (and VSS doesn't really have a direct equivalent of a VS.NET project). When you add a solution to a VSS database, it becomes a VSS project, and all of the VS.NET projects and files in the solution will be added to the new VSS project.
If you accept the default location, your VSS project will be created at the root of the VSS database you have connected to. (Otherwise, it will be created wherever you told VSS to create it.) Once you have added your solution, the nodes in the Solution Explorer add icons next to them to indicate their source control status. When you first add a solution, all of the files will be checked in, so every file will have a small lock icon, as Figure D-3 shows.