Introduction

With the yet to be released SourceSafe 2005, we decided to switch back to a SourceSafe database for some of our projects instead of a CVS repository. And saying that it have been quite a pain is not even beginning to come close to reality. Source-Code integration in VS.NET is not a nightmare, but you have to change your project files and delete a few other files to get rid of it. Failing to do so may get you in real trouble when rebinding to another SCC provider.

This "article" (OK, it may not be a great one, but that's my first one for Code Project) summarizes what I have found while building this tool, either by myself or on blogs and newsgroups.

Using the code

I decided to write this small tool to help getting rid of everything that is related to source-code control. It's quite straightforward to use: just enter the path to your project or solution file and click Continue, and it should work.

For now, there are (quite) a few limitations:

It does not handle Web Projects (I'll do it as soon as I can)

Only .csproj and .vbproj and deployment project (.vdproj) files are supported, and having any other type of project will block you from using this tool.

It doesn't change the Read-Only status of files that are not .sln, .csproj or .vbproj.

Points of Interest

Visual Studio keeps its SCC information in quite a few places. And if you want to get clean, you'll have to get rid of all of them.

The Solution File (.sln)

The solution file contains a section that is dedicated to SCC. If you open the .sln file in a text editor, you'll have something that looks like :

History

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

I'm not really good in VB.net and don't have this project on my office computer for testing. but if i'm not mistaken you should replace \\ by \ and \" by ""

so the lines Dim objRegEx As New Regex("Scc\w*\s*=\s*\"".*\""") may work for PatchXMLProjectFile and Dim objRegEx As New Regex("\""Scc\w*\""\s*=\s*\"".*\""") for PatchDeployProject should do the trick.

I prefer the - don't create it if you don't need it theory.
That way there is no argument about accidently deleting a desired backup after the event. The script above would delete a previous backup even if it was desired.. I used..

I just tried the script and it worked. Thank you.
It feels better to have a script and see that there is realy no delete *.* in it.
(To be honest I actually didn't check)
I dont know what the posts about the exe not working with asp.net mean because I dont see a difference with asp.net and other projects here, but this script worked with my asp.net project.
Good Job!
Mathias