Once in a while, you may need to completely remove a solution from Visual Soursafe and put it back into Sourcesafe in a different folder structure, manner, etc.  If you simply delete the solution from Sourcesafe, and additionally delete all of the .VSS, .scc, etc., files from your solution and project folders, you would think that Visual Studio would no longer have any record of the solution having been in Soiurcesafe.  Unfortunately, it is not that simple; Visual Studio has placed indicators and references to Sourcesafe litterally everywhere but in the source classes, forms, and modules.

In this article I will tell you where all of these references are and tell you how to get a solution out of Sourcesafe so that Visual Studio does not have a record of it ever having extisted in Sourcesafe.

Obviously, before you begin to remove a project from sourcesafe, you will want to get the latest version (recursive) of all files in the solution, on your hard drive, and make a backup copy of the solution folders.  Actually, the methodology that I am going to describe does not appear to be dangerous, but I don't like to take chances with man-months of work being destroyed.

There are numerous files associated with placing a Solution in Sourcesafe.  I will first show all of them and then show you how to remove the traces of Sourcesafe from the Solution files.

When you place a Solution under Source Control, several files will be added to both the folder containing the Solution and the folder containing the Project and Project Items.  The picture displayed below has the files that are added to the Solution folder by Sourcesafe.

Figure 1. Sourcesafe Files Added to the Solution Folder

Figure 1. Sourcesafe Files Added to the Solution Folder



The picture displayed shows the files added, by Sourcesafe, to the folder where the Project and your source files are stored.

Figure 2. Sourcesafe files added to the Project Folder

Figure 2. Sourcesafe files added to Project folder



In addition to adding these files to your folders, Visual Studio .NET adds references to Sourcesafe to three files.  First, the code shown below is added to the .SLN (Solution) file.

Figure 3. Source Control Section Of Globals in Solution File

Figure 3. Source Control Section of Globals in Solution file.



The Solution (.SLN) file has a binary file (.SUO) that also will receive some source code information as shown below.

Figure 4. Sourcesafe information in .SUO file

Figure 4. Sourcesafe information in .SUO file.



Finally, the Project file itself will have Sourcesafe information added to it as shown below.

Figure 5. Sourcesafe information added to the Project file

Figure 5. Sourcesafe information added to the Project file.



Having seen all the places where Sourcesafe leaves its footprint, we can now proceed to remove the Solution from Sourcesafe and leave no trace in Visual Studio .NET that the project was ever under Source Control.  If you follow the steps outlined below, you should find that there is no evidence that your Solution was in Sourcesafe.

1. Get at least one copy of of the latest version of all files from Sourcesafe.
2. Delete the solution from Sourcesafe using the Permanent deletion option.
3. Delete the Sourcesafe files highlighted in Figure 1 and Figure 2.
4. Open the Solution (.sln) file in Notepad and delete the Global Source Control section shown in Figure 3 and save the changed file.
5. Delete the .SUO file.  It will be rebuilt by Visual Studio when you open and close the solution.
6. Open the Project file in Notepad and delete the Sourcesafe data highlighted in Figure 5.

If you have done the steps outlined above, you can open the project from the Solution folder and it should not display any diagnostics regarding the appearance of having been in Source Control.