Fast acquisition of vswhere
I introduced vswhere last week as an easy means to locate Visual Studio 2017 and newer, along with other products installed with our new installer that provides faster downloads and installs – even for full installs (which has roughly doubled in size with lots of new third-party content).
vswhere was designed to be a fast, small, single-file executable you could download and even redistribute in a build pipeline or for other uses. To make this easy to acquire, I’ve published both a NuGet package and made vswhere available via Chocolatey.
[code gutter=”false”]choco install vswhere vswhere -latest -products * -requires Microsoft.Component.MSBuild -property installationPath[/code]
You might notice a few other surprises in that command line I’ve implemented for our first packaged release of 1.0.40.
- You can pass a single “*” to
-productsto search all installed product instances. Note that the asterisk is not a wildcard that can be used for pattern matching.
- You can specify a single property to return only that property value. In PowerShell and some other script environments that makes it very easy to capture into a variable.
You can also install using the Chocolatey package provider for PowerShell, but a bug in the provider does not put vswhere in your
See our wiki for more information.