Search code examples
visual-studioazure-devopsvisual-studio-2019git-cloneazure-devops-server-2019

How To Choose Preferred Visual Studio Version When Cloning From Azure DevOps


My colleagues and I have several versions of Visual Studio installed which — for business reasons — we may need to keep for some time. For some teammates an inconvenient version of Visual Studio will open when cloning a git repository from Azure DevOps server, starting from this web UI:

figure showing clone button on azure devops

How can we ensure the preferred version of VS opens upon/after cloning? As a bonus, would there be any way to configure this per repository?

So far the best we have worked out is to follow these steps. However it doesn't seem to consistently update the preference for every user. In particular, if a team member has already cloned at least once targeting an earlier version (e.g. VS 2015, VS 2017) we seem to have a dickens of a time getting an update of this preference to VS 2019 to stick.

  1. Open “Default Apps” in system settings
  2. Select “Choose default apps by protocol”
  3. Scroll to “Microsoft Visual Studio Web Protocol Handler Selector"
  4. Change handler to Visual Studio 2019

Note: Our machines have MS VS Web Protocol Handler Selector listed twice. We have experimented with setting both or either without success. Any suggestions why we're seeing the protocol selector twice may also help.


Solution

  • would there be any way to configure this per repository?

    For this issue, I am afraid this is currently not achievable in azure devops.

    As a workaround ,agree with James Z, you can perform cloning in a specific version of visual studio instead of from the web UI from azure devops, so you don't have to worry about the troubles caused by the default version. In addition , the MS VS Web Protocol Handler Selector icon for vs2017 and vs2019 looks almost the same, which is also easy to confuse.

    Open a specific version of visual studio according to your needs, connect to your project in Team Explorer, and select the repo to be cloned.

    enter image description here