Sam
Sam

Reputation: 30388

Repository info in Visual Studio Solution

I copied and pasted an existing solution with multiple projects into a new folder. The original solution is bound to a repository on VSTS.

I was careful to copy only the actual project files I created along with the sln file. When I opened the new version, I got the following messages.

enter image description here

enter image description here In the sln file, I don't see any information about the repo. Where is the repo information stored? What file do I need to edit to remove all references to a repository?

P.S. I'm using Visual Studio 2017 on my computer and on VSTS, I'm using TFVC for version control.

Update: When I go to File > Source Control > Advanced > Change Source Control, I see no bindings. See image below. enter image description here

When I click the "Team Explorer", I get the following message. enter image description here

I don't think I have any workspaces configured. See below: enter image description here

Upvotes: 0

Views: 263

Answers (2)

starian chen-MSFT
starian chen-MSFT

Reputation: 33698

The manual way:

  1. Remove TeamFoundationversionControl section from sln file (open it through Notepad)

For example:

GlobalSection(TeamFoundationVersionControl) = preSolution
        SccNumberOfProjects = 4
        SccEnterpriseProvider = {4CA58AB2-18FA-4F8D-95D4-32DDF27D184C}
        SccTeamFoundationServer = https://XXX.visualstudio.com/
        SccLocalPath0 = .
        SccProjectUniqueName1 = ClassLibraryStandard20\\ClassLibraryStandard20.csproj
        SccProjectName1 = ClassLibraryStandard20
        SccLocalPath1 = ClassLibraryStandard20
        SccProjectUniqueName2 = ConsoleAppwithStandard\\ConsoleAppwithStandard.csproj
        SccProjectName2 = ConsoleAppwithStandard
        SccLocalPath2 = ConsoleAppwithStandard
        SccProjectUniqueName3 = WebApplication1\\WebApplication1.csproj
        SccProjectName3 = WebApplication1
        SccLocalPath3 = WebApplication1
    EndGlobalSection
  1. Delete .vs folder
  2. Delete vspscc files (e.g. {project name}.csproj.vspscc, same folder level of project file)
  3. Remove Scc… sections from each project files

For example:

<SccProjectName>SAK</SccProjectName>
    <SccLocalPath>SAK</SccLocalPath>
    <SccAuxPath>SAK</SccAuxPath>
    <SccProvider>SAK</SccProvider>

Upvotes: 1

Shalem
Shalem

Reputation: 1516

Best way is to unbind & rebind the projects/files from source control.

File -> Source Control -> Advanced -> Change Source Control

Remove Bindings

Unbind and/or disconnect all projects and the solution.It deletes/removes all bindings from the solution and project files. Next/Other step is to to bind source.

Tools -> Options -> Source Control -> Plug-in Selection

Upvotes: 1

Related Questions