Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

-requires wildcard #276

Closed
ryanmkurtz opened this issue Nov 2, 2022 · 9 comments · Fixed by #280
Closed

-requires wildcard #276

ryanmkurtz opened this issue Nov 2, 2022 · 9 comments · Fixed by #280
Assignees
Labels
enhancement Feature request.

Comments

@ryanmkurtz
Copy link

I would like to do something like -requires Microsoft.VisualStudio.Component.Windows10SDK.*, or something similar so I don't have to maintain a list of all possible SDK versions when any will suffice. Is that possible?

@heaths
Copy link
Member

heaths commented Nov 2, 2022

I'm not opposed to the idea - we could keep it efficient by only doing a wildcard match if there are wildcard characters in the filter - but why not just depend on the parent Workload then? IIRC, at least one Windows SDK is required so if you don't care which version this should be equivalent.

@ryanmkurtz
Copy link
Author

but why not just depend on the parent Workload then?

Are you referring to Microsoft.VisualStudio.Workload.UniversalBuildTools?

@heaths
Copy link
Member

heaths commented Nov 2, 2022

There's a couple, but that one is probably best if you just want a Windows SDK.

@ryanmkurtz
Copy link
Author

In my experimentation it's possible to install studio or build tools with no SDK, and there are many components that full under Microsoft.VisualStudio.Workload.UniversalBuildTools that don't fulfill my Win10 or Win11 SDK requirement, so I think a wildcard or regex would still be needed.

@heaths heaths self-assigned this Nov 8, 2022
heaths added a commit to heaths/vswhere that referenced this issue Nov 14, 2022
Fixes microsoft#276. Also resolves microsoft#270 by including link to more details on versioning syntax.
@heaths heaths linked a pull request Nov 14, 2022 that will close this issue
heaths added a commit to heaths/vswhere that referenced this issue Nov 14, 2022
Fixes microsoft#276. Also resolves microsoft#270 by including link to more details on versioning syntax.
heaths added a commit that referenced this issue Nov 15, 2022
* Support DOS-like wildcards in -requires

Fixes #276. Also resolves #270 by including link to more details on versioning syntax.

* Update minor version for new feature
@heaths
Copy link
Member

heaths commented Nov 15, 2022

This feature is included in 3.1.1 which is available on nuget.org, chocolatey.org, and should soon be available in scoop.

@heaths
Copy link
Member

heaths commented Nov 15, 2022

I've also added this to the wiki: https://github.com/microsoft/vswhere/wiki/Examples#wildcards

@ryanmkurtz
Copy link
Author

Thank you!

@neur1n
Copy link

neur1n commented Jan 14, 2023

When running vswhere -requires Microsoft.VisualStudio.Component.Windows10SDK.*, why am I getting the following results instead of the installation location of Windows SDK (which should be D:\Windows Kits\10)?

Visual Studio Locator version 3.1.1+f4ef329670 [query version 2.11.65.22356]
Copyright (C) Microsoft Corporation. All rights reserved.

instanceId: 32e62fb6
installDate: 5/26/2022 16:08:27
installationName: VisualStudio/16.11.23+33214.272
installationPath: C:\Program Files (x86)\Microsoft Visual Studio\2019\Community
installationVersion: 16.11.33214.272
productId: Microsoft.VisualStudio.Product.Community
productPath: C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\IDE\devenv.exe
state: 4294967295
isComplete: 1
isLaunchable: 1
isPrerelease: 0
isRebootRequired: 0
thirdPartyNotices: https://go.microsoft.com/fwlink/?LinkId=660909
updateDate: 2023-01-12T08:50:11.3291813Z
catalog_buildBranch: d16.11
catalog_buildVersion: 16.11.33214.272
catalog_id: VisualStudio/16.11.23+33214.272
catalog_localBuild: build-lab
catalog_manifestName: VisualStudio
catalog_manifestType: installer
catalog_productDisplayVersion: 16.11.23
catalog_productLine: Dev16
catalog_productLineVersion: 2019
catalog_productMilestone: RTW
catalog_productMilestoneIsPreRelease: False
catalog_productName: Visual Studio
catalog_productPatchVersion: 23
catalog_productPreReleaseMilestoneSuffix: 1.0
catalog_productSemanticVersion: 16.11.23+33214.272
catalog_requiredEngineVersion: 2.11.69.53063
properties_campaignId: 2030:68786c65-beca-44df-bab1-d1f58a781f07
properties_channelManifestId: VisualStudio.16.Release/16.11.23+33214.272
properties_nickname:
properties_setupEngineFilePath: C:\Program Files (x86)\Microsoft Visual Studio\Installer\setup.exe

@heaths
Copy link
Member

heaths commented Jan 16, 2023

vswhere is for finding the location of VS, not individual package information which can have numerous top-level directories, such as Windows Kits. With the returned installation path you have to construct your own child path. Anything installed outside the VS installation path is most likely a Windows Installer package and you can use other existing means to detect if and where they are installed.

In the future, please open a new issue.

@microsoft microsoft locked as resolved and limited conversation to collaborators Jan 16, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement Feature request.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants