Tools for detecting and managing Visual Studio instances

There are several tools that you can use to detect Visual Studio installations on client machines, and to manage the installations, too.

Detecting existing Visual Studio instances

We have made several tools available that will help you detect and manage installed Visual Studio instances on client machines:

  • vswhere: an executable built into Visual Studio or available for separate distribution that helps you find the location of all Visual Studio instances on a particular machine.
  • VSSetup.PowerShell: PowerShell scripts that use the Setup Configuration API to identify installed instances of Visual Studio.
  • VS-Setup-Samples: C# and C++ samples that demonstrate how to use the Setup Configuration API to query an existing installation.

In addition, the Setup Configuration API provides interfaces for developers who want to build their own utilities for interrogating Visual Studio instances.

Using vswhere.exe

vswhere.exe is automatically included in Visual Studio (starting with Visual Studio 2017 version 15.2 and later versions), or you can download it from the vswhere releases page. Use vswhere -? to get help information about the tool. As an example, this command shows all releases of Visual Studio, including earlier versions of the product and prereleases, and outputs the results in JSON format:

C:\Program Files (x86)\Microsoft Visual Studio\Installer> vswhere.exe -legacy -prerelease -format json

Tip

For more information about Visual Studio 2017 installation, see Visual Studio Setup Archives.

Editing the registry for a Visual Studio instance

In Visual Studio, registry settings are stored in a private location, which enables multiple side-by-side instances of the same version of Visual Studio on the same machine.

As these entries are not stored in the global registry, there are special instructions for using the Registry Editor to make changes to registry settings:

  1. If you have an open instance of Visual Studio, close it.

  2. Start regedit.exe.

  3. Select the HKEY_LOCAL_MACHINE node.

  4. From the Regedit main menu, select File > Load Hive... and then select the private registry file, which is stored in the AppData\Local folder. For example:

    %localappdata%\Microsoft\VisualStudio\<config>\privateregistry.bin
    

    Note

    <config> corresponds to the instance of Visual Studio that you would like to browse.

You will be prompted to provide a hive name, which becomes the name of your isolated hive. After you do so, you should be able to browse the registry under the isolated hive that you created.

Important

Before you start Visual Studio again, you must unload the isolated hive that you created. To do this, select File > Unload Hive from the Regedit main menu. (If you do not do this, then the file remains locked and Visual Studio will not be able to start.)

Get support

Sometimes, things can go wrong. If your Visual Studio installation fails, see Troubleshoot Visual Studio installation and upgrade issues for step-by-step guidance.

We also offer an installation chat (English only) support option for installation-related issues.

Here are a few more support options:

See also