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 <reis@janeasystems.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
  • Loading branch information
Loghorn authored and joaocgreis committed Aug 8, 2018
1 parent d8a0ca7 commit 340403c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/Find-VS2017.cs
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 340403c

Please sign in to comment.