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

Report better version for VS preview consoles #1166

Conversation

rainersigwald
Copy link
Contributor

For prereleases, the Visual Studio command prompt sets the environment
variable VSCMD_VER to a value like 15.7.0-pre.3.0, which is not
parseable by System.Version.

This could be handled by using a version parser that can handle this
SemVer 2 version as well as Windows 4-part versions, but that would be
another dependency, so I just special-cased the problematic dash.

For prereleases, the Visual Studio command prompt sets the environment
variable `VSCMD_VER` to a value like `15.7.0-pre.3.0`, which is not
parseable by System.Version.

This could be handled by using a version parser that can handle this
SemVer 2 version as well as Windows 4-part versions, but that would be
another dependency, so I just special-cased the problematic dash.
@rainersigwald
Copy link
Contributor Author

Port of microsoft/MSBuildLocator#32.

I noticed this originally when I was mid-update on my preview VS, which caused the Setup API to not report that instance, and OmniSharp to use its own packaged MSBuild because it didn't want the "15.0" devconsole (pointed to preview) nor the (actual) 15.0 instance.

That won't be a normal case, but the bug would prevent OmniSharp from respecting the devconsole instance for previews, which could be a problem if you had a preview + other installations and ran from inside the preview devconsole, depending on the ordering of the installations.

@DustinCampbell I see you already approved the Locator version of this :)

@DustinCampbell
Copy link
Contributor

Excellent! Thanks @rainersigwald!

@DustinCampbell DustinCampbell merged commit f504b8e into OmniSharp:master Apr 18, 2018
@rainersigwald rainersigwald deleted the find-msbuild-in-preview-devconsole branch April 18, 2018 18:50
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants