17

After this latest Visual Studio 2022 update, the following pop-up window/modal shows only the first time a Solution is loaded (by clicking my "Pinned" shortcut) in that Visual Studio instance. Selecting "no" allows me to still work with source control.

The source control provider associated with this solution could not be found. The projects will be treated as not under source control.

Do you want to permanently remove the source control bindings from the projects?

enter image description here

I am able to do my work normally by selecting "no", but it feels like maybe we've had something setup incorrectly? Most likely this will only be annoying. Or is it maybe a new bug introduced into Visual Studio?

enter image description here

What does not show the modal:

  1. Opening any Solution in the same Visual Studio instance after the first Solution is loaded (including the same Solution).
  2. Opening Visual Studio without automatically opening a Solution. Open Visual Studio > "Open a project or solution" > Select SLN file.
2
  • 6
    I am experiencing the exact same thing since updating to 17.10.2 Commented Jun 24 at 17:39
  • 1
    I'm also seeing this behavior since the last update, but with only one of my solutions. Others open fine without the notification. Commented Jun 25 at 14:49

2 Answers 2

17

If you click Yes on the dialog and compare the before and after (or look at Git if you're using that) you'll likely see this:

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

In our case the organization had used TFS in the past, but when switching over to Git never fully removed the old bindings.

Either let Visual Studio clean them up for you or remove those from the csproj files yourself. Then your pinned shortcut should work as before.

EDIT:

On further looking, looks like this was reported as a Visual Studio bug a while back (March of this year). 17.10.0 Preview 2.0 - The source control provider associated with this solution could not be found.

Bit of note:

If you click “Yes” to removing the SCC bindings, changes will be done to your csproj (these properties will be removed). If you then close the solution, you’ll be prompted to save these changes. Next time you start Visual Studio, you won’t reproduce the bug, and you’ll see the property removal in Git Changes.

We suspect these properties are leftovers from using TFVC. Did you perhaps convert to Git?

Also Karl Zachry, your suspicions about the root cause are almost on point. As part of a performance improvement, we started loading Git a little later into the startup cycle. For that reason, the SCC provider properties that used to be ignored (since Git was already up and running) are now being queried.

5
  • 1
    My team's testing this right now! I'll come back to check off as answer once confirmed... thank you! Commented Jun 25 at 19:09
  • 2
    PR in, issue resolved! Also, we did also switch from TFVC to Git, so your hypothesis tracks! Commented Jun 25 at 20:33
  • 1
    Excellent to hear and glad to hear it worked for you as well. Commented Jun 25 at 23:49
  • I am running VS 17.10.3 and still experiencing the issue. My project targets .NET 4 and its migrated to Git some years ago. Commented Jul 8 at 9:08
  • Since your code is under git, you could safely run the command to have Visual Studio remove the source control mappings. Run a git status after and my guess (based upon what I saw in a third repo) is that there's a project file that still has some TFS mappings. Selecting 'Yes' to the dialog will make changes that git will pickup (unless you've excluded the directory/files explicitly), so it's safe to have VS do it for you. Would be curious to hear what it ends up removing for you (might help others). Commented Jul 8 at 15:29
0

We were hesitant to let Visual Studio "permanently remove the source control bindings", so we did a Find In Files for "SccProjectName". Sure enough, there was one project file with the exact lines shown in James Skemp's answer. We removed "SAK" from all 4 lines, reloaded the solution, and the prompt was gone.

//search solution for the following code, and remove SAK from each line

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

//reload the solution and the prompt should be gone.

Not the answer you're looking for? Browse other questions tagged or ask your own question.