Skip to content

Commit

Permalink
win: more robust parsing of SDK version
Browse files Browse the repository at this point in the history
  • Loading branch information
refack committed May 13, 2017
1 parent ce815f9 commit d067e3a
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions lib/Find-VS2017.cs
Original file line number Diff line number Diff line change
Expand Up @@ -228,9 +228,10 @@ private static bool CheckInstance(ISetupInstance2 setupInstance2, ref StringBuil
hasMSBuild = true;
else if (id == "Microsoft.VisualStudio.Component.VC.Tools.x86.x64")
hasVCTools = true;
else if (id.StartsWith(Win10SDKPrefix))
Win10SDKVer = Math.Max(Win10SDKVer, UInt32.Parse(id.Substring(Win10SDKPrefix.Length)));
else if (id == "Microsoft.VisualStudio.Component.Windows81SDK")
else if (id.StartsWith(Win10SDKPrefix)) {
string[] parts = id.ToString().Substring(Win10SDKPrefix.Length).Split('.');
Win10SDKVer = Math.Max(Win10SDKVer, UInt32.Parse(parts[0]));
} else if (id == "Microsoft.VisualStudio.Component.Windows81SDK")
hasWin8SDK = true;
else
continue;
Expand Down

0 comments on commit d067e3a

Please sign in to comment.