Skip to content

Commit

Permalink
win: improve parsing of SDK version
Browse files Browse the repository at this point in the history
This makes the parsing more robust and fixes the additional issue
related to USB Device Connectivity component.

Fixes: #1466
PR-URL: #1516
Reviewed-By: João Reis <[email protected]>
Reviewed-By: Refael Ackermann <[email protected]>
Reviewed-By: Richard Lau <[email protected]>
  • Loading branch information
Loghorn authored and joaocgreis committed Aug 8, 2018
1 parent b2e5cf0 commit 25208f1
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/Find-VS2017.cs
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,9 @@ private static bool CheckInstance(ISetupInstance2 setupInstance2, ref StringBuil
string[] parts = id.Substring(Win10SDKPrefix.Length).Split('.');
if (parts.Length > 1 && parts[1] != "Desktop")
continue;
Win10SDKVer = Math.Max(Win10SDKVer, UInt32.Parse(parts[0]));
uint foundSdkVer;
if (UInt32.TryParse(parts[0], out foundSdkVer))
Win10SDKVer = Math.Max(Win10SDKVer, foundSdkVer);
} else if (id == "Microsoft.VisualStudio.Component.Windows81SDK")
hasWin8SDK = true;
else
Expand Down

0 comments on commit 25208f1

Please sign in to comment.