Microsoft KB Archive/305106

= How To SSAFE - Reconnect a Project to Source Control in Visual Studio .NET =

Article ID: 305106

Article Last Modified on 2/23/2007

-

APPLIES TO

 Microsoft Visual SourceSafe 6.0C, when used with:  Microsoft Visual Studio .NET 2002 Professional Edition

 Microsoft Visual Studio .NET 2002 Enterprise Architect

 Microsoft Visual Studio .NET 2002 Enterprise Developer 

-

<div class="notice_section">

This article was previously published under Q305106

<div class="summary_section">

SUMMARY
In Visual Studio .NET, it is much easier to disconnect a project from and reconnect a project to source code control than in previous versions of the project. With Visual Studio .NET, you can perform these functions from within the integrated development environment (IDE) by &quot;binding&quot; your project to Source Control.

<div class="moreinformation_section">

MORE INFORMATION
An example scenario in which you might use this ability would be if you had added your project to a Microsoft Visual SourceSafe database through the Visual SourceSafe Explorer instead of through the Visual Studio IDE. The project would not have the files or entries required to tell Visual Studio that the project was bound to a Visual SourceSafe database. By binding to the Visual SourceSafe database, you create the files and entries that must be created, thereby enabling the integration.

For an existing Visual SourceSafe project: <ol> Using the SourceSafe Explorer, set a working directory for $/  to C:\ .</li> In the Visual SourceSafe Explorer, do a recursive get to the folder that you just created on your local computer: <ol style="list-style-type: lower-alpha;"> Select the project you would like to reconnect to source control.</li> Right-click the selected file, and then click Get Latest Version from the context menu.</li> Select the Recursive, Make Writable, and Build Tree check boxes.</li> Type the path to the folder that you created on your local computer in the To: box.</li> Click Ok.</li></ol> </li> Give read/write permissions to all *.user files found on C:\ . This will allow you to check them in later.</li> Using Visual Studio .NET, open the solution from C:\ .</li> Open the Source Control dialog box: From the File menu, point to Source Control, and then click Change Source Control.</li> Select the file that you want to reconnect to the Visual SourceSafe database, and then click bind. A graphical user interface representation of your project tree will appear and you will be prompted to choose the project in Visual SourceSafe that your local project was initially downloaded from. You will also notice that your working directory path is listed in the &quot;working folder&quot; window. Click OK.</li> The Server Binding field will now be populated with the server path you are connected to and the Status window will either show &quot;Valid&quot; or &quot;Invalid&quot;. If it says &quot;Valid,&quot; continue by repeating step 6 for each file in the Change Source Control List. If the Status window states that your new binding is &quot;Invalid,&quot; you can try connecting to your project one level lower or higher in the Visual SourceSafe project explorer.

NOTE: You may only need to highlight some files and click the bind button to connect them to the Visual SourceSafe Database.</li> When you have finished binding all of your projects to the Visual SourceSafe database, click Ok.</li> Next, you will be asked if you would like to check out your project from the database. Leave the default items selected and click Check Out. You can also add any comments here that you would like added to your files.

Your files will then be under source control within the Visual SourceSafe database. There will be a lock or check mark/exclamation point icon to indicate the current status of the files you have under source control (checked out vs. not checked out).</li> Check in the changes to enable integrated source control services for other team members who are working on your project.</li></ol>

Keywords: kbhowto kbsrccontrol KB305106

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.