25 instantiations of TargetPlatformSDK
Microsoft.Build.Utilities.Core (6)
ToolLocationHelper.cs (6)
2477extensionSdk = new TargetPlatformSDK(string.Empty, new Version(0, 0), null);
2610platformSDKKey = new TargetPlatformSDK(uapRegistryName, directoryUnderRoot.Key, null);
2614platformSDKKey = new TargetPlatformSDK(rootPathWithIdentifier.Name, directoryUnderRoot.Key, null);
2629targetPlatformSDK = new TargetPlatformSDK(platformSDKKey.TargetPlatformIdentifier, platformSDKKey.TargetPlatformVersion, platformSDKManifestExists ? platformSDKDirectory : null);
2713TargetPlatformSDK platformSDKKey = new TargetPlatformSDK(platformIdentifier, registryVersions.Key, null);
2749targetPlatformSDK = new TargetPlatformSDK(platformSDKKey.TargetPlatformIdentifier, platformSDKKey.TargetPlatformVersion, platformSDKmanifestExists ? platformSDKDirectory : null);
Microsoft.Build.Utilities.UnitTests (19)
ToolLocationHelper_Tests.cs (19)
235TargetPlatformSDK sdk = new TargetPlatformSDK("Foo", new Version(0, 0), string.Empty);
260TargetPlatformSDK sdk = new TargetPlatformSDK("Foo", new Version(0, 0), string.Empty);
286TargetPlatformSDK sdk = new TargetPlatformSDK("Foo", new Version(0, 0), string.Empty);
312TargetPlatformSDK sdk = new TargetPlatformSDK("Foo", new Version(0, 0), string.Empty);
3792TargetPlatformSDK key = new TargetPlatformSDK("Windows", new Version("1.0"), null);
3800key = new TargetPlatformSDK("Windows", new Version("2.0"), null);
3809key = new TargetPlatformSDK("MyPlatform", new Version("6.0"), null);
3812key = new TargetPlatformSDK("MyPlatform", new Version("4.0"), null);
3818key = new TargetPlatformSDK("MyPlatform", new Version("3.0"), null);
3824key = new TargetPlatformSDK("MyPlatform", new Version("2.0"), null);
3830key = new TargetPlatformSDK("MyPlatform", new Version("1.0"), null);
3834key = new TargetPlatformSDK("MyPlatform", new Version("8.0"), null);
3843key = new TargetPlatformSDK("MyPlatform", new Version("9.0"), null);
4063TargetPlatformSDK key = new TargetPlatformSDK("Windows", new Version("1.0"), null);
4066key = new TargetPlatformSDK("Windows", new Version("2.0"), null);
4069key = new TargetPlatformSDK("MyPlatform", new Version("3.0"), null);
4072key = new TargetPlatformSDK("MyPlatform", new Version("2.0"), null);
4075key = new TargetPlatformSDK("MyPlatform", new Version("1.0"), null);
4078key = new TargetPlatformSDK("MyPlatform", new Version("5.0"), null);
94 references to TargetPlatformSDK
Microsoft.Build.Utilities.Core (68)
ToolLocationHelper.cs (65)
233private static Dictionary<string, IEnumerable<TargetPlatformSDK>> s_cachedTargetPlatforms;
238private static Dictionary<string, TargetPlatformSDK> s_cachedExtensionSdks;
400IEnumerable<TargetPlatformSDK> targetPlatformMonikers = GetTargetPlatformMonikers(diskRoots, extensionDiskRoots, registryRoot, targetPlatformIdentifier, targetPlatformVersion);
401foreach (TargetPlatformSDK moniker in targetPlatformMonikers)
446IEnumerable<TargetPlatformSDK> targetPlatformMonikers = GetTargetPlatformMonikers(diskRoots, multiPlatformDiskRoots, registryRoot, targetPlatformIdentifier, targetPlatformVersion);
448foreach (TargetPlatformSDK moniker in targetPlatformMonikers)
461private static IEnumerable<TargetPlatformSDK> GetTargetPlatformMonikers(string[] diskRoots, string[] extensionDiskRoots, string registryRoot, string targetPlatformIdentifier, Version targetPlatformVersion)
469IEnumerable<TargetPlatformSDK> targetPlatformSDKs = RetrieveTargetPlatformList(diskRoots, extensionDiskRoots, registryRoot);
472.Where<TargetPlatformSDK>(platformSDK =>
478.OrderBy<TargetPlatformSDK, Version>(platform => platform.TargetPlatformVersion);
525IEnumerable<TargetPlatformSDK> targetPlatforms = RetrieveTargetPlatformList(diskRoots, extensionDiskRoots, registryRoot);
526var targetPlatformMoniker = targetPlatforms.Where<TargetPlatformSDK>(
534.OrderByDescending<TargetPlatformSDK, Version>(platform => platform.TargetPlatformVersion)
535.DefaultIfEmpty(null).FirstOrDefault<TargetPlatformSDK>();
761public static IList<TargetPlatformSDK> GetTargetPlatformSdks() => GetTargetPlatformSdks(null, null);
769public static IList<TargetPlatformSDK> GetTargetPlatformSdks(string[] diskRoots, string registryRoot)
771IEnumerable<TargetPlatformSDK> targetPlatforms = RetrieveTargetPlatformList(diskRoots, null, registryRoot);
772return targetPlatforms.Where<TargetPlatformSDK>(platform => platform.Path != null).ToList<TargetPlatformSDK>();
782public static IList<TargetPlatformSDK> FilterTargetPlatformSdks(IList<TargetPlatformSDK> targetPlatformSdkList, Version osVersion, Version vsVersion)
784var filteredTargetPlatformSdkList = new List<TargetPlatformSDK>();
786foreach (TargetPlatformSDK targetPlatformSdk in targetPlatformSdkList)
963TargetPlatformSDK matchingSdk = GetMatchingPlatformSDK(targetSdkIdentifier, targetSdkVersion, diskRoots, extensionDiskRoots, registryRoot);
1004private static string GetPlatformVersion(TargetPlatformSDK targetSdk, string targetPlatformIdentifier, string targetPlatformVersion)
1006string platformKey = TargetPlatformSDK.GetSdkKey(targetPlatformIdentifier, targetPlatformVersion);
1086TargetPlatformSDK matchingSdk = GetMatchingPlatformSDK(targetPlatformIdentifier, targetPlatformVersion, diskRoots, null, registryRoot);
1087string platformKey = TargetPlatformSDK.GetSdkKey(targetPlatformIdentifier, targetPlatformVersion);
1149private static bool TryGetPlatformManifest(TargetPlatformSDK matchingSdk, string platformKey, out PlatformManifest manifest)
1227TargetPlatformSDK matchingSdk = GetMatchingPlatformSDK(targetPlatformIdentifier, targetPlatformVersion, diskRoot, null, null);
1228string platformKey = TargetPlatformSDK.GetSdkKey(targetPlatformIdentifier, targetPlatformVersion);
1260var targetPlatform = GetMatchingPlatformSDK(targetPlatformIdentifier, targetPlatformVersion, diskRoots, null, registryRoot);
1312TargetPlatformSDK targetPlatform = GetMatchingPlatformSDK(targetPlatformIdentifier, targetPlatformVersion, diskRoots, null, registryRoot);
1337IEnumerable<TargetPlatformSDK> targetPlatformSDKs = RetrieveTargetPlatformList(diskRoots, null, registryRoot);
1340foreach (TargetPlatformSDK sdk in targetPlatformSDKs)
1555private static TargetPlatformSDK GetMatchingPlatformSDK(string targetPlatformIdentifier, string targetPlatformVersion, string diskRoots, string multiPlatformDiskRoots, string registryRoot)
1583private static TargetPlatformSDK GetMatchingPlatformSDK(string targetPlatformIdentifier, Version targetPlatformVersion, string[] diskRoots, string[] multiPlatformDiskRoots, string registryRoot)
1588IEnumerable<TargetPlatformSDK> targetPlatforms = RetrieveTargetPlatformList(diskRoots, multiPlatformDiskRoots, registryRoot);
1590TargetPlatformSDK matchingSdk = targetPlatforms
1591.FirstOrDefault<TargetPlatformSDK>(platform =>
1601matchingSdk = targetPlatforms.FirstOrDefault<TargetPlatformSDK>(platform => platform.ContainsPlatform(targetPlatformIdentifier, versionString));
2432private static IEnumerable<TargetPlatformSDK> RetrieveTargetPlatformList(string[] diskRoots, string[] extensionDiskRoots, string registrySearchLocation)
2450s_cachedTargetPlatforms = new Dictionary<string, IEnumerable<TargetPlatformSDK>>(StringComparer.OrdinalIgnoreCase);
2455s_cachedExtensionSdks = new Dictionary<string, TargetPlatformSDK>(StringComparer.OrdinalIgnoreCase);
2458if (!s_cachedTargetPlatforms.TryGetValue(cachedTargetPlatformsKey, out IEnumerable<TargetPlatformSDK> collection))
2460var monikers = new Dictionary<TargetPlatformSDK, TargetPlatformSDK>();
2474if (!s_cachedExtensionSdks.TryGetValue(cachedExtensionSdksKey, out TargetPlatformSDK extensionSdk))
2492private static void GatherExtensionSDKListFromDirectory(IEnumerable<string> diskRoots, TargetPlatformSDK extensionSdk)
2519internal static void GatherExtensionSDKs(DirectoryInfo extensionSdksDirectory, TargetPlatformSDK targetPlatformSDK)
2541string SDKKey = TargetPlatformSDK.GetSdkKey(sdkNameFolders.Name, sdkVersionDirectory.Name);
2573internal static void GatherSDKListFromDirectory(List<string> diskroots, Dictionary<TargetPlatformSDK, TargetPlatformSDK> platformSDKs)
2607TargetPlatformSDK platformSDKKey;
2616TargetPlatformSDK targetPlatformSDK = null;
2667internal static void GatherSDKsFromRegistryImpl(Dictionary<TargetPlatformSDK, TargetPlatformSDK> platformMonikers, string registryKeyRoot, RegistryView registryView, RegistryHive registryHive, GetRegistrySubKeyNames getRegistrySubKeyNames, GetRegistrySubKeyDefaultValue getRegistrySubKeyDefaultValue, OpenBaseKey openBaseKey, FileExists fileExists)
2713TargetPlatformSDK platformSDKKey = new TargetPlatformSDK(platformIdentifier, registryVersions.Key, null);
2714TargetPlatformSDK targetPlatformSDK = null;
2809string sdkKey = TargetPlatformSDK.GetSdkKey(sdkName, sdkVersion);
2858private static void GatherSDKListFromRegistry(string registryRoot, Dictionary<TargetPlatformSDK, TargetPlatformSDK> platformMonikers)
3016private static void GatherPlatformsForSdk(TargetPlatformSDK sdk)
3043string sdkKey = TargetPlatformSDK.GetSdkKey(platformIdentifier.Name, platformVersion.Name);
Microsoft.Build.Utilities.UnitTests (26)
ToolLocationHelper_Tests.cs (26)
235TargetPlatformSDK sdk = new TargetPlatformSDK("Foo", new Version(0, 0), string.Empty);
260TargetPlatformSDK sdk = new TargetPlatformSDK("Foo", new Version(0, 0), string.Empty);
286TargetPlatformSDK sdk = new TargetPlatformSDK("Foo", new Version(0, 0), string.Empty);
312TargetPlatformSDK sdk = new TargetPlatformSDK("Foo", new Version(0, 0), string.Empty);
3080var targetPlatform = new Dictionary<TargetPlatformSDK, TargetPlatformSDK>();
3092var targetPlatform = new Dictionary<TargetPlatformSDK, TargetPlatformSDK>();
3107var targetPlatform = new Dictionary<TargetPlatformSDK, TargetPlatformSDK>();
3481IList<TargetPlatformSDK> sdkList = ToolLocationHelper.GetTargetPlatformSdks(new[] { _fakeStructureRoot }, null);
3482IList<TargetPlatformSDK> filteredSdkList = ToolLocationHelper.FilterTargetPlatformSdks(sdkList, new Version(6, 2, 5), new Version(12, 0));
3483IList<TargetPlatformSDK> filteredSdkList1 = ToolLocationHelper.FilterTargetPlatformSdks(sdkList, new Version(6, 2, 1), new Version(10, 0));
3484IList<TargetPlatformSDK> filteredSdkList2 = ToolLocationHelper.FilterTargetPlatformSdks(sdkList, new Version(6, 2, 3), new Version(10, 0));
3485IList<TargetPlatformSDK> filteredSdkList3 = ToolLocationHelper.FilterTargetPlatformSdks(sdkList, new Version(6, 2, 3), new Version(11, 0));
3488IList<TargetPlatformSDK> filteredSdkList4 = ToolLocationHelper.FilterTargetPlatformSdks(sdkList, new Version(6, 2, 3), null);
3491IList<TargetPlatformSDK> filteredSdkList5 = ToolLocationHelper.FilterTargetPlatformSdks(sdkList, null, new Version(10, 0));
3494IList<TargetPlatformSDK> filteredSdkList6 = ToolLocationHelper.FilterTargetPlatformSdks(sdkList, null, null);
3788var targetPlatforms = new Dictionary<TargetPlatformSDK, TargetPlatformSDK>();
3792TargetPlatformSDK key = new TargetPlatformSDK("Windows", new Version("1.0"), null);
4055IList<TargetPlatformSDK> sdks = ToolLocationHelper.GetTargetPlatformSdks(new[] { _fakeStructureRoot }, null);
4057var targetPlatforms = new Dictionary<TargetPlatformSDK, TargetPlatformSDK>();
4058foreach (TargetPlatformSDK sdk in sdks)
4063TargetPlatformSDK key = new TargetPlatformSDK("Windows", new Version("1.0"), null);