Click here to Skip to main content
Click here to Skip to main content

A small tool to remove SCC information of a VS2003.NET project file

, 15 Jul 2004
Rate this:
Please Sign up or sign in to vote.
This tool removes the information saved in the project and solution files of VS2003.NET which are relative to Source Code Control.

Sample Image - RemoveSCCInfo.jpg


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 :

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 
        ... other projects in your solution ...
    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
        ... other global sections ...        

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):

  • SccProjectName
  • SccLocalPath
  • SccProvider
  • SccAuxPath
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 :

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

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

  • In the same folder as the .sln file, you should find a solutionName.vssscc.
  • With the projects file, you'll have a projectFileName.projectExtension.vspscc.
  • You will also find some vssver.scc and mssccprj.scc in the project directory.

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.


  • v Support for localhost-based projects
  • v VDPROJ support, French chars in project and solution support.
  • v First release, quite a few things yet to do.


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.

A list of licenses authors might use can be found here


About the Author

Web Developer
France France
I'm french, do I need to say more ?

Comments and Discussions

QuestionDoes this work with VS2005? PinmemberKeith Mallen21-Apr-08 10:19 
GeneralUse UnBind instead! Pinmemberalinconstantin21-Jul-07 8:44 
GeneralCool and fast PinmemberVastug7-Aug-06 3:24 
QuestionIs this the same as Unbind? PinmemberGiles8-May-06 23:38 
GeneralThanks Pinmemberj0ey2-May-06 5:35 
QuestionHas anyone had this working with VS2005.NET Projects? PinmemberPeter Connors27-Apr-06 7:31 
It's throwing a file not found error in GetProjectsFromSlnFile...I'm still playing with it, but if I could know if this should be working OOTB it would be nice...
Confused | :confused:

GeneralSource Code Pinmemberanger66623-Feb-06 3:08 
GeneralRe: Source Code Pinmembermcarbenay23-Feb-06 3:36 
GeneralRe: Source Code Pinmemberanger66623-Feb-06 3:44 
GeneralThanks: Question on VSS & the IDE PinmemberLen Miller1-Feb-06 4:30 
QuestionC++ projects? PinmemberAnna-Jayne Metcalfe10-Jan-06 5:01 
AnswerRe: C++ projects? Pinmembermcarbenay10-Jan-06 5:52 
GeneralRe: C++ projects? PinmemberAnna-Jayne Metcalfe10-Jan-06 9:47 
GeneralThanks! Pinmember-Dy21-Sep-05 0:37 
GeneralThanks a lot PinmemberGaben29-Jun-05 11:37 
GeneralHelp Translating the regular expression for use in PinmemberChubby Arse12-May-05 23:16 
GeneralRe: Help Translating the regular expression for use in Pinmembermcarbenay13-May-05 0:43 
GeneralRe: Help Translating the regular expression for use in PinmemberChubby Arse16-May-05 6:18 
GeneralRe: Help Translating the regular expression for use in Pinmembermcarbenay16-May-05 11:05 
GeneralVery cool Pinmembermsureshkr14-Feb-05 9:46 
GeneralCool Pinmemberrico6520-Dec-04 0:59 
GeneralBackup leave directory when "don't backup" is torn on PinmemberMike Chaliy7-Oct-04 21:33 
GeneralRe: Backup leave directory when "don't backup" is torn on Pinmembermcarbenay7-Oct-04 22:54 
GeneralRe: Backup leave directory when "don't backup" is torn on PinmemberGreg Norris24-Nov-05 12:39 
GeneralI don't know... Pinmembermracka22-Jul-04 20:49 
GeneralRe: I don't know... Pinmembermcarbenay29-Aug-04 12:55 
GeneralUnix way :=) Pinmemberblah@slaskpost.se13-Sep-07 22:17 
GeneralRe: I don't know... Pinmemberhappyspider3-Mar-05 23:31 
GeneralModification for VS2008 Pinmemberperanb30-Jul-08 0:04 
Generalgr8 PinmemberTeeBee30317-Jul-04 7:00 
GeneralCool!! PinmemberBrian Delahunty9-Jul-04 7:00 
GeneralThanks !! Pinmemberdeveloper20005-Jul-04 2:34 
GeneralRe: Thanks !! PinmemberTom Fischer9-Jul-04 2:34 
GeneralThanks Mcarbenay PinmemberManish K. Agarwal29-Jun-04 18:56 
GeneralDoesn't support ASP.NET projects :-( PinstaffNishant S27-Jun-04 20:56 
GeneralRe: Doesn't support ASP.NET projects :-( Pinmembermcarbenay28-Jun-04 5:15 
GeneralRe: Doesn't support ASP.NET projects :-( PinmemberColin Angus Mackay28-Jun-04 9:57 
GeneralRe: Doesn't support ASP.NET projects :-( PinsussAnonymous1-Jul-04 6:37 
GeneralRe: Doesn't support ASP.NET projects :-( Pinmembermcarbenay2-Jul-04 11:16 
GeneralExcellent PinadminChris Maunder27-Jun-04 20:40 
GeneralRe: Excellent PinstaffNishant S27-Jun-04 20:51 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

| Advertise | Privacy | Terms of Use | Mobile
Web04 | 2.8.150327.1 | Last Updated 16 Jul 2004
Article Copyright 2004 by mcarbenay
Everything else Copyright © CodeProject, 1999-2015
Layout: fixed | fluid