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

using -requires Microsoft.VisualStudio.Component.VC.Tools.x86.x64 seem to work for Visual Studio Community but not BuildTools #320

Closed
LittleCoinCoin opened this issue Nov 14, 2024 · 3 comments

Comments

@LittleCoinCoin
Copy link

Hello,

Components name specifications for C++ for BuildTools and Visual Studio Community both indicate that component ID Microsoft.VisualStudio.Component.VC.Tools.x86.x64 is available for install and, therefore, retrieval from vswhere.

Observed Behavior

  1. On a system that used Visual Studio Installer to get Community MSVC v143 - VS 2022 C++ x64/x86 BuildTools (latest version), running the command .\vswhere.exe -requires Microsoft.VisualStudio.Component.VC.Tools.x86.x64 outputs information about the configuration as expected
  2. On a system that used Visual Studio Installer to get BuildTools MSVC v143 - VS 2022 C++ x64/x86 BuildTools (latest version), running the command .\vswhere.exe -requires Microsoft.VisualStudio.Component.VC.Tools.x86.x64 DO NOT output anything.

Remark: other components that can be installed both on Community and BuildTools (e.g. windows SDK versions, Cmake tools, and so on) are apparently identical on both systems (i.e. same checkbox names were selected).

Expected Behaviour
Case (2) should output the same information as case (1) (given that they use the same version of Visual Studio installer).

@LittleCoinCoin
Copy link
Author

As an additional comment, I have read the pinned issue #130 and the ones linked inside, but I thought their focus on products was different... 🤔

@heaths
Copy link
Member

heaths commented Nov 14, 2024

The product may not have the same component - the same ID, that is. You need to look at the catalog for components and you can pass -requiresAny to basically treat the list of -requires as an OR condition instead of an AND. Components may have different IDs if the team that owns them is trying to manage different "views" by composing different components for different products that may have more or fewer binaries in each workload.

You must pass -product * to search all products. #130 explains why Build Tools is not included and won't be. It would be breaking behavior. Just add -product * if you want to search for all products.

@LittleCoinCoin
Copy link
Author

Hello @heaths

Thank you very much for your answer. I apologize for misunderstanding the reach of #130 (and #22) when I read it.

For the purpose of answering my question, I confirm that the following command specifying the product ID for BuildTools (on a system that has it installed) ended up outputing equivalent information as not specifying any product ID (on a system that has Visual Studio Community installed):
.\vswhere.exe -products Microsoft.VisualStudio.Product.BuildTools -requires Microsoft.VisualStudio.Component.VC.Tools.x86.x64

And, of course, passing -products * on a system that has the component Microsoft.VisualStudio.Component.VC.Tools.x86.x64 installed twice via both BuildTools and Visual Studio Community outputs the information from both install (which could then be manipulated passing -latest or -sort). E.g.:
.\vswhere.exe -products * -requires Microsoft.VisualStudio.Component.VC.Tools.x86.x64

Thank you again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants