@@ -38,13 +38,13 @@ public struct ToolchainVersion
38
38
}
39
39
40
40
/// <summary>
41
- /// Describes the major and minor version of something.
41
+ /// Describes the major and minor version of something.
42
42
/// Each version must be at least non negative and smaller than 100
43
43
/// </summary>
44
44
public struct Version
45
45
{
46
46
public int Major ;
47
-
47
+
48
48
public int Minor ;
49
49
}
50
50
@@ -162,7 +162,7 @@ public static VisualStudioVersion FindVSVersion(VisualStudioVersion vsVersion)
162
162
}
163
163
164
164
// we don't know what "latest" is on a given machine
165
- // so start from the latest specified version and loop until a match is found
165
+ // so start from the latest specified version and loop until a match is found
166
166
for ( var i = VisualStudioVersion . Latest - 1 ; i >= VisualStudioVersion . VS2012 ; i -- )
167
167
{
168
168
vsVersion = FindVSVersion ( i ) ;
@@ -348,7 +348,7 @@ public static List<ToolchainVersion> GetNetFrameworkSdks()
348
348
/// <summary>
349
349
/// Gets MSBuild installation directories.
350
350
/// </summary>
351
- ///
351
+ ///
352
352
/// <returns>Success of the operation</returns>
353
353
public static List < ToolchainVersion > GetMSBuildSdks ( )
354
354
{
@@ -444,7 +444,7 @@ public static List<ToolchainVersion> GetVisualStudioSdks()
444
444
/// <param name="keyPath">The path to the key in the registry.</param>
445
445
/// <param name="matchValue">The value to match in the located key, if any.</param>
446
446
/// <param name="view">The type of registry, 32 or 64, to target.</param>
447
- ///
447
+ ///
448
448
public static List < ToolchainVersion > GetToolchainsFromSystemRegistryValues (
449
449
string keyPath , string matchValue , RegistryView view )
450
450
{
@@ -637,11 +637,15 @@ orderby package.GetId()
637
637
includes . Add ( path + @"\VC\Tools\MSVC\" + version + @"\atlmfc\include" ) ;
638
638
}
639
639
var sdks = from package in packages
640
- where package . GetId ( ) . Contains ( "Windows10SDK" ) || package . GetId ( ) . Contains ( "Windows81SDK" ) || package . GetId ( ) . Contains ( "Win10SDK_10" )
640
+ where package . GetId ( ) . Contains ( "Windows10SDK" ) ||
641
+ package . GetId ( ) . Contains ( "Windows81SDK" ) ||
642
+ package . GetId ( ) . Contains ( "Win10SDK_10" )
641
643
select package ;
642
644
var win10sdks = from sdk in sdks
643
- where sdk . GetId ( ) . Contains ( "Windows10SDK" )
645
+ where regexWinSDK10Version . Match ( sdk . GetId ( ) ) . Success
646
+ orderby sdk . GetId ( )
644
647
select sdk ;
648
+
645
649
var win8sdks = from sdk in sdks
646
650
where sdk . GetId ( ) . Contains ( "Windows81SDK" )
647
651
select sdk ;
@@ -660,7 +664,7 @@ where sdk.GetId().Contains("Windows81SDK")
660
664
}
661
665
else
662
666
{
663
- path = "<invalid>" ;
667
+ throw new Exception ( "Windows10SDK should not have been detected, something is terribly wrong" ) ;
664
668
}
665
669
var shared = Path . Combine ( path , "shared" ) ;
666
670
var um = Path . Combine ( path , "um" ) ;
@@ -703,7 +707,7 @@ where sdk.GetId().Contains("Windows81SDK")
703
707
}
704
708
705
709
/// <summary>
706
- /// Tries to get all vs 2017 instances.
710
+ /// Tries to get all vs 2017 instances.
707
711
/// </summary>
708
712
/// <param name="versions">Collection holding available visual studio instances</param>
709
713
/// <returns>Success of the operation</returns>
0 commit comments