visual-studio-2017azure-devopsgit-clonevisual-studio-project

Azure dev ops -- Set Visual Studio 2017 (VS2017) as default for cloning project


Azure dev ops -- Set Visual Studio 2017 (VS2017) as default for cloning project?

I have multiple versions of Visual Studio installed, and for policy reasons, I need to keep them, at least for a while.

How do I set up Azure dev ops so that when it clones a project via "Visual Studio" (from the dropdown) it will automatically select VS2017 as opposed to an earlier version such as VS2015?


Solution

  • I think this is determined by what version selector is targeted by the 'vsweb' protocol handler, i.e. it's a setting on your machine.

    It seems like when VS2017 installs it doesn't always set the version selector to the 2017 version (which defaults to opening VS2017), rather than an old version.

    This is set in the registry at HKLM\SOFTWARE\Classes\vsweb\Shell\Open\Command. The value will most likely be set to an older version, for example:

    "C:\Program Files (x86)\Common Files\Microsoft Shared\MSEnv\VSWebLauncher.exe" /openuri "%1"
    

    Update it to be:

    "C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\VSWebLauncher.exe" /openuri "%1"
    

    Obviously check the paths are correct before changing them, those are the ones from my machine.

    It's always worth keeping a copy of the old value so you can put it back in if something goes wrong.