Skip to main content
Email Password   helpLost your password?

Sample Image - RemoveSCCInfo.jpg

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:

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 :

Microsoft Visual Studio Solution File, Format Version 8.00
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MyProject", 
    "Projects\MyProject.csproj", "{B1A1C06F-EB84-4215-975E-6B0B57496BAC}" 
        ProjectSection(ProjectDependencies) = postProject 
        EndProjectSection
EndProject 
        ... other projects in your solution ...
Global
    GlobalSection(SourceCodeControl) = preSolution
        SccNumberOfProjects = 1
        SccProjectName0 = Perforce\u0020Project
        SccLocalPath0 = .
        SccProvider0 = MSSCCI:Perforce\u0020SCM
        CanCheckoutShared = true
        SolutionUniqueID = {0F9ACC79-634F-44DB-9C57-C4B0C461AA7B}
        SccProjectUniqueName1 = Projects\\MyProject.csproj
        SccLocalPath1 = MyProject
    EndGlobalSection
        ... other global sections ...        
EndGlobal

Just delete the GlobalSection(SourceCodeControl) ... EndGlobalSection and save the file.

The Solution User Options File (.suo)

I didn't find any real good solution besides deleting the file. But don't worry, VS.NET will create it back when you open the sln file.

The projects file (C# .csproj and VB.NET .vbproj)

Those files are XML based, so it won't really be hard to clean them. All you have to do is remove the following attributes on the main project node (which is named CSharp or VisualBasic):

The setup projects files (.vdproj)

They are quite similar to the .csproj and .vbproj except on one point: they are not XML based. You'll have to remove the following lines :

"SccProjectName" = "XXXXXXXXXXXXXXXXXX"
"SccLocalPath" = "8:..\\.."
"SccAuxPath" = "8:"
"SccProvider" = "XXXXXXXXXXXXXXXXXX"
All the other stuff

Visual Studio creates a few files for managing the source code integration, so you'll have to delete those files:

If you use MS SourceSafe as your source "database", you'll also find a vssver.scc file in each folder: delete them all if you want, but I didn't have any issues for not having done so.

History

You must Sign In to use this message board.
 
 
Per page   
 FirstPrevNext
GeneralDoes this work with VS2005? Pin
Keith Mallen
10:19 21 Apr '08  
GeneralUse UnBind instead! Pin
alinconstantin
8:44 21 Jul '07  
GeneralCool and fast Pin
Vastug
3:24 7 Aug '06  
GeneralIs this the same as Unbind? Pin
Giles
23:38 8 May '06  
GeneralThanks Pin
j0ey
5:35 2 May '06  
GeneralHas anyone had this working with VS2005.NET Projects? Pin
Peter Connors
7:31 27 Apr '06  
GeneralSource Code Pin
anger666
3:08 23 Feb '06  
GeneralRe: Source Code Pin
mcarbenay
3:36 23 Feb '06  
GeneralRe: Source Code Pin
anger666
3:44 23 Feb '06  
GeneralThanks: Question on VSS & the IDE Pin
Len Miller
4:30 1 Feb '06  
GeneralC++ projects? Pin
Anna-Jayne Metcalfe
5:01 10 Jan '06  
GeneralRe: C++ projects? Pin
mcarbenay
5:52 10 Jan '06  
GeneralRe: C++ projects? Pin
Anna-Jayne Metcalfe
9:47 10 Jan '06  
GeneralThanks! Pin
-Dy
0:37 21 Sep '05  
GeneralThanks a lot Pin
Gaben
11:37 29 Jun '05  
GeneralHelp Translating the regular expression for use in VB.net Pin
Chubby Arse
23:16 12 May '05  
GeneralRe: Help Translating the regular expression for use in VB.net Pin
mcarbenay
0:43 13 May '05  
GeneralRe: Help Translating the regular expression for use in VB.net Pin
Chubby Arse
6:18 16 May '05  
GeneralRe: Help Translating the regular expression for use in VB.net Pin
mcarbenay
11:05 16 May '05  
GeneralVery cool Pin
msureshkr
9:46 14 Feb '05  
GeneralCool Pin
rico65
0:59 20 Dec '04  
GeneralBackup leave directory when "don't backup" is torn on Pin
Mike Chaliy
21:33 7 Oct '04  
GeneralRe: Backup leave directory when "don't backup" is torn on Pin
mcarbenay
22:54 7 Oct '04  
GeneralRe: Backup leave directory when "don't backup" is torn on Pin
Greg Norris
12:39 24 Nov '05  
GeneralI don't know... Pin
mracka
20:49 22 Jul '04  


Last Updated 15 Jul 2004 | Advertise | Privacy | Terms of Use | Copyright © CodeProject, 1999-2009