Skip to content
This repository was archived by the owner on Jun 21, 2023. It is now read-only.

Conversation

@StanleyGoldman
Copy link
Contributor

@StanleyGoldman StanleyGoldman commented Jan 24, 2018

Recent metrics reporting showed that we are getting 15.0.0 consistently for Visual Studio.

https://developercommunity.visualstudio.com/content/problem/2813/cant-find-registry-entries-for-visual-studio-2017.html

We decided to use the following to get the version information for versions of Visual Studio after 2015.

var setupConfiguration = new SetupConfiguration();
var setupInstance = setupConfiguration.GetInstanceForCurrentProcess();
return setupInstance.GetInstallationName().TrimPrefix(InstallationNamePrefix);

Which will return something in the format of 15.5.2+27130.2010

Copy link
Contributor

@grokys grokys left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems to work here. Returned value is 15.5.4+27130.2024. Assuming the stuff after the + is expected and wanted, LGTM!

@StanleyGoldman
Copy link
Contributor Author

I have to update the body of this pull request, the approach has changed since it was first written up.

@shana shana merged commit 657b04a into master Jan 29, 2018
@shana shana deleted the fixes/visual-studio-2017-version branch January 29, 2018 13:35
@StanleyGoldman
Copy link
Contributor Author

Updated the body

@StanleyGoldman
Copy link
Contributor Author

Fixes: #1434

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants