HiveBrain v1.2.0
Get Started
← Back to all entries
snippetbashTip

vswhere — Locate Visual Studio 2017 and newer installations. More information: <https://github.com/microsoft/v

Submitted by: @import:tldr-pages··
0
Viewed 0 times
visualcommandvswherestudioandlocatecli2017
windows

Problem

How to use the vswhere command: Locate Visual Studio 2017 and newer installations. More information: <https://github.com/microsoft/vswhere>.

Solution

vswhere — Locate Visual Studio 2017 and newer installations. More information: <https://github.com/microsoft/vswhere>.

Find the path of vcvarsall.bat to set environment variables:
vswhere -products * -latest -prerelease -find **\VC\Auxiliary\Build\vcvarsall.bat


Find the directory of the x64 MSVC compiler (cl.exe, etc):
vswhere -products * -latest -prerelease -find **\Hostx64\x64\*


Find the directory of Clang bundled with Visual Studio bundled (clang-cl, clang-tidy, etc):
vswhere -products * -latest -prerelease -find **\Llvm\bin\*


Find the path of MSBuild.exe:
vswhere -products * -latest -prerelease -find MSBuild\**\Bin\MSBuild.exe

Code Snippets

Find the path of vcvarsall.bat to set environment variables

vswhere -products * -latest -prerelease -find **\VC\Auxiliary\Build\vcvarsall.bat

Find the directory of the x64 MSVC compiler (`cl.exe`, etc)

vswhere -products * -latest -prerelease -find **\Hostx64\x64\*

Find the directory of Clang bundled with Visual Studio bundled (clang-cl, clang-tidy, etc)

vswhere -products * -latest -prerelease -find **\Llvm\bin\*

Find the path of `MSBuild.exe`

vswhere -products * -latest -prerelease -find MSBuild\**\Bin\MSBuild.exe

Context

tldr-pages: windows/vswhere

Revisions (0)

No revisions yet.