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

Non deterministic error: 0x57 "version" parameter is not supported #91

Closed
Sam13 opened this issue Aug 10, 2017 · 7 comments
Closed

Non deterministic error: 0x57 "version" parameter is not supported #91

Sam13 opened this issue Aug 10, 2017 · 7 comments

Comments

@Sam13
Copy link

Sam13 commented Aug 10, 2017

I have two machines, both Windows 7 with VS 2015 installed.
One machine has also VS 2017 installed. I'm using vswhere version 2.1.3

I try to run the following command to get the path for VS2015:
vswhere.exe -legacy -version "[14,15)" -property installationPath -nologo

On the machine with VS2017 installed the path is successfully determined.
On the other machine the following error is reported:
Error 0x57: The "version" parameter is not supported

I already made sure that the same version of vswhere is used...

@heaths
Copy link
Member

heaths commented Aug 10, 2017

Already fixed in in #85. Please use version 2.1.3 or newer of vswhere.

@heaths heaths closed this as completed Aug 10, 2017
@Sam13
Copy link
Author

Sam13 commented Aug 11, 2017

As I wrote in my first post: I'm using version 2.1.3

@heaths
Copy link
Member

heaths commented Aug 11, 2017

If you look at the issues mentioned by #85 this behavior was intentional since version ranges are not supported without VS2017 or newer installed. Previously I simply ignored the version range, but then callers may get data that does not fit in the version range if VS2017 or newer - which provides the version range handler - is not installed.

@Sam13
Copy link
Author

Sam13 commented Aug 14, 2017

@heaths Thanks, for the clarification. But I still do not get why VS2017 is needed to locate previous versions of VisualStudio...
What's the command line to find specific versions of VisualStudio without having VS2017 is installed?
E.g. 2010 or 2015

@heaths
Copy link
Member

heaths commented Aug 14, 2017

It's not. vswhere can locale Visual Studio 10.0 (2010) and newer, but you cannot use the -version parameter because the function that parses it is actually part of the query API introduced in VS2017. You can use -latest and if, say, 14.0 is newest, that will be selected.

In past versions, passing -version without the query API installed would not error but wouldn't do anything, and there were a couple of complaints that if someone, say, specified -version [12.0,14.0] 10.0 - if installed - could get returned. I agreed an error in this case makes more sense, though I designed vswhere to fail as little as possible (i.e. best effort approaches). Better to err than return incorrect data.

Note that vswhere was designed for 15.0 and newer. Supporting 10.0 - with minimal information returned - was bolted on later so developers could change detection scripts to use vswhere exclusively instead of handling registry- vs. query API-based detection separately themselves.

@jvilimek
Copy link

Hi there. I have VS 15.5.4 installed. when I run vswhere with version
& $vsWhere -version 15 -property displayName
then it returns an error:

Visual Studio Locator version 2.2.11+gf1a9c6c78d
Copyright (C) Microsoft Corporation. All rights reserved.
Error 0x57: The "version" parameter is not supported
All/Latest versions return empty set (i.e. nothing but logo)
what can be wrong?

@heaths
Copy link
Member

heaths commented May 21, 2018

Please open a new issue in the future. This one is old and resolved.

It appears you don't have the query API registered. Please try repairing Visual Studio.

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

3 participants