visual-studio

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


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.

Solution

  • 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.