Skip to content

vswhere could not detect VS2022 RTM version #258

Closed

Description

I tried -prerelease and still no result.

C:\Windows\system32>vswhere -prerelease
Visual Studio Locator version 2.8.4+ff0de50053 [query version 3.0.4492.23473]
Copyright (C) Microsoft Corporation. All rights reserved.
C:\Windows\system32>

Activity

  1. heaths commented on Jan 24, 2022

    @heaths
    Member

    Use the -all option in case the instance did not complete successfully or required a reboot. Per -? usage:

    -all           Finds all instances even if they are incomplete and may not launch.
    
  2. added
    question
    on Jan 24, 2022
  3. pavel-penka commented on Jan 25, 2022

    @pavel-penka

    Hi, I have Visual Studio Build Tools 2022 17.0.5 installed on the build server, but vswhere cannot find it. Does not matter if I mention other parameters like

    -all
    -version [16.0,17.0) -products Microsoft.VisualStudio.Product.BuildTools -latest -prerelease
    
    

    Visual Studio Installer can find it successfully, but it does not help me with the Azure DevOps build task.

  4. heaths commented on Jan 25, 2022

    @heaths
    Member

    From the usage information, i.e. -?:

      -products arg  One or more product IDs to find. Defaults to Community, Professional, and Enterprise.
                     Specify "*" by itself to search all product instances installed.
                     See https://aka.ms/vs/workloads for a list of product IDs.
    

    To include Build Tools you need to pass -products *. That is a duplicate of #8 and changing that would be a breaking change. For VS2017, Build Tools had no where close to the number of compilers, SDKs, tools, etc. that VS did and could not build most workloads VS could, hence not being included by default.

    0x7FFFFFFFFFFFFFFF (@0x7FFFFFFFFFFFFFFF) if that resolves your problem as well, please close this issue since this is by design and described in -?.

  5. pavel-penka commented on Jan 25, 2022

    @pavel-penka

    Thanks heaths, but id did not find it either I specify -products * or -products Microsoft.VisualStudio.Product.BuildTools or -all.

    But, everthing has changed, after I installed real full-featured Visual Studio 2022 Enterprise on the build server. Suddenly vswhere can find Build Tools 2022 and also the Visual Studio 2022 Enterprise. And that means, that the Azure DevOps msbuild and vsbuild task can run successfully. But before the instalation of Visual Studio 2022 Enterprise it did not find anything and the msbuild task ended with running msbuild version 4 directly from the framework 4.0 folder which was not good. What is wierd is, that the version of vswhere did not change. All the time it is Visual Studio Locator version 2.7.1+180c706d56 [query version 3.0.4492.23473]. Maybe something has changed in the registry, who knows.

  6. heaths commented on Jan 25, 2022

    @heaths
    Member

    vswhere works against an API installed with Visual Studio and does not use the registry. The combination of flags matter, as a product can be in a broken, non-launchable state, prerelease, or not a default product. I encourage people to read -? to see what combination of flags to use to suit the specific needs. For example, to find any product in any state, -products * -all -prerelease would do it, but whatever you end up using may not actually launch. That's why we don't include non-launchable products by default.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    question

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions