0

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

Sam
  • 26,817
  • 58
  • 206
  • 383

2 Answers2

1

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

Shalem
  • 1,446
  • 2
  • 22
  • 47
  • This is not working for me. See the image I uploaded under Update in original post. I see no bindings yet when I open the solution, I still get the warning. – Sam Mar 16 '18 at 02:57
  • @Sam - Try clear/remove local mapping in workspace and freshly do the local mapping. – Shalem Mar 16 '18 at 06:00
1

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>
starian chen-MSFT
  • 33,174
  • 2
  • 29
  • 53
  • I was pretty sure this would work but I'm still getting the warning. I did all 4 items you mentioned in your answer. Also when I go into File > Source Control > Advanced > Change Source Control, I see no bindings -- see the image I uploaded to original post. Yet, when I open up the project, I'm still getting the warning that the solution is bound to source control. Any ideas? – Sam Mar 16 '18 at 02:54
  • @Sam Try to copy the solution folder to other path (do not in any workspaces) and try again. – starian chen-MSFT Mar 16 '18 at 02:57
  • Do you mean, I should make a fresh new copy of the original code from the folder that's under source control, THEN follow your 4 steps? – Sam Mar 16 '18 at 02:58
  • @Sam No, it doesn't affect anything, just make sure the files are not in any workspaces of VSTS, – starian chen-MSFT Mar 16 '18 at 03:09
  • Sorry but I'm clear about what you're saying. I posted new images in the original post. Looks like I don't have any workspaces configured. But I'm getting those messages. – Sam Mar 16 '18 at 03:18
  • It was my mistake. Looks like I skipped the section in the `sln` file completely. I now removed it and the messages disappeared. Thank you for your help! – Sam Mar 16 '18 at 03:24
  • This solution has worked perfect for me. Thanks – cozmin-calin Mar 08 '21 at 07:30