VSWhere utility for locating installations
Posted: (EET/GMT+2)
If you have multiple versions of Visual Studio or Build Tools installed on your PC, you can quickly find them with a small command-line utility called VSWhere.exe. It's included with Visual Studio 2017 under the installation path at:
C:\Program Files (x86)\Microsoft Visual Studio\Installer\vswhere.exe
When you run it, it will list all installed editions, something like this:
instanceId: 6b05f542 installDate: 20.2.2018 13.28.07 installationName: VisualStudio/15.0.3+26228.04 installationPath: C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise installationVersion: 15.0.26228.04 productId: Microsoft.VisualStudio.Product.Enterprise productPath: C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\devenv.exe isComplete: 1 isLaunchable: 1 ...
You can even use command-line switches to filter or format the results:
vswhere -latest -products * -requires Microsoft.Component.MSBuild -property installationPath
The above command returns the latest Visual Studio installation path with MSBuild installed. This can be useful for scripts and build servers.