"The source control provider associated with this solution could not be found..." Window Showing Every Time Visual Studio Launched
Asked Answered
M

3

24

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.
Moorer answered 24/6 at 13:42 Comment(2)
I am experiencing the exact same thing since updating to 17.10.2Farber
I'm also seeing this behavior since the last update, but with only one of my solutions. Others open fine without the notification.Bluefield
M
24

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.

Metchnikoff answered 25/6 at 13:28 Comment(5)
My team's testing this right now! I'll come back to check off as answer once confirmed... thank you!Moorer
PR in, issue resolved! Also, we did also switch from TFVC to Git, so your hypothesis tracks!Moorer
Excellent to hear and glad to hear it worked for you as well.Metchnikoff
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.Petitioner
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).Metchnikoff
C
3

It appears to have been fixed in Visual Studio 2022 version 17.10.5. I updated Visual Studio yesterday evening, and although I still have these old leftovers in my csproj files, the prompt is no longer displayed.

Visual Studio 2022 version 17.10.5: Summary of What's New in this Release

Claus answered 26/7 at 9:5 Comment(0)
L
2

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.
Lulualaba answered 10/7 at 15:43 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.