Skip to content
New issue

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

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

Already on GitHub? # to your account

The "-legacy" option does not appear to work with the "-version" option. #62

Closed
mistachkin opened this issue May 5, 2017 · 2 comments
Closed
Assignees
Labels
enhancement Feature request.

Comments

@mistachkin
Copy link

Using the "-legacy" and "-version" options together does not work. It always outputs all legacy versions. Either these options should actually work together -OR- using them together should produce an error.

@heaths
Copy link
Member

heaths commented May 5, 2017

-latest and -version do work together but only if you have VS installed because the parser for the version range is implemented by the COM API that the VS installer installs. -latest works by sorting the legacy versions as seen in https://github.com/Microsoft/vswhere/blob/develop/src/vswhere.lib/InstanceSelector.cpp#L145-L156.

At this time, I have no plans to duplicating the version range parsing logic in vswhere to handle when the COM API is not installed. What scenario are you trying to support that you need to specify a version range with only legacy products installed?

@heaths heaths self-assigned this May 5, 2017
@heaths heaths added the enhancement Feature request. label May 5, 2017
@mistachkin
Copy link
Author

mistachkin commented May 5, 2017

I was trying to query for only Visual Studio 2015 using "-version 14.0"; instead it returned 2010 to 2015. Perhaps you could add a small check to see if the COM API is installed and disallow -version with -legacy in that case?

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
enhancement Feature request.
Projects
None yet
Development

No branches or pull requests

2 participants