How to find vswhere exe path?
Asked Answered
D

2

5

Whether user can customize the below vswhere.exe path while visual studio installation?

C:\Program Files (x86)\Microsoft Visual Studio\Installer\vswhere.exe

Reason for asking this query is ,I used vswhere exe for find the VS2017 & 19 installation path in my project.

"VSWHERE=%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere.exe"

Suggest any other way to find the Vswhere exe path.

Donne answered 22/1, 2019 at 10:0 Comment(2)
That's a fixed path for now (based on VS2017/2019). Everyone relies on Microsoft to keep using that path.Triturate
#Lex Li Thanks a lotDonne
D
12

From Microsoft ( https://github.com/Microsoft/vswhere/wiki/Installing ) :

Starting with Visual Studio 15.2 (26418.1 Preview) vswhere.exe is installed in

%ProgramFiles(x86)%\Microsoft Visual Studio\Installer.

(use %ProgramFiles% in a 32-bit program prior to Windows 10).

This is a fixed location that will be maintained.

This means that vswhere will be located at %ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere.exe no matter what options the user chose on the Visual Studio installer or MSBuild Tools installer.

Note that if you install vswhere using Chocolatey (instead of the VS/MSBuild installer), it will be located at %ProgramData%\chocolatey\lib\vswhere\tools\vswhere.exe

If you install vswhere via NuGet, it will be installed in the globalPackagesFolder (defaults to %userprofile%\.nuget\packages)

Demo answered 20/6, 2019 at 0:21 Comment(0)
I
0

Landed here because I did not have MS Build Tools installed and was getting this in a GitHub Actions Build. Make sure that you have MS Build Tools installed on your Machine or Server. This can be added while installing Visual Studio, or if you would like to install just the MS Build Tools to keep your machine/server lighter visit: https://visualstudio.microsoft.com/downloads/?cid=learn-onpage-download-cta

Scroll down and expand Tools for Visual Studio->Build Tools for Visual Studio. Here is the current release as of this posting: https://aka.ms/vs/17/release/vs_BuildTools.exe

enter image description here

Inductor answered 14/11, 2023 at 1:31 Comment(0)

© 2022 - 2025 — McMap. All rights reserved.