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: #1144
  • Loading branch information
Loghorn committed Jul 30, 2018
1 parent 6b0f4ae commit ff3d42f
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 ff3d42f

Please sign in to comment.