382 references to ToolLocationHelper
Microsoft.Build.Engine.OM.UnitTests (9)
Definition\Project_Tests.cs (5)
26
using ToolLocationHelper = Microsoft.Build.Utilities.
ToolLocationHelper
;
1061
if (
ToolLocationHelper
.GetPathToDotNetFramework(TargetDotNetFrameworkVersion.Version35) == null)
1112
if (
ToolLocationHelper
.GetPathToDotNetFramework(TargetDotNetFrameworkVersion.Version20) == null)
1141
if (
ToolLocationHelper
.GetPathToDotNetFramework(TargetDotNetFrameworkVersion.Version20) != null)
1165
if (
ToolLocationHelper
.GetPathToDotNetFramework(TargetDotNetFrameworkVersion.Version20) == null)
Definition\ProjectCollection_Tests.cs (4)
496
if (
ToolLocationHelper
.GetPathToDotNetFramework(TargetDotNetFrameworkVersion.Version35) == null)
502
if (
ToolLocationHelper
.GetPathToDotNetFramework(TargetDotNetFrameworkVersion.Version20) == null)
1085
if (
ToolLocationHelper
.GetPathToDotNetFramework(TargetDotNetFrameworkVersion.Version20) == null)
1105
if (
ToolLocationHelper
.GetPathToDotNetFramework(TargetDotNetFrameworkVersion.Version20) != null)
Microsoft.Build.Engine.UnitTests (4)
BackEnd\BuildManager_Tests.cs (1)
858
string netFrameworkDirectory =
ToolLocationHelper
.GetPathToDotNetFrameworkReferenceAssemblies(TargetDotNetFrameworkVersion.Version45);
BackEnd\CustomTaskHelper.cs (2)
27
string referenceAssembliesPath =
ToolLocationHelper
.GetPathToBuildTools(
ToolLocationHelper
.CurrentToolsVersion);
Evaluation\Expander_Tests.cs (1)
1995
if (
ToolLocationHelper
.GetPathToDotNetFrameworkReferenceAssemblies(TargetDotNetFrameworkVersion.Version48) == null)
Microsoft.Build.Tasks.CodeAnalysis (1)
src\Compilers\Core\MSBuildTask\ManagedCompiler.cs (1)
1265
string pathToDefaultManifest =
ToolLocationHelper
.GetPathToDotNetFrameworkFile
Microsoft.Build.Tasks.CodeAnalysis.Sdk (1)
src\Compilers\Core\MSBuildTask\ManagedCompiler.cs (1)
1265
string pathToDefaultManifest =
ToolLocationHelper
.GetPathToDotNetFrameworkFile
Microsoft.Build.Tasks.Core (41)
AddToWin32Manifest.cs (1)
102
string? defaultManifestPath =
ToolLocationHelper
.GetPathToDotNetFrameworkFile(DefaultManifestName, TargetDotNetFrameworkVersion.Version46);
AssemblyDependency\ReferenceTable.cs (3)
2097
string targetFrameworkRootDirectory =
ToolLocationHelper
.GetProgramFilesReferenceAssemblyRoot();
2099
highestVersionMoniker =
ToolLocationHelper
.HighestVersionOfTargetFrameworkIdentifier(targetFrameworkRootDirectory, targetFrameworkMoniker.Identifier);
2106
referenceAssemblyDirectories =
ToolLocationHelper
.GetPathToReferenceAssemblies(targetFrameworkRootDirectory, highestVersionMoniker);
Exec.cs (2)
503
var systemCmd =
ToolLocationHelper
.GetPathToSystemFile("cmd.exe");
546
return
ToolLocationHelper
.PathToSystem;
GetFrameworkPath.cs (16)
36
private static readonly Lazy<string> s_path = new Lazy<string>(() =>
ToolLocationHelper
.GetPathToDotNetFramework(TargetDotNetFrameworkVersion.Latest));
37
private static readonly Lazy<string> s_version11Path = new Lazy<string>(() =>
ToolLocationHelper
.GetPathToDotNetFramework(TargetDotNetFrameworkVersion.Version11));
38
private static readonly Lazy<string> s_version20Path = new Lazy<string>(() =>
ToolLocationHelper
.GetPathToDotNetFramework(TargetDotNetFrameworkVersion.Version20));
39
private static readonly Lazy<string> s_version30Path = new Lazy<string>(() =>
ToolLocationHelper
.GetPathToDotNetFramework(TargetDotNetFrameworkVersion.Version30));
40
private static readonly Lazy<string> s_version35Path = new Lazy<string>(() =>
ToolLocationHelper
.GetPathToDotNetFramework(TargetDotNetFrameworkVersion.Version35));
41
private static readonly Lazy<string> s_version40Path = new Lazy<string>(() =>
ToolLocationHelper
.GetPathToDotNetFramework(TargetDotNetFrameworkVersion.Version40));
42
private static readonly Lazy<string> s_version45Path = new Lazy<string>(() =>
ToolLocationHelper
.GetPathToDotNetFramework(TargetDotNetFrameworkVersion.Version45));
43
private static readonly Lazy<string> s_version451Path = new Lazy<string>(() =>
ToolLocationHelper
.GetPathToDotNetFramework(TargetDotNetFrameworkVersion.Version451));
44
private static readonly Lazy<string> s_version452Path = new Lazy<string>(() =>
ToolLocationHelper
.GetPathToDotNetFramework(TargetDotNetFrameworkVersion.Version452));
45
private static readonly Lazy<string> s_version46Path = new Lazy<string>(() =>
ToolLocationHelper
.GetPathToDotNetFramework(TargetDotNetFrameworkVersion.Version46));
46
private static readonly Lazy<string> s_version461Path = new Lazy<string>(() =>
ToolLocationHelper
.GetPathToDotNetFramework(TargetDotNetFrameworkVersion.Version461));
47
private static readonly Lazy<string> s_version462Path = new Lazy<string>(() =>
ToolLocationHelper
.GetPathToDotNetFramework(TargetDotNetFrameworkVersion.Version462));
48
private static readonly Lazy<string> s_version47Path = new Lazy<string>(() =>
ToolLocationHelper
.GetPathToDotNetFramework(TargetDotNetFrameworkVersion.Version47));
49
private static readonly Lazy<string> s_version471Path = new Lazy<string>(() =>
ToolLocationHelper
.GetPathToDotNetFramework(TargetDotNetFrameworkVersion.Version471));
50
private static readonly Lazy<string> s_version472Path = new Lazy<string>(() =>
ToolLocationHelper
.GetPathToDotNetFramework(TargetDotNetFrameworkVersion.Version472));
51
private static readonly Lazy<string> s_version48Path = new Lazy<string>(() =>
ToolLocationHelper
.GetPathToDotNetFramework(TargetDotNetFrameworkVersion.Version48));
GetInstalledSDKLocations.cs (2)
148
installedSDKs =
ToolLocationHelper
.GetPlatformExtensionSDKLocationsAndVersions(SDKDirectoryRoots, SDKExtensionDirectoryRoots, SDKRegistryRoot, TargetPlatformIdentifier, platformVersion);
198
BuildCacheDisposeWrapper staticDisposer = new BuildCacheDisposeWrapper(
ToolLocationHelper
.ClearSDKStaticCache);
GetReferenceAssemblyPaths.cs (2)
202
TargetFrameworkMonikerDisplayName =
ToolLocationHelper
.GetDisplayNameForTargetFrameworkDirectory(_tfmPaths[0], moniker);
241
IList<String> pathsToReturn =
ToolLocationHelper
.GetPathToReferenceAssemblies(
GetSDKReferenceFiles.cs (3)
309
redistPaths =
ToolLocationHelper
.GetSDKRedistFolders(resolvedSDKReference.ItemSpec, targetedConfiguration, targetedArchitecture);
384
IList<string> referencePaths =
ToolLocationHelper
.GetSDKReferenceFolders(resolvedSDKReference.ItemSpec, targetedConfiguration, targetedArchitecture);
702
manifestReferencePaths =
ToolLocationHelper
.GetPlatformOrFrameworkExtensionSdkReferences(
ManifestUtil\AssemblyIdentity.cs (2)
404
foreach (string moniker in
ToolLocationHelper
.GetSupportedTargetFrameworks())
410
IList<string> paths =
ToolLocationHelper
.GetPathToReferenceAssemblies(frameworkName);
ManifestUtil\DeployManifest.cs (1)
190
targetFrameworkPaths =
ToolLocationHelper
.GetPathToReferenceAssemblies(targetFrameworkMoniker);
ManifestUtil\SecurityUtil.cs (3)
855
string toolPath =
ToolLocationHelper
.GetPathToWindowsSdkFile(ToolName, TargetDotNetFrameworkVersion.VersionLatest, VisualStudioVersion.VersionLatest);
858
toolPath =
ToolLocationHelper
.GetPathToWindowsSdkFile(ToolName, TargetDotNetFrameworkVersion.Version45,
863
var pathToDotNetFrameworkSdk =
ToolLocationHelper
.GetPathToDotNetFrameworkSdk(TargetDotNetFrameworkVersion.Version40, VisualStudioVersion.Version100);
RedistList.cs (2)
218
string frameworkVersion20Path =
ToolLocationHelper
.GetPathToDotNetFramework(TargetDotNetFrameworkVersion.Version20);
272
string referenceAssembliesPath =
ToolLocationHelper
.GetPathToDotNetFrameworkReferenceAssemblies(version);
RoslynCodeTaskFactory\RoslynCodeTaskFactoryCompilers.cs (2)
31
string pathToBuildTools =
ToolLocationHelper
.GetPathToBuildTools(
ToolLocationHelper
.CurrentToolsVersion, DotNetFrameworkArchitecture.Bitness32);
SdkToolsPathUtility.cs (2)
121
log.LogErrorWithCodeFromResources("General.SdkToolsPathToolDoesNotExist", toolName, sdkToolsPath,
ToolLocationHelper
.GetDotNetFrameworkSdkRootRegistryKey(TargetDotNetFrameworkVersion.Latest, VisualStudioVersion.VersionLatest));
137
string pathToTool =
ToolLocationHelper
.GetPathToDotNetFrameworkSdkFile(toolName, TargetDotNetFrameworkVersion.Latest, VisualStudioVersion.VersionLatest);
Microsoft.Build.Tasks.UnitTests (6)
GetSDKReference_Tests.cs (6)
255
var getReferenceFolders = new GetSDKFolders(
ToolLocationHelper
.GetSDKReferenceFolders);
256
var getReferenceFolders2 = new GetSDKFolders2(
ToolLocationHelper
.GetSDKReferenceFolders);
322
var getRedistFolders = new GetSDKFolders(
ToolLocationHelper
.GetSDKRedistFolders);
323
var getRedistFolders2 = new GetSDKFolders2(
ToolLocationHelper
.GetSDKRedistFolders);
334
var getDesignTimeFolders = new GetSDKFolders(
ToolLocationHelper
.GetSDKDesignTimeFolders);
335
var getDesignTimeFolders2 = new GetSDKFolders2(
ToolLocationHelper
.GetSDKDesignTimeFolders);
Microsoft.Build.Utilities.Core (2)
TrackedDependencies\FileTracker.cs (2)
570
var path =
ToolLocationHelper
.GetPathToBuildToolsFile(filename,
ToolLocationHelper
.CurrentToolsVersion, bitness);
Microsoft.Build.Utilities.UnitTests (318)
ProcessorArchitecture_Tests.cs (10)
65
procArchitecture =
ToolLocationHelper
.ConvertDotNetFrameworkArchitectureToProcessorArchitecture(Utilities.DotNetFrameworkArchitecture.Bitness32);
68
procArchitecture =
ToolLocationHelper
.ConvertDotNetFrameworkArchitectureToProcessorArchitecture(Utilities.DotNetFrameworkArchitecture.Bitness64);
73
procArchitecture =
ToolLocationHelper
.ConvertDotNetFrameworkArchitectureToProcessorArchitecture(Utilities.DotNetFrameworkArchitecture.Bitness64);
76
procArchitecture =
ToolLocationHelper
.ConvertDotNetFrameworkArchitectureToProcessorArchitecture(Utilities.DotNetFrameworkArchitecture.Bitness32);
81
procArchitecture =
ToolLocationHelper
.ConvertDotNetFrameworkArchitectureToProcessorArchitecture(Utilities.DotNetFrameworkArchitecture.Bitness32);
84
procArchitecture =
ToolLocationHelper
.ConvertDotNetFrameworkArchitectureToProcessorArchitecture(Utilities.DotNetFrameworkArchitecture.Bitness64);
93
procArchitecture =
ToolLocationHelper
.ConvertDotNetFrameworkArchitectureToProcessorArchitecture(Utilities.DotNetFrameworkArchitecture.Bitness64);
96
procArchitecture =
ToolLocationHelper
.ConvertDotNetFrameworkArchitectureToProcessorArchitecture(Utilities.DotNetFrameworkArchitecture.Bitness32);
101
procArchitecture =
ToolLocationHelper
.ConvertDotNetFrameworkArchitectureToProcessorArchitecture(Utilities.DotNetFrameworkArchitecture.Bitness64);
104
procArchitecture =
ToolLocationHelper
.ConvertDotNetFrameworkArchitectureToProcessorArchitecture(Utilities.DotNetFrameworkArchitecture.Bitness32);
ToolLocationHelper_Tests.cs (308)
41
ToolLocationHelper
.ClearStaticCaches();
47
string[] returnValue =
ToolLocationHelper
.GetApiContractReferences(Enumerable.Empty<ApiContract>(), string.Empty);
54
string[] returnValue =
ToolLocationHelper
.GetApiContractReferences(null, string.Empty);
64
string[] returnValue =
ToolLocationHelper
.GetApiContractReferences(new[] { new ApiContract { Name = "Foo", Version = "Bar" } }, tempDirectory);
80
string[] returnValue =
ToolLocationHelper
.GetApiContractReferences(new[] { new ApiContract { Name = "Foo", Version = "Bar" } }, tempDirectory);
103
string[] returnValue =
ToolLocationHelper
.GetApiContractReferences(new[] { new ApiContract { Name = "Foo", Version = "Bar" } }, tempDirectory, tempVersion);
118
string sdkRootPath =
ToolLocationHelper
.GetPlatformSDKLocation("Windows", "8.1");
120
string returnValue =
ToolLocationHelper
.GetSDKContentFolderPath("Windows", "8.1", null, null, null, null);
127
string sdkRootPath =
ToolLocationHelper
.GetPlatformSDKLocation("Windows", "8.1");
129
string returnValue =
ToolLocationHelper
.GetSDKContentFolderPath("Windows", "8.1", null, null, null, @"DesignTime\CommonConfiguration\Neutral");
136
string expectedValue =
ToolLocationHelper
.GetPlatformSDKLocation("Windows", "10.0");
138
string versionedSDKValue =
ToolLocationHelper
.GetSDKContentFolderPath("Windows", "10.0", "UAP", "10.0.14944.0", "10.0.14944.0", null);
141
string unversionedSDKValue =
ToolLocationHelper
.GetSDKContentFolderPath("Windows", "10.0", "UAP", "10.0.10586.0", "10.0.10586.0", null);
152
string sdkRootPath =
ToolLocationHelper
.GetPlatformSDKLocation("Windows", "10.0");
153
string returnValue =
ToolLocationHelper
.GetSDKContentFolderPath("Windows", "10.0", "UAP", "10.0.14393.0", "10.0.14393.0", "UnionMetadata");
207
string returnValue =
ToolLocationHelper
.GetSDKContentFolderPath("Windows", "10.0", "UAP", "10.0.14944.0", "10.0.14944.0", "UnionMetadata", platformRootFolder);
232
ToolLocationHelper
.GatherExtensionSDKs(info, sdk);
257
ToolLocationHelper
.GatherExtensionSDKs(info, sdk);
283
ToolLocationHelper
.GatherExtensionSDKs(info, sdk);
309
ToolLocationHelper
.GatherExtensionSDKs(info, sdk);
351
string foundToolPath =
ToolLocationHelper
.GetPathToDotNetFrameworkSdkFile("MyTool.exe", temp35Directory, "x86");
371
ToolLocationHelper
.GetFrameworkIdentifiers(
383
ToolLocationHelper
.HighestVersionOfTargetFrameworkIdentifier(
404
FrameworkNameVersioning highestMoniker =
ToolLocationHelper
.HighestVersionOfTargetFrameworkIdentifier(testPath, ".UnKNownFramework");
436
ToolLocationHelper
.HighestVersionOfTargetFrameworkIdentifier(testPath, ".UnknownFramework");
470
string foundToolPath =
ToolLocationHelper
.GetPathToDotNetFrameworkSdkFile("MyTool.exe", temp40Directory, "x86");
489
string foundToolPath =
ToolLocationHelper
.GetPathToDotNetFrameworkSdkFile("MyTool.exe", "C:\\Path", null);
492
foundToolPath =
ToolLocationHelper
.GetPathToDotNetFrameworkSdkFile("MyTool.exe", null, "x86");
495
foundToolPath =
ToolLocationHelper
.GetPathToDotNetFrameworkSdkFile(null, "c:\\path", "x86");
509
ToolLocationHelper
.GetDotNetFrameworkVersionFolderPrefix(TargetDotNetFrameworkVersion.Version40),
620
ToolLocationHelper
.GetDotNetFrameworkVersionFolderPrefix(TargetDotNetFrameworkVersion.Version11).ShouldBe(FrameworkLocationHelper.dotNetFrameworkVersionFolderPrefixV11);
621
ToolLocationHelper
.GetDotNetFrameworkVersionFolderPrefix(TargetDotNetFrameworkVersion.Version20).ShouldBe(FrameworkLocationHelper.dotNetFrameworkVersionFolderPrefixV20);
622
ToolLocationHelper
.GetDotNetFrameworkVersionFolderPrefix(TargetDotNetFrameworkVersion.Version30).ShouldBe(FrameworkLocationHelper.dotNetFrameworkVersionFolderPrefixV30);
623
ToolLocationHelper
.GetDotNetFrameworkVersionFolderPrefix(TargetDotNetFrameworkVersion.Version35).ShouldBe(FrameworkLocationHelper.dotNetFrameworkVersionFolderPrefixV35);
624
ToolLocationHelper
.GetDotNetFrameworkVersionFolderPrefix(TargetDotNetFrameworkVersion.Version40).ShouldBe(FrameworkLocationHelper.dotNetFrameworkVersionFolderPrefixV40);
625
ToolLocationHelper
.GetDotNetFrameworkVersionFolderPrefix(TargetDotNetFrameworkVersion.VersionLatest).ShouldBe(FrameworkLocationHelper.dotNetFrameworkVersionFolderPrefixV40);
626
ToolLocationHelper
.GetDotNetFrameworkRootRegistryKey(TargetDotNetFrameworkVersion.VersionLatest).ShouldBe(FrameworkLocationHelper.fullDotNetFrameworkRegistryKey);
627
ToolLocationHelper
.GetDotNetFrameworkVersionFolderPrefix(TargetDotNetFrameworkVersion.Latest).ShouldBe(FrameworkLocationHelper.dotNetFrameworkVersionFolderPrefixV40);
628
ToolLocationHelper
.GetDotNetFrameworkRootRegistryKey(TargetDotNetFrameworkVersion.Latest).ShouldBe(FrameworkLocationHelper.fullDotNetFrameworkRegistryKey);
630
ToolLocationHelper
.GetPathToDotNetFramework(TargetDotNetFrameworkVersion.Version11).ShouldBe(FrameworkLocationHelper.PathToDotNetFrameworkV11);
631
ToolLocationHelper
.GetPathToDotNetFramework(TargetDotNetFrameworkVersion.Version20).ShouldBe(FrameworkLocationHelper.PathToDotNetFrameworkV20);
632
ToolLocationHelper
.GetPathToDotNetFramework(TargetDotNetFrameworkVersion.Version30).ShouldBe(FrameworkLocationHelper.PathToDotNetFrameworkV30);
633
ToolLocationHelper
.GetPathToDotNetFramework(TargetDotNetFrameworkVersion.Version35).ShouldBe(FrameworkLocationHelper.PathToDotNetFrameworkV35);
634
ToolLocationHelper
.GetPathToDotNetFramework(TargetDotNetFrameworkVersion.Version40).ShouldBe(FrameworkLocationHelper.PathToDotNetFrameworkV40);
635
ToolLocationHelper
.GetPathToDotNetFramework(TargetDotNetFrameworkVersion.VersionLatest).ShouldBe(FrameworkLocationHelper.PathToDotNetFrameworkV40);
636
ToolLocationHelper
.GetPathToDotNetFramework(TargetDotNetFrameworkVersion.Latest).ShouldBe(FrameworkLocationHelper.PathToDotNetFrameworkV40);
638
ToolLocationHelper
.GetPathToDotNetFramework(TargetDotNetFrameworkVersion.Version11, UtilitiesDotNetFrameworkArchitecture.Bitness32).ShouldBe(
640
ToolLocationHelper
.GetPathToDotNetFramework(TargetDotNetFrameworkVersion.Version20, UtilitiesDotNetFrameworkArchitecture.Bitness32).ShouldBe(
642
ToolLocationHelper
.GetPathToDotNetFramework(TargetDotNetFrameworkVersion.Version30, UtilitiesDotNetFrameworkArchitecture.Bitness32).ShouldBe(
644
ToolLocationHelper
.GetPathToDotNetFramework(TargetDotNetFrameworkVersion.Version35, UtilitiesDotNetFrameworkArchitecture.Bitness32).ShouldBe(
647
ToolLocationHelper
.GetPathToDotNetFramework(TargetDotNetFrameworkVersion.Version40, UtilitiesDotNetFrameworkArchitecture.Bitness32).ShouldBe(
649
ToolLocationHelper
.GetPathToDotNetFramework(TargetDotNetFrameworkVersion.VersionLatest, UtilitiesDotNetFrameworkArchitecture.Bitness32).ShouldBe(
651
ToolLocationHelper
.GetPathToDotNetFramework(TargetDotNetFrameworkVersion.Latest, UtilitiesDotNetFrameworkArchitecture.Bitness32).ShouldBe(
657
ToolLocationHelper
.GetPathToDotNetFramework(TargetDotNetFrameworkVersion.Version11, UtilitiesDotNetFrameworkArchitecture.Bitness64).ShouldBe(
659
ToolLocationHelper
.GetPathToDotNetFramework(TargetDotNetFrameworkVersion.Version20, UtilitiesDotNetFrameworkArchitecture.Bitness64).ShouldBe(
661
ToolLocationHelper
.GetPathToDotNetFramework(TargetDotNetFrameworkVersion.Version30, UtilitiesDotNetFrameworkArchitecture.Bitness64).ShouldBe(
663
ToolLocationHelper
.GetPathToDotNetFramework(TargetDotNetFrameworkVersion.Version35, UtilitiesDotNetFrameworkArchitecture.Bitness64).ShouldBe(
666
ToolLocationHelper
.GetPathToDotNetFramework(TargetDotNetFrameworkVersion.Version40, UtilitiesDotNetFrameworkArchitecture.Bitness64).ShouldBe(
668
ToolLocationHelper
.GetPathToDotNetFramework(TargetDotNetFrameworkVersion.VersionLatest, UtilitiesDotNetFrameworkArchitecture.Bitness64).ShouldBe(
670
ToolLocationHelper
.GetPathToDotNetFramework(TargetDotNetFrameworkVersion.Latest, UtilitiesDotNetFrameworkArchitecture.Bitness64).ShouldBe(
678
string net20Path =
ToolLocationHelper
.GetPathToDotNetFrameworkFile(Constants.MSBuildExecutableName, TargetDotNetFrameworkVersion.Version20);
680
net20Path?.ShouldBe(
ToolLocationHelper
.GetPathToBuildToolsFile(Constants.MSBuildExecutableName, "2.0"));
682
string net35Path =
ToolLocationHelper
.GetPathToDotNetFrameworkFile(Constants.MSBuildExecutableName, TargetDotNetFrameworkVersion.Version35);
684
net35Path?.ShouldBe(
ToolLocationHelper
.GetPathToBuildToolsFile(Constants.MSBuildExecutableName, "3.5"));
686
ToolLocationHelper
.GetPathToDotNetFrameworkFile(Constants.MSBuildExecutableName, TargetDotNetFrameworkVersion.Version40).ShouldBe(
ToolLocationHelper
.GetPathToBuildToolsFile(Constants.MSBuildExecutableName, "4.0"));
690
tv12path.ShouldBe(
ToolLocationHelper
.GetPathToBuildToolsFile(Constants.MSBuildExecutableName, ObjectModelHelpers.MSBuildDefaultToolsVersion));
691
tv12path.ShouldBe(
ToolLocationHelper
.GetPathToBuildToolsFile(Constants.MSBuildExecutableName,
ToolLocationHelper
.CurrentToolsVersion));
701
string net20Path =
ToolLocationHelper
.GetPathToDotNetFrameworkFile(Constants.MSBuildExecutableName, TargetDotNetFrameworkVersion.Version20, UtilitiesDotNetFrameworkArchitecture.Bitness32);
702
net20Path?.ShouldBe(
ToolLocationHelper
.GetPathToBuildToolsFile(Constants.MSBuildExecutableName, "2.0", UtilitiesDotNetFrameworkArchitecture.Bitness32));
704
string net35Path =
ToolLocationHelper
.GetPathToDotNetFrameworkFile(Constants.MSBuildExecutableName, TargetDotNetFrameworkVersion.Version35, UtilitiesDotNetFrameworkArchitecture.Bitness32);
705
net35Path?.ShouldBe(
ToolLocationHelper
.GetPathToBuildToolsFile(Constants.MSBuildExecutableName, "3.5", UtilitiesDotNetFrameworkArchitecture.Bitness32));
707
ToolLocationHelper
.GetPathToDotNetFrameworkFile(Constants.MSBuildExecutableName, TargetDotNetFrameworkVersion.Version40, UtilitiesDotNetFrameworkArchitecture.Bitness32).ShouldBe(
708
ToolLocationHelper
.GetPathToBuildToolsFile(Constants.MSBuildExecutableName, "4.0", UtilitiesDotNetFrameworkArchitecture.Bitness32));
713
tv12path.ShouldBe(
ToolLocationHelper
.GetPathToBuildToolsFile(Constants.MSBuildExecutableName, ObjectModelHelpers.MSBuildDefaultToolsVersion, UtilitiesDotNetFrameworkArchitecture.Bitness32));
714
tv12path.ShouldBe(
ToolLocationHelper
.GetPathToBuildToolsFile(Constants.MSBuildExecutableName,
ToolLocationHelper
.CurrentToolsVersion, UtilitiesDotNetFrameworkArchitecture.Bitness32));
723
Should.Throw<ArgumentException>(() =>
ToolLocationHelper
.GetDotNetFrameworkSdkRootRegistryKey((TargetDotNetFrameworkVersion)99, vsVersion));
729
Should.Throw<ArgumentException>(() =>
ToolLocationHelper
.GetDotNetFrameworkSdkRootRegistryKey(dotNetVersion, (VisualStudioVersion)99));
735
ToolLocationHelper
.GetDotNetFrameworkSdkRootRegistryKey(TargetDotNetFrameworkVersion.Version11, vsVersion).ShouldBe(FrameworkLocationHelper.fullDotNetFrameworkRegistryKey);
738
ToolLocationHelper
.GetDotNetFrameworkSdkRootRegistryKey(TargetDotNetFrameworkVersion.Version20, vsVersion).ShouldBe(FrameworkLocationHelper.fullDotNetFrameworkRegistryKey);
741
Should.Throw<ArgumentException>(() =>
ToolLocationHelper
.GetDotNetFrameworkSdkRootRegistryKey(TargetDotNetFrameworkVersion.Version30, vsVersion));
744
ToolLocationHelper
.GetDotNetFrameworkSdkRootRegistryKey(TargetDotNetFrameworkVersion.Version35, vsVersion).ShouldBe(
761
ToolLocationHelper
.GetDotNetFrameworkSdkRootRegistryKey(TargetDotNetFrameworkVersion.Version40, VisualStudioVersion.Version100).ShouldBe(fullDotNetFrameworkSdkRegistryPathForV4ToolsOnManagedToolsSDK70A);
762
ToolLocationHelper
.GetDotNetFrameworkSdkRootRegistryKey(TargetDotNetFrameworkVersion.Version40, VisualStudioVersion.Version110).ShouldBe(fullDotNetFrameworkSdkRegistryPathForV4ToolsOnManagedToolsSDK80A);
763
ToolLocationHelper
.GetDotNetFrameworkSdkRootRegistryKey(TargetDotNetFrameworkVersion.Version40, VisualStudioVersion.Version120).ShouldBe(fullDotNetFrameworkSdkRegistryPathForV4ToolsOnManagedToolsSDK81A);
764
ToolLocationHelper
.GetDotNetFrameworkSdkRootRegistryKey(TargetDotNetFrameworkVersion.Version40, VisualStudioVersion.Version140).ShouldBe(fullDotNetFrameworkSdkRegistryPathForV4ToolsOnManagedToolsSDK46);
767
ToolLocationHelper
.GetDotNetFrameworkSdkRootRegistryKey(TargetDotNetFrameworkVersion.Version45, VisualStudioVersion.Version100).ShouldBe(fullDotNetFrameworkSdkRegistryPathForV4ToolsOnManagedToolsSDK80A);
768
ToolLocationHelper
.GetDotNetFrameworkSdkRootRegistryKey(TargetDotNetFrameworkVersion.Version45, VisualStudioVersion.Version110).ShouldBe(fullDotNetFrameworkSdkRegistryPathForV4ToolsOnManagedToolsSDK80A);
769
ToolLocationHelper
.GetDotNetFrameworkSdkRootRegistryKey(TargetDotNetFrameworkVersion.Version45, VisualStudioVersion.Version120).ShouldBe(fullDotNetFrameworkSdkRegistryPathForV4ToolsOnManagedToolsSDK81A);
770
ToolLocationHelper
.GetDotNetFrameworkSdkRootRegistryKey(TargetDotNetFrameworkVersion.Version45, VisualStudioVersion.Version140).ShouldBe(fullDotNetFrameworkSdkRegistryPathForV4ToolsOnManagedToolsSDK46);
773
Should.Throw<ArgumentException>(() =>
ToolLocationHelper
.GetDotNetFrameworkSdkRootRegistryKey(TargetDotNetFrameworkVersion.Version451, VisualStudioVersion.Version100));
774
Should.Throw<ArgumentException>(() =>
ToolLocationHelper
.GetDotNetFrameworkSdkRootRegistryKey(TargetDotNetFrameworkVersion.Version451, VisualStudioVersion.Version110));
775
ToolLocationHelper
.GetDotNetFrameworkSdkRootRegistryKey(TargetDotNetFrameworkVersion.Version451, VisualStudioVersion.Version120).ShouldBe(fullDotNetFrameworkSdkRegistryPathForV4ToolsOnManagedToolsSDK81A);
776
ToolLocationHelper
.GetDotNetFrameworkSdkRootRegistryKey(TargetDotNetFrameworkVersion.Version451, VisualStudioVersion.Version140).ShouldBe(fullDotNetFrameworkSdkRegistryPathForV4ToolsOnManagedToolsSDK46);
779
Should.Throw<ArgumentException>(() =>
ToolLocationHelper
.GetDotNetFrameworkSdkRootRegistryKey(TargetDotNetFrameworkVersion.Version452, VisualStudioVersion.Version100));
780
Should.Throw<ArgumentException>(() =>
ToolLocationHelper
.GetDotNetFrameworkSdkRootRegistryKey(TargetDotNetFrameworkVersion.Version452, VisualStudioVersion.Version110));
781
ToolLocationHelper
.GetDotNetFrameworkSdkRootRegistryKey(TargetDotNetFrameworkVersion.Version452, VisualStudioVersion.Version120).ShouldBe(fullDotNetFrameworkSdkRegistryPathForV4ToolsOnManagedToolsSDK81A);
782
ToolLocationHelper
.GetDotNetFrameworkSdkRootRegistryKey(TargetDotNetFrameworkVersion.Version452, VisualStudioVersion.Version140).ShouldBe(fullDotNetFrameworkSdkRegistryPathForV4ToolsOnManagedToolsSDK46);
785
Should.Throw<ArgumentException>(() =>
ToolLocationHelper
.GetDotNetFrameworkSdkRootRegistryKey(TargetDotNetFrameworkVersion.Version46, VisualStudioVersion.Version100));
786
Should.Throw<ArgumentException>(() =>
ToolLocationHelper
.GetDotNetFrameworkSdkRootRegistryKey(TargetDotNetFrameworkVersion.Version46, VisualStudioVersion.Version110));
787
Should.Throw<ArgumentException>(() =>
ToolLocationHelper
.GetDotNetFrameworkSdkRootRegistryKey(TargetDotNetFrameworkVersion.Version46, VisualStudioVersion.Version120));
788
ToolLocationHelper
.GetDotNetFrameworkSdkRootRegistryKey(TargetDotNetFrameworkVersion.Version46, VisualStudioVersion.Version140).ShouldBe(fullDotNetFrameworkSdkRegistryPathForV4ToolsOnManagedToolsSDK46);
791
Should.Throw<ArgumentException>(() =>
ToolLocationHelper
.GetDotNetFrameworkSdkRootRegistryKey(TargetDotNetFrameworkVersion.Version461, VisualStudioVersion.Version100));
792
Should.Throw<ArgumentException>(() =>
ToolLocationHelper
.GetDotNetFrameworkSdkRootRegistryKey(TargetDotNetFrameworkVersion.Version461, VisualStudioVersion.Version110));
793
Should.Throw<ArgumentException>(() =>
ToolLocationHelper
.GetDotNetFrameworkSdkRootRegistryKey(TargetDotNetFrameworkVersion.Version461, VisualStudioVersion.Version120));
794
ToolLocationHelper
.GetDotNetFrameworkSdkRootRegistryKey(TargetDotNetFrameworkVersion.Version461, VisualStudioVersion.Version140).ShouldBe(fullDotNetFrameworkSdkRegistryPathForV4ToolsOnManagedToolsSDK461);
797
Should.Throw<ArgumentException>(() =>
ToolLocationHelper
.GetDotNetFrameworkSdkRootRegistryKey(TargetDotNetFrameworkVersion.Version462, VisualStudioVersion.Version100));
798
Should.Throw<ArgumentException>(() =>
ToolLocationHelper
.GetDotNetFrameworkSdkRootRegistryKey(TargetDotNetFrameworkVersion.Version462, VisualStudioVersion.Version110));
799
Should.Throw<ArgumentException>(() =>
ToolLocationHelper
.GetDotNetFrameworkSdkRootRegistryKey(TargetDotNetFrameworkVersion.Version462, VisualStudioVersion.Version120));
800
ToolLocationHelper
.GetDotNetFrameworkSdkRootRegistryKey(TargetDotNetFrameworkVersion.Version462, VisualStudioVersion.Version150).ShouldBe(fullDotNetFrameworkSdkRegistryPathForV4ToolsOnManagedToolsSDK462);
803
Should.Throw<ArgumentException>(() =>
ToolLocationHelper
.GetDotNetFrameworkSdkRootRegistryKey(TargetDotNetFrameworkVersion.Version47, VisualStudioVersion.Version100));
804
Should.Throw<ArgumentException>(() =>
ToolLocationHelper
.GetDotNetFrameworkSdkRootRegistryKey(TargetDotNetFrameworkVersion.Version47, VisualStudioVersion.Version110));
805
Should.Throw<ArgumentException>(() =>
ToolLocationHelper
.GetDotNetFrameworkSdkRootRegistryKey(TargetDotNetFrameworkVersion.Version47, VisualStudioVersion.Version120));
806
ToolLocationHelper
.GetDotNetFrameworkSdkRootRegistryKey(TargetDotNetFrameworkVersion.Version47, VisualStudioVersion.Version150).ShouldBe(fullDotNetFrameworkSdkRegistryPathForV4ToolsOnManagedToolsSDK47);
809
Should.Throw<ArgumentException>(() =>
ToolLocationHelper
.GetDotNetFrameworkSdkRootRegistryKey(TargetDotNetFrameworkVersion.Version471, VisualStudioVersion.Version100));
810
Should.Throw<ArgumentException>(() =>
ToolLocationHelper
.GetDotNetFrameworkSdkRootRegistryKey(TargetDotNetFrameworkVersion.Version471, VisualStudioVersion.Version110));
811
Should.Throw<ArgumentException>(() =>
ToolLocationHelper
.GetDotNetFrameworkSdkRootRegistryKey(TargetDotNetFrameworkVersion.Version471, VisualStudioVersion.Version120));
812
ToolLocationHelper
.GetDotNetFrameworkSdkRootRegistryKey(TargetDotNetFrameworkVersion.Version471, VisualStudioVersion.Version150).ShouldBe(fullDotNetFrameworkSdkRegistryPathForV4ToolsOnManagedToolsSDK471);
815
Should.Throw<ArgumentException>(() =>
ToolLocationHelper
.GetDotNetFrameworkSdkRootRegistryKey(TargetDotNetFrameworkVersion.Version472, VisualStudioVersion.Version100));
816
Should.Throw<ArgumentException>(() =>
ToolLocationHelper
.GetDotNetFrameworkSdkRootRegistryKey(TargetDotNetFrameworkVersion.Version472, VisualStudioVersion.Version110));
817
Should.Throw<ArgumentException>(() =>
ToolLocationHelper
.GetDotNetFrameworkSdkRootRegistryKey(TargetDotNetFrameworkVersion.Version472, VisualStudioVersion.Version120));
818
ToolLocationHelper
.GetDotNetFrameworkSdkRootRegistryKey(TargetDotNetFrameworkVersion.Version472, VisualStudioVersion.Version150).ShouldBe(fullDotNetFrameworkSdkRegistryPathForV4ToolsOnManagedToolsSDK472);
821
Should.Throw<ArgumentException>(() =>
ToolLocationHelper
.GetDotNetFrameworkSdkRootRegistryKey(TargetDotNetFrameworkVersion.Version48, VisualStudioVersion.Version100));
822
Should.Throw<ArgumentException>(() =>
ToolLocationHelper
.GetDotNetFrameworkSdkRootRegistryKey(TargetDotNetFrameworkVersion.Version48, VisualStudioVersion.Version110));
823
Should.Throw<ArgumentException>(() =>
ToolLocationHelper
.GetDotNetFrameworkSdkRootRegistryKey(TargetDotNetFrameworkVersion.Version48, VisualStudioVersion.Version120));
824
Should.Throw<ArgumentException>(() =>
ToolLocationHelper
.GetDotNetFrameworkSdkRootRegistryKey(TargetDotNetFrameworkVersion.Version48, VisualStudioVersion.Version140));
825
ToolLocationHelper
.GetDotNetFrameworkSdkRootRegistryKey(TargetDotNetFrameworkVersion.Version48, VisualStudioVersion.Version150).ShouldBe(fullDotNetFrameworkSdkRegistryPathForV4ToolsOnManagedToolsSDK48);
826
ToolLocationHelper
.GetDotNetFrameworkSdkRootRegistryKey(TargetDotNetFrameworkVersion.Version48, VisualStudioVersion.Version160).ShouldBe(fullDotNetFrameworkSdkRegistryPathForV4ToolsOnManagedToolsSDK48);
827
ToolLocationHelper
.GetDotNetFrameworkSdkRootRegistryKey(TargetDotNetFrameworkVersion.Version48, VisualStudioVersion.Version170).ShouldBe(fullDotNetFrameworkSdkRegistryPathForV4ToolsOnManagedToolsSDK48);
830
Should.Throw<ArgumentException>(() =>
ToolLocationHelper
.GetDotNetFrameworkSdkRootRegistryKey(TargetDotNetFrameworkVersion.Version481, VisualStudioVersion.Version100));
831
Should.Throw<ArgumentException>(() =>
ToolLocationHelper
.GetDotNetFrameworkSdkRootRegistryKey(TargetDotNetFrameworkVersion.Version481, VisualStudioVersion.Version110));
832
Should.Throw<ArgumentException>(() =>
ToolLocationHelper
.GetDotNetFrameworkSdkRootRegistryKey(TargetDotNetFrameworkVersion.Version481, VisualStudioVersion.Version120));
833
Should.Throw<ArgumentException>(() =>
ToolLocationHelper
.GetDotNetFrameworkSdkRootRegistryKey(TargetDotNetFrameworkVersion.Version481, VisualStudioVersion.Version140));
834
Should.Throw<ArgumentException>(() =>
ToolLocationHelper
.GetDotNetFrameworkSdkRootRegistryKey(TargetDotNetFrameworkVersion.Version481, VisualStudioVersion.Version150));
835
Should.Throw<ArgumentException>(() =>
ToolLocationHelper
.GetDotNetFrameworkSdkRootRegistryKey(TargetDotNetFrameworkVersion.Version481, VisualStudioVersion.Version160));
836
ToolLocationHelper
.GetDotNetFrameworkSdkRootRegistryKey(TargetDotNetFrameworkVersion.Version481, VisualStudioVersion.Version170).ShouldBe(fullDotNetFrameworkSdkRegistryPathForV4ToolsOnManagedToolsSDK481);
839
ToolLocationHelper
.GetDotNetFrameworkSdkRootRegistryKey(TargetDotNetFrameworkVersion.Latest, VisualStudioVersion.Version170).ShouldBe(fullDotNetFrameworkSdkRegistryPathForV4ToolsOnManagedToolsSDK481);
848
Should.Throw<ArgumentException>(() =>
ToolLocationHelper
.GetDotNetFrameworkSdkInstallKeyValue((TargetDotNetFrameworkVersion)99, vsVersion));
854
Should.Throw<ArgumentException>(() =>
ToolLocationHelper
.GetDotNetFrameworkSdkInstallKeyValue(dotNetVersion, (VisualStudioVersion)99));
862
ToolLocationHelper
.GetDotNetFrameworkSdkInstallKeyValue(TargetDotNetFrameworkVersion.Version11, vsVersion).ShouldBe(FrameworkLocationHelper.dotNetFrameworkSdkInstallKeyValueV11);
865
ToolLocationHelper
.GetDotNetFrameworkSdkInstallKeyValue(TargetDotNetFrameworkVersion.Version20, vsVersion).ShouldBe(FrameworkLocationHelper.dotNetFrameworkSdkInstallKeyValueV20);
868
Should.Throw<ArgumentException>(() =>
ToolLocationHelper
.GetDotNetFrameworkSdkInstallKeyValue(TargetDotNetFrameworkVersion.Version30, vsVersion));
871
ToolLocationHelper
.GetDotNetFrameworkSdkInstallKeyValue(TargetDotNetFrameworkVersion.Version35, vsVersion).ShouldBe(InstallationFolder);
874
ToolLocationHelper
.GetDotNetFrameworkSdkInstallKeyValue(TargetDotNetFrameworkVersion.Version40, vsVersion).ShouldBe(InstallationFolder);
877
ToolLocationHelper
.GetDotNetFrameworkSdkInstallKeyValue(TargetDotNetFrameworkVersion.Version45, vsVersion).ShouldBe(InstallationFolder);
881
Should.Throw<ArgumentException>(() =>
ToolLocationHelper
.GetDotNetFrameworkSdkInstallKeyValue(TargetDotNetFrameworkVersion.Version451, VisualStudioVersion.Version100));
882
Should.Throw<ArgumentException>(() =>
ToolLocationHelper
.GetDotNetFrameworkSdkInstallKeyValue(TargetDotNetFrameworkVersion.Version451, VisualStudioVersion.Version110));
883
ToolLocationHelper
.GetDotNetFrameworkSdkInstallKeyValue(TargetDotNetFrameworkVersion.Version451, VisualStudioVersion.Version120).ShouldBe(InstallationFolder);
884
ToolLocationHelper
.GetDotNetFrameworkSdkInstallKeyValue(TargetDotNetFrameworkVersion.Version451, VisualStudioVersion.Version140).ShouldBe(InstallationFolder);
887
Should.Throw<ArgumentException>(() =>
ToolLocationHelper
.GetDotNetFrameworkSdkInstallKeyValue(TargetDotNetFrameworkVersion.Version46, VisualStudioVersion.Version100));
888
Should.Throw<ArgumentException>(() =>
ToolLocationHelper
.GetDotNetFrameworkSdkInstallKeyValue(TargetDotNetFrameworkVersion.Version46, VisualStudioVersion.Version110));
889
Should.Throw<ArgumentException>(() =>
ToolLocationHelper
.GetDotNetFrameworkSdkInstallKeyValue(TargetDotNetFrameworkVersion.Version46, VisualStudioVersion.Version120));
890
ToolLocationHelper
.GetDotNetFrameworkSdkInstallKeyValue(TargetDotNetFrameworkVersion.Version46, VisualStudioVersion.Version140).ShouldBe(InstallationFolder);
903
Should.Throw<ArgumentException>(() =>
ToolLocationHelper
.GetPathToDotNetFrameworkSdk((TargetDotNetFrameworkVersion)99, vsVersion));
909
Should.Throw<ArgumentException>(() =>
ToolLocationHelper
.GetPathToDotNetFrameworkSdk(dotNetVersion, (VisualStudioVersion)99));
937
ToolLocationHelper
.GetPathToDotNetFrameworkSdk(TargetDotNetFrameworkVersion.Version11, vsVersion).ShouldBe(FrameworkLocationHelper.PathToDotNetFrameworkSdkV11);
940
ToolLocationHelper
.GetPathToDotNetFrameworkSdk(TargetDotNetFrameworkVersion.Version20, vsVersion).ShouldBe(FrameworkLocationHelper.PathToDotNetFrameworkSdkV20);
943
Should.Throw<ArgumentException>(() =>
ToolLocationHelper
.GetPathToDotNetFrameworkSdk(TargetDotNetFrameworkVersion.Version30, vsVersion));
946
ToolLocationHelper
.GetPathToDotNetFrameworkSdk(TargetDotNetFrameworkVersion.Version35, vsVersion).ShouldBe(pathToSdk35InstallRoot);
950
ToolLocationHelper
.GetPathToDotNetFrameworkSdk(TargetDotNetFrameworkVersion.Version40, VisualStudioVersion.Version100).ShouldBe(pathToSdkV4InstallRootOnVS10);
951
ToolLocationHelper
.GetPathToDotNetFrameworkSdk(TargetDotNetFrameworkVersion.Version40, VisualStudioVersion.Version110).ShouldBe(pathToSdkV4InstallRootOnVS11);
952
ToolLocationHelper
.GetPathToDotNetFrameworkSdk(TargetDotNetFrameworkVersion.Version40, VisualStudioVersion.Version120).ShouldBe(pathToSdkV4InstallRootOnVS12);
953
ToolLocationHelper
.GetPathToDotNetFrameworkSdk(TargetDotNetFrameworkVersion.Version40, VisualStudioVersion.Version140).ShouldBe(pathToSdkV4InstallRootOnVS14);
956
ToolLocationHelper
.GetPathToDotNetFrameworkSdk(TargetDotNetFrameworkVersion.Version45, VisualStudioVersion.Version100).ShouldBe(pathToSdkV4InstallRootOnVS11);
957
ToolLocationHelper
.GetPathToDotNetFrameworkSdk(TargetDotNetFrameworkVersion.Version45, VisualStudioVersion.Version110).ShouldBe(pathToSdkV4InstallRootOnVS11);
958
ToolLocationHelper
.GetPathToDotNetFrameworkSdk(TargetDotNetFrameworkVersion.Version45, VisualStudioVersion.Version120).ShouldBe(pathToSdkV4InstallRootOnVS12);
959
ToolLocationHelper
.GetPathToDotNetFrameworkSdk(TargetDotNetFrameworkVersion.Version45, VisualStudioVersion.Version140).ShouldBe(pathToSdkV4InstallRootOnVS14);
962
Should.Throw<ArgumentException>(() =>
ToolLocationHelper
.GetPathToDotNetFrameworkSdk(TargetDotNetFrameworkVersion.Version451, VisualStudioVersion.Version100));
963
Should.Throw<ArgumentException>(() =>
ToolLocationHelper
.GetPathToDotNetFrameworkSdk(TargetDotNetFrameworkVersion.Version451, VisualStudioVersion.Version110));
964
ToolLocationHelper
.GetPathToDotNetFrameworkSdk(TargetDotNetFrameworkVersion.Version451, VisualStudioVersion.Version120).ShouldBe(pathToSdkV4InstallRootOnVS12);
965
ToolLocationHelper
.GetPathToDotNetFrameworkSdk(TargetDotNetFrameworkVersion.Version451, VisualStudioVersion.Version140).ShouldBe(pathToSdkV4InstallRootOnVS14);
968
Should.Throw<ArgumentException>(() =>
ToolLocationHelper
.GetPathToDotNetFrameworkSdk(TargetDotNetFrameworkVersion.Version46, VisualStudioVersion.Version100));
969
Should.Throw<ArgumentException>(() =>
ToolLocationHelper
.GetPathToDotNetFrameworkSdk(TargetDotNetFrameworkVersion.Version46, VisualStudioVersion.Version110));
970
Should.Throw<ArgumentException>(() =>
ToolLocationHelper
.GetPathToDotNetFrameworkSdk(TargetDotNetFrameworkVersion.Version46, VisualStudioVersion.Version120));
971
ToolLocationHelper
.GetPathToDotNetFrameworkSdk(TargetDotNetFrameworkVersion.Version46, VisualStudioVersion.Version140).ShouldBe(pathToSdkV4InstallRootOnVS14);
982
Should.Throw<ArgumentException>(() =>
ToolLocationHelper
.GetPathToWindowsSdk((TargetDotNetFrameworkVersion)99, vsVersion));
993
Should.Throw<ArgumentException>(() =>
ToolLocationHelper
.GetPathToWindowsSdk(dotNetVersion, vsVersion));
997
ToolLocationHelper
.GetPathToWindowsSdk(TargetDotNetFrameworkVersion.Version45, vsVersion).ShouldBe(pathToWindowsSdkV80);
1000
ToolLocationHelper
.GetPathToWindowsSdk(TargetDotNetFrameworkVersion.Version451, vsVersion).ShouldBe(pathToWindowsSdkV81);
1003
ToolLocationHelper
.GetPathToWindowsSdk(TargetDotNetFrameworkVersion.Version46, vsVersion).ShouldBe(pathToWindowsSdkV81);
1370
string path =
ToolLocationHelper
.ChainReferenceAssemblyPath(@"PathDoesNotExistSoICannotChain");
1402
string path =
ToolLocationHelper
.ChainReferenceAssemblyPath(Path.Combine(tempDirectory, "v4.1"));
1439
string path =
ToolLocationHelper
.ChainReferenceAssemblyPath(Path.Combine(tempDirectory, "v4.1"));
1469
string path =
ToolLocationHelper
.ChainReferenceAssemblyPath(Path.Combine(tempDirectory, "v4.1"));
1499
string path =
ToolLocationHelper
.ChainReferenceAssemblyPath(Path.Combine(tempDirectory, "v4.1"));
1529
string path =
ToolLocationHelper
.ChainReferenceAssemblyPath(Path.Combine(tempDirectory, "v4.0"));
1561
string path =
ToolLocationHelper
.ChainReferenceAssemblyPath(tempDirectoryPath);
1597
ToolLocationHelper
.ChainReferenceAssemblyPath(tempDirectoryPath);
1631
ToolLocationHelper
.ChainReferenceAssemblyPath(tempDirectoryPath);
1689
IList<string> directories =
ToolLocationHelper
.GetPathToReferenceAssemblies(tempDirectory, frameworkName);
1750
string displayName40 =
ToolLocationHelper
.GetDisplayNameForTargetFrameworkDirectory(framework40Directory, frameworkName);
1753
string displayName39 =
ToolLocationHelper
.GetDisplayNameForTargetFrameworkDirectory(framework39Directory, frameworkName);
1807
IList<string> directories =
ToolLocationHelper
.GetPathToReferenceAssemblies(tempDirectory, frameworkName);
1836
ToolLocationHelper
.GetPathToReferenceAssemblies("Not Null String", (FrameworkNameVersioning)null);
1847
ToolLocationHelper
.GetPathToReferenceAssemblies(null, (FrameworkNameVersioning)null);
1859
ToolLocationHelper
.GetPathToReferenceAssemblies(null, frameworkName);
1872
ToolLocationHelper
.GetPathToReferenceAssemblies(string.Empty, frameworkName);
1885
ToolLocationHelper
.GetPathToReferenceAssemblies(string.Empty, frameworkName);
1901
ToolLocationHelper
.GetPathToReferenceAssemblies((FrameworkNameVersioning)null);
1916
if (
ToolLocationHelper
.GetPathToDotNetFrameworkReferenceAssemblies(TargetDotNetFrameworkVersion.Version48) != null)
1919
IList<string> directories =
ToolLocationHelper
.GetPathToReferenceAssemblies(frameworkName);
1922
string referenceAssemblyPath =
ToolLocationHelper
.GetPathToDotNetFrameworkReferenceAssemblies(TargetDotNetFrameworkVersion.Version48);
1940
IList<string> directories =
ToolLocationHelper
.GetPathToReferenceAssemblies(frameworkName);
1988
IList<string> list =
ToolLocationHelper
.HandleLegacyDotNetFrameworkReferenceAssemblyPaths(legacyHelper.GetDotNetVersionToPathDelegate, legacyHelper.GetDotNetReferenceAssemblyDelegate, frameworkName);
2002
IList<string> list =
ToolLocationHelper
.HandleLegacyDotNetFrameworkReferenceAssemblyPaths(legacyHelper.GetDotNetVersionToPathDelegate, legacyHelper.GetDotNetReferenceAssemblyDelegate, frameworkName);
2018
IList<string> list =
ToolLocationHelper
.HandleLegacyDotNetFrameworkReferenceAssemblyPaths(legacyHelper.GetDotNetVersionToPathDelegate, legacyHelper.GetDotNetReferenceAssemblyDelegate, frameworkName);
2035
IList<string> list =
ToolLocationHelper
.HandleLegacyDotNetFrameworkReferenceAssemblyPaths(legacyHelper.GetDotNetVersionToPathDelegate, legacyHelper.GetDotNetReferenceAssemblyDelegate, frameworkName);
2049
IList<string> list =
ToolLocationHelper
.HandleLegacyDotNetFrameworkReferenceAssemblyPaths(legacyHelper.GetDotNetVersionToPathDelegate, legacyHelper.GetDotNetReferenceAssemblyDelegate, frameworkName);
2065
IList<string> list =
ToolLocationHelper
.HandleLegacyDotNetFrameworkReferenceAssemblyPaths(legacyHelper.GetDotNetVersionToPathDelegate, legacyHelper.GetDotNetReferenceAssemblyDelegate, frameworkName);
2085
IList<string> list =
ToolLocationHelper
.HandleLegacyDotNetFrameworkReferenceAssemblyPaths(legacyHelper.GetDotNetVersionToPathDelegate, legacyHelper.GetDotNetReferenceAssemblyDelegate, frameworkName);
2104
IList<string> list =
ToolLocationHelper
.HandleLegacyDotNetFrameworkReferenceAssemblyPaths(legacyHelper.GetDotNetVersionToPathDelegate, legacyHelper.GetDotNetReferenceAssemblyDelegate, frameworkName);
2118
IList<string> list =
ToolLocationHelper
.HandleLegacyDotNetFrameworkReferenceAssemblyPaths(legacyHelper.GetDotNetVersionToPathDelegate, legacyHelper.GetDotNetReferenceAssemblyDelegate, frameworkName);
2153
string pathToFramework =
ToolLocationHelper
.GetPathToStandardLibraries(".NetFramework", "v3.5", string.Empty, "x86");
2156
pathToFramework =
ToolLocationHelper
.GetPathToStandardLibraries(".NetFramework", "v3.5", string.Empty, "x64");
2159
pathToFramework =
ToolLocationHelper
.GetPathToStandardLibraries(".NetFramework", "v3.5", string.Empty, "itanium");
2164
pathToFramework =
ToolLocationHelper
.GetPathToStandardLibraries(".NetFramework", "v3.5", string.Empty, "RandomPlatform");
2169
pathToFramework =
ToolLocationHelper
.GetPathToStandardLibraries(".NetFramework", "v3.5", string.Empty, "RandomPlatform");
2185
IList<string> referencePaths =
ToolLocationHelper
.GetPathToReferenceAssemblies(new FrameworkNameVersioning(".NETFramework", new Version("4.0")));
2199
string pathToFramework =
ToolLocationHelper
.GetPathToStandardLibraries(".NetFramework", "v4.0", string.Empty, "x86");
2203
pathToFramework =
ToolLocationHelper
.GetPathToStandardLibraries(".NetFramework", "v4.0", string.Empty, "x64");
2206
pathToFramework =
ToolLocationHelper
.GetPathToStandardLibraries(".NetFramework", "v4.0", string.Empty, "itanium");
2209
pathToFramework =
ToolLocationHelper
.GetPathToStandardLibraries(".NetFramework", "v4.0", string.Empty, "RandomPlatform");
2244
string pathToFramework =
ToolLocationHelper
.GetPathToStandardLibraries(".NetFramework", "v3.5", string.Empty, "x86");
2247
pathToFramework =
ToolLocationHelper
.GetPathToStandardLibraries(".NetFramework", "v3.5", string.Empty, "x64");
2250
pathToFramework =
ToolLocationHelper
.GetPathToStandardLibraries(".NetFramework", "v3.5", string.Empty, "itanium");
2253
pathToFramework =
ToolLocationHelper
.GetPathToStandardLibraries(".NetFramework", "v3.5", string.Empty, "RandomPlatform");
2268
IList<string> referencePaths =
ToolLocationHelper
.GetPathToReferenceAssemblies(new FrameworkNameVersioning(".NETFramework", new Version("4.0")));
2282
string pathToFramework =
ToolLocationHelper
.GetPathToStandardLibraries(".NetFramework", "v4.0", string.Empty, "x86");
2286
pathToFramework =
ToolLocationHelper
.GetPathToStandardLibraries(".NetFramework", "v4.0", string.Empty, "x64");
2289
pathToFramework =
ToolLocationHelper
.GetPathToStandardLibraries(".NetFramework", "v4.0", string.Empty, "itanium");
2292
pathToFramework =
ToolLocationHelper
.GetPathToStandardLibraries(".NetFramework", "v4.0", string.Empty, "RandomPlatform");
2310
IList<string> list =
ToolLocationHelper
.HandleLegacyDotNetFrameworkReferenceAssemblyPaths(legacyHelper.GetDotNetVersionToPathDelegate, legacyHelper.GetDotNetReferenceAssemblyDelegate, frameworkName);
2331
IList<string> list =
ToolLocationHelper
.HandleLegacyDotNetFrameworkReferenceAssemblyPaths(legacyHelper.GetDotNetVersionToPathDelegate, legacyHelper.GetDotNetReferenceAssemblyDelegate, frameworkName);
2346
IList<string> list =
ToolLocationHelper
.HandleLegacyDotNetFrameworkReferenceAssemblyPaths(legacyHelper.GetDotNetVersionToPathDelegate, legacyHelper.GetDotNetReferenceAssemblyDelegate, frameworkName);
2360
IList<string> list =
ToolLocationHelper
.HandleLegacyDotNetFrameworkReferenceAssemblyPaths(legacyHelper.GetDotNetVersionToPathDelegate, legacyHelper.GetDotNetReferenceAssemblyDelegate, frameworkName);
2374
IList<string> list =
ToolLocationHelper
.HandleLegacyDotNetFrameworkReferenceAssemblyPaths(legacyHelper.GetDotNetVersionToPathDelegate, legacyHelper.GetDotNetReferenceAssemblyDelegate, frameworkName);
2388
ToolLocationHelper
.GetAssemblyFoldersExInfo("", "v3.0", "AssemblyFoldersEx", null, null, System.Reflection.ProcessorArchitecture.MSIL);
2399
ToolLocationHelper
.GetAssemblyFoldersExInfo(null, "v3.0", "AssemblyFoldersEx", null, null, System.Reflection.ProcessorArchitecture.MSIL);
2410
ToolLocationHelper
.GetAssemblyFoldersExInfo(@"SOFTWARE\Microsoft\.UnitTest", "v3.0", "", null, null, System.Reflection.ProcessorArchitecture.MSIL);
2421
ToolLocationHelper
.GetAssemblyFoldersExInfo(@"SOFTWARE\Microsoft\.UnitTest", "v3.0", null, null, null, System.Reflection.ProcessorArchitecture.MSIL);
2432
ToolLocationHelper
.GetAssemblyFoldersExInfo(@"SOFTWARE\Microsoft\.UnitTest", "", "AssemblyFoldersEx", null, null, System.Reflection.ProcessorArchitecture.MSIL);
2443
ToolLocationHelper
.GetAssemblyFoldersExInfo(@"SOFTWARE\Microsoft\.UnitTest", null, "AssemblyFoldersEx", null, null, System.Reflection.ProcessorArchitecture.MSIL);
2456
directories =
ToolLocationHelper
.GetAssemblyFoldersExInfo(@"SOFTWARE\Microsoft\.UnitTest", "v3.0", "AssemblyFoldersEx", null, null, System.Reflection.ProcessorArchitecture.MSIL);
2504
string stdLibPath =
ToolLocationHelper
.GetPathToStandardLibraries(frameworkName, frameworkVersion, string.Empty, null, rootDir);
2515
string v45Path =
ToolLocationHelper
.GetPathToStandardLibraries(frameworkName, frameworkVersion, string.Empty);
2517
string v45PathWithNullRoot =
ToolLocationHelper
.GetPathToStandardLibraries(frameworkName, frameworkVersion, string.Empty, null);
2534
string stdLibPath =
ToolLocationHelper
.GetPathToStandardLibraries(frameworkName, frameworkVersion, string.Empty, null, null, fallbackSearchPaths);
2559
string stdLibPath =
ToolLocationHelper
.GetPathToStandardLibraries(frameworkName, frameworkVersion, string.Empty, null, rootDir, fallbackSearchPaths);
2571
string v45Path =
ToolLocationHelper
.GetPathToStandardLibraries(frameworkName, frameworkVersion, string.Empty);
2573
string v45PathWithNullRoot =
ToolLocationHelper
.GetPathToStandardLibraries(frameworkName, frameworkVersion, string.Empty, null, null);
2587
=>
ToolLocationHelper
.GetPathToReferenceAssemblies(frameworkName, "v" + frameworkVersion, frameworkProfile, customFrameworkDir));
2602
=>
ToolLocationHelper
.GetPathToReferenceAssemblies(
2618
=>
ToolLocationHelper
.GetPathToReferenceAssemblies(
2633
=>
ToolLocationHelper
.GetPathToReferenceAssemblies(
2651
=>
ToolLocationHelper
.GetPathToReferenceAssemblies(
2666
=>
ToolLocationHelper
.GetPathToReferenceAssemblies(
2692
var v45Paths =
ToolLocationHelper
.GetPathToReferenceAssemblies(frameworkName, frameworkVersion, string.Empty);
2695
var v45PathsWithNullRoot =
ToolLocationHelper
.GetPathToReferenceAssemblies(frameworkName, frameworkVersion, string.Empty, null);
2706
var v45Paths =
ToolLocationHelper
.GetPathToReferenceAssemblies(frameworkName, frameworkVersion, string.Empty);
2709
var v45PathsWithNullRoot =
ToolLocationHelper
.GetPathToReferenceAssemblies(frameworkName, frameworkVersion, string.Empty, null, null);
2840
internal
ToolLocationHelper
.VersionToPath GetDotNetVersionToPathDelegate => GetDotNetFramework;
2845
internal
ToolLocationHelper
.VersionToPath GetDotNetReferenceAssemblyDelegate => GetDotNetFrameworkReferenceAssemblies;
2971
Should.Throw<ArgumentException>(() =>
ToolLocationHelper
.GetPlatformExtensionSDKLocations(identifier, version));
2972
Should.Throw<ArgumentException>(() =>
ToolLocationHelper
.GetPlatformSDKLocation(identifier, version));
2986
IDictionary<string, string> sdks =
ToolLocationHelper
.GetPlatformExtensionSDKLocations(new[] { _fakeStructureRoot }, null, "FOO", new Version(1, 0));
2990
sdks =
ToolLocationHelper
.GetPlatformExtensionSDKLocations(new[] { _fakeStructureRoot }, null, "MyPlatform", new Version(3, 0));
2995
sdks =
ToolLocationHelper
.GetPlatformExtensionSDKLocations(new[] { _fakeStructureRoot }, null, "MyPlatform", new Version(4, 0));
3003
sdks =
ToolLocationHelper
.GetPlatformExtensionSDKLocations(new[] { _fakeStructureRoot }, null, "MyPlatform", new Version(1, 0));
3023
IDictionary<string, string> sdks =
ToolLocationHelper
.GetPlatformExtensionSDKLocations(new[] { _fakeStructureRoot }, null, "FOO", new Version(1, 0));
3031
string path =
ToolLocationHelper
.GetPlatformExtensionSDKLocation(
3040
path =
ToolLocationHelper
.GetPlatformExtensionSDKLocation(
3049
path =
ToolLocationHelper
.GetPlatformExtensionSDKLocation("Something, Version=1.0", "MyPlatform", new Version(4, 0), new[] { _fakeStructureRoot }, null);
3075
ToolLocationHelper
.GatherSDKListFromDirectory(paths, targetPlatform);
3090
Should.Throw<ArgumentException>(() => {
ToolLocationHelper
.GatherSDKListFromDirectory(paths, targetPlatform); });
3105
ToolLocationHelper
.GatherSDKListFromDirectory(paths, targetPlatform);
3474
IList<TargetPlatformSDK> sdkList =
ToolLocationHelper
.GetTargetPlatformSdks(new[] { _fakeStructureRoot }, null);
3475
IList<TargetPlatformSDK> filteredSdkList =
ToolLocationHelper
.FilterTargetPlatformSdks(sdkList, new Version(6, 2, 5), new Version(12, 0));
3476
IList<TargetPlatformSDK> filteredSdkList1 =
ToolLocationHelper
.FilterTargetPlatformSdks(sdkList, new Version(6, 2, 1), new Version(10, 0));
3477
IList<TargetPlatformSDK> filteredSdkList2 =
ToolLocationHelper
.FilterTargetPlatformSdks(sdkList, new Version(6, 2, 3), new Version(10, 0));
3478
IList<TargetPlatformSDK> filteredSdkList3 =
ToolLocationHelper
.FilterTargetPlatformSdks(sdkList, new Version(6, 2, 3), new Version(11, 0));
3481
IList<TargetPlatformSDK> filteredSdkList4 =
ToolLocationHelper
.FilterTargetPlatformSdks(sdkList, new Version(6, 2, 3), null);
3484
IList<TargetPlatformSDK> filteredSdkList5 =
ToolLocationHelper
.FilterTargetPlatformSdks(sdkList, null, new Version(10, 0));
3487
IList<TargetPlatformSDK> filteredSdkList6 =
ToolLocationHelper
.FilterTargetPlatformSdks(sdkList, null, null);
3518
IDictionary<string, string> extensionSDKs =
ToolLocationHelper
.GetPlatformExtensionSDKLocations(new[] { _fakeStructureRoot }, null, "MyPlatform", new Version(4, 0));
3519
IDictionary<string, string> filteredExtensionSDKs1 =
ToolLocationHelper
.FilterPlatformExtensionSDKs(new Version(8, 0), extensionSDKs);
3520
IDictionary<string, string> filteredExtensionSDKs2 =
ToolLocationHelper
.FilterPlatformExtensionSDKs(new Version(9, 0), extensionSDKs);
3521
IDictionary<string, string> filteredExtensionSDKs3 =
ToolLocationHelper
.FilterPlatformExtensionSDKs(new Version(10, 0), extensionSDKs);
3783
ToolLocationHelper
.GatherSDKListFromDirectory(paths, targetPlatforms);
3854
ToolLocationHelper
.GatherSDKsFromRegistryImpl(targetPlatforms, "Software\\Microsoft\\MicrosoftSDks", RegistryView.Registry32, RegistryHive.CurrentUser, getRegistrySubKeyNames, getRegistrySubKeyDefaultValue, _openBaseKey, File.Exists);
3855
ToolLocationHelper
.GatherSDKsFromRegistryImpl(targetPlatforms, "Software\\Microsoft\\MicrosoftSDks", RegistryView.Registry32, RegistryHive.LocalMachine, getRegistrySubKeyNames, getRegistrySubKeyDefaultValue, _openBaseKey, File.Exists);
3905
ToolLocationHelper
.GatherSDKListFromDirectory(paths, targetPlatforms);
3909
ToolLocationHelper
.GatherSDKsFromRegistryImpl(targetPlatforms, "Software\\Microsoft\\MicrosoftSDks", RegistryView.Registry32, RegistryHive.CurrentUser, getRegistrySubKeyNames, getRegistrySubKeyDefaultValue, _openBaseKey, File.Exists);
3910
ToolLocationHelper
.GatherSDKsFromRegistryImpl(targetPlatforms, "Software\\Microsoft\\MicrosoftSDks", RegistryView.Registry32, RegistryHive.LocalMachine, getRegistrySubKeyNames, getRegistrySubKeyDefaultValue, _openBaseKey, File.Exists);
3970
Should.Throw<ArgumentNullException>(() =>
ToolLocationHelper
.GetPlatformsForSDK(null, new Version("1.0")));
3980
Should.Throw<ArgumentNullException>(() =>
ToolLocationHelper
.GetPlatformsForSDK("AnySDK", null));
3990
ToolLocationHelper
.GetPlatformsForSDK("AnySDK", new Version("1.0"), Array.Empty<string>(), "").Any().ShouldBeFalse();
4001
IEnumerable<string> myPlatforms =
ToolLocationHelper
.GetPlatformsForSDK("MyPlatform", new Version("8.0"), new[] { _fakeStructureRoot }, null);
4014
ToolLocationHelper
.GetPlatformsForSDK("DoesNotExistPlatform", new Version("0.0.0.0"), new[] { _fakeStructureRoot }, null).Any().ShouldBeFalse();
4024
ToolLocationHelper
.GetPlatformsForSDK("MyPlatform", new Version("0.0.0.0"), new[] { _fakeStructureRoot }, null).Any().ShouldBeFalse();
4034
ToolLocationHelper
.GetPlatformsForSDK("Windows", new Version("8.0"), new[] { _fakeStructureRoot }, null).Any().ShouldBeFalse();
4048
IList<TargetPlatformSDK> sdks =
ToolLocationHelper
.GetTargetPlatformSdks(new[] { _fakeStructureRoot }, null);
4086
ToolLocationHelper
.GetFoldersInVSInstalls(null, null, "relativePath").Count().ShouldBe(0);
4118
ToolLocationHelper
.FindRootFolderWhereAllFilesExist(roots, "file1.txt").ShouldBe(rootDirectories[0]);
4119
ToolLocationHelper
.FindRootFolderWhereAllFilesExist(roots, @"file1.txt;subdir\file2.txt").ShouldBe(rootDirectories[1]);
4120
ToolLocationHelper
.FindRootFolderWhereAllFilesExist(roots, @"file1.txt;subdir\file3.txt").ShouldBe(String.Empty);
4121
ToolLocationHelper
.FindRootFolderWhereAllFilesExist(@"c:<>;" + roots, "file1.txt").ShouldBe(rootDirectories[0]); // should ignore invalid dir