vswhere.exe not giving the current version of vs_BuildTools installed.

aman sahay 30 Reputation points
2024-08-20T11:08:21.9433333+00:00

We were exploring regarding installing Visual studio Build tools through python script (for pipeline setup), for the same there are command line options present in the vs_BuildTools.exe , this is great but how does one know the current version of the VS Build tools installed (this is required for accessing the question : is an update required).

There is an option of running vswhere.exe that comes to mind, but running vswhere.exe does not list the version of Build tools installed (We have tried by running it with installing only vs_BuildTools and not Visual studio and it is not giving any info regarding the current install of build tools).

is this is a bug of vswhere.exe or are we trying a wrong approach.

Visual Studio
Visual Studio
A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.
5,176 questions
Visual Studio Setup
Visual Studio Setup
Visual Studio: A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.Setup: The procedures involved in preparing a software program or application to operate within a computer or mobile device.
1,049 questions
{count} vote

1 answer

Sort by: Most helpful
  1. Anna Xiu-MSFT 29,511 Reputation points Microsoft Vendor
    2024-08-21T03:13:04.7933333+00:00

    Hi @aman sahay

    Welcome to Microsoft Q&A! 

    Please try the following command to search all installed VS instances:

    C:\Program Files (x86)\Microsoft Visual Studio\Installer>vswhere  -products *

    If it doesn’t work, you can use the Visual Studio Setup PowerShell Module to query the VS instances.

    User's image

    More tools to detect the VS instances, please refer to: Tools for detecting and managing Visual Studio instances.

    Sincerely,

    Anna


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".  Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.