Fix parsing -preview
versions in the registry when installed via Visual Studio
#1914
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This issue is pointed out to me by @webreidi and became visible today.
Internal Visual Studio build 17.11.04 shipped with a preview
SDK 8,0.400-preview.0
.This does not impact customers but impacts internal people who try to install using our tool.
Our logic worked for preview SDKs installed by users but not the ones installed by Visual Studio.
When opening up the registry to check if we needed to do this installation, we would see the version as
8.0.400-preview.0
and try to cast400-preview
to a number. This would fail and we would not install the SDK.We can fix this in several ways. One way is to improve some logic around parsing the preview text, but that text is not necessary to handle. So instead, we can just trim out the -preview text and cause it to work.
Before
After