Click here to Skip to main content
15,885,190 members
Please Sign up or sign in to vote.
5.00/5 (1 vote)
See more:
I want to move an existing project to a new location and strip it of all its source control binding information.

It is a solution created in Visual Studio 2003, which in its current state is bound (sort of - it's not working well) to TFS, whose bindings are controlled by using the MSSCCI plugin/provider.

Which files must I omit from my file-copying operation?

Which files, if any, do I need to retain yet delete or edit certain TFS/MSSCCI binding information from (and what information do I need to delete or edit)?

Is my assumption that I need to remove the following from the .sln file correct:

VB
GlobalSection(SourceCodeControl) = preSolution
        SccNumberOfProjects = 2
        SccLocalPath0 = .
        CanCheckoutShared = false
        SolutionUniqueID = {D6B21FF1-3534-49C0-8E4E-EE1FA496648E}
        SccProjectUniqueName1 = Platypus.csdproj
        SccLocalPath1 = .
        CanCheckoutShared = false
    EndGlobalSection


?

...and this section of the .csdproj file:

VB
<ECSHARP
        ProjectType = "Local"
        ProductVersion = "7.10.6030"
        SchemaVersion = "1.0"
        ProjectGuid = "{CA63566E-76DE-4EE5-8292-71EBF90A9AC9}"
        SccProjectName = "SAK"
        SccLocalPath = "SAK"
        SccAuxPath = "SAK"
        SccProvider = "SAK"
    >


Based on this, especially where Constantin wrote "...when all 4 source control connection strings in a project have "SAK" values, this is just a flag that tells VS that the real source control bindings of that project are persisted by the MSSCCI scc provider (not by Visual Studio) and should be read from the mssccprj.scc file written by the scc provider in the same folder as the project file.", the "SAK" stuff should indeed get the sack.

...and that I should not copy over the following files:

mssccprj.scc
vssver.scc
Platypus.csdproj.vspscc
Platypus.csproj.vspscc
Platypus.vssscc

?
Posted
Updated 27-Oct-14 6:48am
v6
Comments
Sergey Alexandrovich Kryukov 27-Oct-14 12:35pm    
I did not work with TFS but highly appreciate your idea to remove all traces. Why? Because it's very irritating that many authors show their source code contaminated with non-source files.
You also should know exactly all files: which are source code and which are not.
—SA
Richard MacCutchan 27-Oct-14 14:02pm    
The only way I have ever found that works is to copy only the source files (not solution or project files), and ensure that they do not contain comments used by the source control system. Then use those clean files to create a new project.
Sergey Alexandrovich Kryukov 27-Oct-14 14:37pm    
Sure, but does it have clear "check out" or "export" (as in Subversion) feature which creates a clear project directory without any revision control artifacts? If it is so, the problem would be reduced to not adding any intermediate or configuration files, non-source ones.
—SA
Richard Deeming 27-Oct-14 16:07pm    
There's an open-source tool to remove source-control bindings up on CodePlex which might help:
http://vsunbindsourcecc.codeplex.com/[^]
B. Clay Shannon 27-Oct-14 18:52pm    
Sounds handy, but I doubt it will work on my project (Visual Studio 2003, running in XP Mode).

1 solution

So, for posterity (and/or time travelers from the past), here's what I did to extinctify the source-control bindings:

0) Created a new folder to house a copy of the polluted (source-control-bound) files.

1) Copied all the latest code to there, except for the source-code-specific files (I copied over all *.resx and *.cs files, also Platypus.sln, Platypus.csdproj, and Platypus.csproj).

I did NOT copy over:
mssccprj.scc
vssver.scc
Platypus.csdproj.vspscc
Platypus.csproj.vspscc
Platypus.vssscc
Platypus.csdproj.user
Platypus.resharper.user


2) Stripped this entire block from the the Platypus.sln file:

VB
GlobalSection(SourceCodeControl) = preSolution
		SccNumberOfProjects = 2
		SccLocalPath0 = .
		CanCheckoutShared = false
		SolutionUniqueID = {D6B21FF1-3534-49C0-8E4E-EE1FA496648E}
		SccProjectUniqueName1 = PDAClient.csdproj
		SccLocalPath1 = .
		CanCheckoutShared = false
	EndGlobalSection


3) Stripped out the "SAK"sy stuff from Platypus.csdproj, so that this:

HTML
<ecsharp>
    ProjectType = "Local"
    ProductVersion = "7.10.6030"
    SchemaVersion = "1.0"
    ProjectGuid = "{CA63566E-76DE-4EE5-8292-71EBF90A9AC9}"
    SccProjectName = "SAK"
    SccLocalPath = "SAK"
    SccAuxPath = "SAK"
    SccProvider = "SAK"
>
. . .
</ecsharp>


...became this:

HTML
<ecsharp>
    ProjectType = "Local"
    ProductVersion = "7.10.6030"
    SchemaVersion = "1.0"
    ProjectGuid = "{CA63566E-76DE-4EE5-8292-71EBF90A9AC9}"
></ecsharp>


4) Removed the four"SAK" entries from the Platypus.csproj file, which had:

HTML
  <propertygroup>
  <projecttype>Local</projecttype>
  <productversion>9.0.21022</productversion>
  <schemaversion>2.0</schemaversion>
  <projectguid>{0848BFFE-EC53-4CC2-89AC-DF02C06585C2}</projectguid>
  <sccprojectname>SAK</sccprojectname>
  <scclocalpath>SAK</scclocalpath>
  <sccprovider>SAK</sccprovider>
  . . .
  <sccauxpath>SAK</sccauxpath>
</propertygroup>


That pretty much did it.
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900