254 references to TargetDotNetFrameworkVersion
Microsoft.Build.Engine.OM.UnitTests (9)
Definition\Project_Tests.cs (5)
24
using TargetDotNetFrameworkVersion = Microsoft.Build.Utilities.
TargetDotNetFrameworkVersion
;
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 (2)
BackEnd\BuildManager_Tests.cs (1)
858
string netFrameworkDirectory = ToolLocationHelper.GetPathToDotNetFrameworkReferenceAssemblies(
TargetDotNetFrameworkVersion
.Version45);
Evaluation\Expander_Tests.cs (1)
1995
if (ToolLocationHelper.GetPathToDotNetFrameworkReferenceAssemblies(
TargetDotNetFrameworkVersion
.Version48) == null)
Microsoft.Build.Tasks.CodeAnalysis (1)
src\Compilers\Core\MSBuildTask\ManagedCompiler.cs (1)
1279
TargetDotNetFrameworkVersion
.Version46
Microsoft.Build.Tasks.CodeAnalysis.Sdk (1)
src\Compilers\Core\MSBuildTask\ManagedCompiler.cs (1)
1279
TargetDotNetFrameworkVersion
.Version46
Microsoft.Build.Tasks.Core (26)
AddToWin32Manifest.cs (1)
102
string? defaultManifestPath = ToolLocationHelper.GetPathToDotNetFrameworkFile(DefaultManifestName,
TargetDotNetFrameworkVersion
.Version46);
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));
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 (4)
218
string frameworkVersion20Path = ToolLocationHelper.GetPathToDotNetFramework(
TargetDotNetFrameworkVersion
.Version20);
241
return GetFrameworkListFromReferenceAssembliesPath(
TargetDotNetFrameworkVersion
.Version30);
251
return GetFrameworkListFromReferenceAssembliesPath(
TargetDotNetFrameworkVersion
.Version35);
270
private static RedistList GetFrameworkListFromReferenceAssembliesPath(
TargetDotNetFrameworkVersion
version)
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.Utilities.Core (58)
ToolLocationHelper.cs (58)
296
internal delegate string VersionToPath(
TargetDotNetFrameworkVersion
version);
1635
public static string GetDotNetFrameworkVersionFolderPrefix(
TargetDotNetFrameworkVersion
version) => FrameworkLocationHelper.GetDotNetFrameworkVersionFolderPrefix(TargetDotNetFrameworkVersionToSystemVersion(version));
1642
public static string GetDotNetFrameworkRootRegistryKey(
TargetDotNetFrameworkVersion
version) => FrameworkLocationHelper.fullDotNetFrameworkRegistryKey;
1651
public static string GetDotNetFrameworkSdkRootRegistryKey(
TargetDotNetFrameworkVersion
version) => GetDotNetFrameworkSdkRootRegistryKey(version, VisualStudioVersion.VersionLatest);
1658
public static string GetDotNetFrameworkSdkRootRegistryKey(
TargetDotNetFrameworkVersion
version, VisualStudioVersion visualStudioVersion)
1672
public static string GetDotNetFrameworkSdkInstallKeyValue(
TargetDotNetFrameworkVersion
version) => GetDotNetFrameworkSdkInstallKeyValue(version, VisualStudioVersion.VersionLatest);
1679
public static string GetDotNetFrameworkSdkInstallKeyValue(
TargetDotNetFrameworkVersion
version, VisualStudioVersion visualStudioVersion)
1691
public static string GetPathToDotNetFramework(
TargetDotNetFrameworkVersion
version) => GetPathToDotNetFramework(version, UtilitiesDotNetFrameworkArchitecture.Current);
1699
public static string GetPathToDotNetFramework(
TargetDotNetFrameworkVersion
version, UtilitiesDotNetFrameworkArchitecture architecture)
1713
public static string GetPathToDotNetFrameworkSdk() => GetPathToDotNetFrameworkSdk(
TargetDotNetFrameworkVersion
.Latest);
1723
public static string GetPathToDotNetFrameworkSdk(
TargetDotNetFrameworkVersion
version) => GetPathToDotNetFrameworkSdk(version, VisualStudioVersion.VersionLatest);
1728
/// <param name="version">The <see cref="
TargetDotNetFrameworkVersion
"/> of the .NET Framework.</param>
1731
public static string GetPathToDotNetFrameworkSdk(
TargetDotNetFrameworkVersion
version, VisualStudioVersion visualStudioVersion)
1743
public static string GetPathToDotNetFrameworkReferenceAssemblies(
TargetDotNetFrameworkVersion
version)
1953
private static string VersionToDotNetFrameworkPath(VersionToPath PathToDotNetFramework,
TargetDotNetFrameworkVersion
version)
1962
private static string VersionToDotNetReferenceAssemblies(VersionToPath PathToDotReferenceAssemblies,
TargetDotNetFrameworkVersion
version)
1999
private static string GetPathToDotNetFrameworkSdkToolsFolderRoot(
TargetDotNetFrameworkVersion
version, VisualStudioVersion visualStudioVersion)
2006
private static Version TargetDotNetFrameworkVersionToSystemVersion(
TargetDotNetFrameworkVersion
version)
2010
case
TargetDotNetFrameworkVersion
.Version11:
2013
case
TargetDotNetFrameworkVersion
.Version20:
2016
case
TargetDotNetFrameworkVersion
.Version30:
2019
case
TargetDotNetFrameworkVersion
.Version35:
2022
case
TargetDotNetFrameworkVersion
.Version40:
2025
case
TargetDotNetFrameworkVersion
.Version45:
2028
case
TargetDotNetFrameworkVersion
.Version451:
2031
case
TargetDotNetFrameworkVersion
.Version452:
2034
case
TargetDotNetFrameworkVersion
.Version46:
2037
case
TargetDotNetFrameworkVersion
.Version461:
2040
case
TargetDotNetFrameworkVersion
.Version462:
2043
case
TargetDotNetFrameworkVersion
.Version47:
2046
case
TargetDotNetFrameworkVersion
.Version471:
2049
case
TargetDotNetFrameworkVersion
.Version472:
2052
case
TargetDotNetFrameworkVersion
.Version48:
2055
case
TargetDotNetFrameworkVersion
.Version481:
2056
case
TargetDotNetFrameworkVersion
.Latest: // Latest is a special value to indicate the highest version we know about.
2112
string referenceAssemblyPath = VersionToDotNetReferenceAssemblies(PathToReferenceAssemblies,
TargetDotNetFrameworkVersion
.Version35);
2113
string dotNetFrameworkPath = VersionToDotNetFrameworkPath(PathToDotNetFramework,
TargetDotNetFrameworkVersion
.Version35);
2138
string referenceAssemblyPath = VersionToDotNetReferenceAssemblies(PathToReferenceAssemblies,
TargetDotNetFrameworkVersion
.Version30);
2139
string dotNetFrameworkPath = VersionToDotNetFrameworkPath(PathToDotNetFramework,
TargetDotNetFrameworkVersion
.Version30);
2162
string referencePath = VersionToDotNetFrameworkPath(PathToDotNetFramework,
TargetDotNetFrameworkVersion
.Version20);
3239
=> GetPathToDotNetFrameworkSdkFile(fileName,
TargetDotNetFrameworkVersion
.Latest);
3250
public static string GetPathToDotNetFrameworkSdkFile(string fileName,
TargetDotNetFrameworkVersion
version)
3260
public static string GetPathToDotNetFrameworkSdkFile(string fileName,
TargetDotNetFrameworkVersion
version, VisualStudioVersion visualStudioVersion)
3275
public static string GetPathToDotNetFrameworkSdkFile(string fileName,
TargetDotNetFrameworkVersion
version, UtilitiesDotNetFrameworkArchitecture architecture) => GetPathToDotNetFrameworkSdkFile(fileName, version, VisualStudioVersion.VersionLatest, architecture);
3285
public static string GetPathToDotNetFrameworkSdkFile(string fileName,
TargetDotNetFrameworkVersion
version, VisualStudioVersion visualStudioVersion, UtilitiesDotNetFrameworkArchitecture architecture)
3304
private static string GetPathToDotNetFrameworkSdkFile(string fileName,
TargetDotNetFrameworkVersion
version, VisualStudioVersion visualStudioVersion, UtilitiesDotNetFrameworkArchitecture architecture, bool canFallBackIfNecessary)
3420
public static string GetPathToWindowsSdk(
TargetDotNetFrameworkVersion
version, VisualStudioVersion visualStudioVersion)
3432
public static string GetPathToWindowsSdkFile(string fileName,
TargetDotNetFrameworkVersion
version, VisualStudioVersion visualStudioVersion)
3450
public static string GetPathToWindowsSdkFile(string fileName,
TargetDotNetFrameworkVersion
version, VisualStudioVersion visualStudioVersion, DotNetFrameworkArchitecture architecture)
3469
private static string GetPathToWindowsSdkFile(string fileName,
TargetDotNetFrameworkVersion
version, VisualStudioVersion visualStudioVersion, DotNetFrameworkArchitecture architecture, bool canFallBackIfNecessary)
3558
"2.0" => GetPathToDotNetFramework(
TargetDotNetFrameworkVersion
.Version20, architecture),
3559
"3.5" => GetPathToDotNetFramework(
TargetDotNetFrameworkVersion
.Version35, architecture),
3560
"4.0" => GetPathToDotNetFramework(
TargetDotNetFrameworkVersion
.Version40, architecture),
3609
public static string GetPathToDotNetFrameworkFile(string fileName,
TargetDotNetFrameworkVersion
version) => GetPathToDotNetFrameworkFile(fileName, version, UtilitiesDotNetFrameworkArchitecture.Current);
3618
public static string GetPathToDotNetFrameworkFile(string fileName,
TargetDotNetFrameworkVersion
version, UtilitiesDotNetFrameworkArchitecture architecture)
3812
string dotNetFx20Path = GetPathToDotNetFramework(
TargetDotNetFrameworkVersion
.Version20);
3952
string dotNetFx35Path = GetPathToDotNetFramework(
TargetDotNetFrameworkVersion
.Version35);
3959
string dotNetFx20Path = GetPathToDotNetFramework(
TargetDotNetFrameworkVersion
.Version20);
Microsoft.Build.Utilities.UnitTests (157)
ToolLocationHelper_Tests.cs (157)
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);
682
string net35Path = ToolLocationHelper.GetPathToDotNetFrameworkFile(Constants.MSBuildExecutableName,
TargetDotNetFrameworkVersion
.Version35);
686
ToolLocationHelper.GetPathToDotNetFrameworkFile(Constants.MSBuildExecutableName,
TargetDotNetFrameworkVersion
.Version40).ShouldBe(ToolLocationHelper.GetPathToBuildToolsFile(Constants.MSBuildExecutableName, "4.0"));
701
string net20Path = ToolLocationHelper.GetPathToDotNetFrameworkFile(Constants.MSBuildExecutableName,
TargetDotNetFrameworkVersion
.Version20, UtilitiesDotNetFrameworkArchitecture.Bitness32);
704
string net35Path = ToolLocationHelper.GetPathToDotNetFrameworkFile(Constants.MSBuildExecutableName,
TargetDotNetFrameworkVersion
.Version35, UtilitiesDotNetFrameworkArchitecture.Bitness32);
707
ToolLocationHelper.GetPathToDotNetFrameworkFile(Constants.MSBuildExecutableName,
TargetDotNetFrameworkVersion
.Version40, UtilitiesDotNetFrameworkArchitecture.Bitness32).ShouldBe(
723
Should.Throw<ArgumentException>(() => ToolLocationHelper.GetDotNetFrameworkSdkRootRegistryKey((
TargetDotNetFrameworkVersion
)99, vsVersion));
727
foreach (
var
dotNetVersion in EnumDotNetFrameworkVersions())
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));
852
foreach (
var
dotNetVersion in EnumDotNetFrameworkVersions())
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));
907
foreach (
var
dotNetVersion in EnumDotNetFrameworkVersions())
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));
991
foreach (
var
dotNetVersion in EnumDotNetFrameworkVersions().Where(v => v <=
TargetDotNetFrameworkVersion
.Version40))
997
ToolLocationHelper.GetPathToWindowsSdk(
TargetDotNetFrameworkVersion
.Version45, vsVersion).ShouldBe(pathToWindowsSdkV80);
1000
ToolLocationHelper.GetPathToWindowsSdk(
TargetDotNetFrameworkVersion
.Version451, vsVersion).ShouldBe(pathToWindowsSdkV81);
1003
ToolLocationHelper.GetPathToWindowsSdk(
TargetDotNetFrameworkVersion
.Version46, vsVersion).ShouldBe(pathToWindowsSdkV81);
1916
if (ToolLocationHelper.GetPathToDotNetFrameworkReferenceAssemblies(
TargetDotNetFrameworkVersion
.Version48) != null)
1922
string referenceAssemblyPath = ToolLocationHelper.GetPathToDotNetFrameworkReferenceAssemblies(
TargetDotNetFrameworkVersion
.Version48);
2778
private static IEnumerable<
TargetDotNetFrameworkVersion
> EnumDotNetFrameworkVersions()
2780
for (
TargetDotNetFrameworkVersion
dotNetVersion =
TargetDotNetFrameworkVersion
.Version11; dotNetVersion <=
TargetDotNetFrameworkVersion
.VersionLatest; ++dotNetVersion)
2851
private string GetDotNetFrameworkReferenceAssemblies(
TargetDotNetFrameworkVersion
version)
2855
case
TargetDotNetFrameworkVersion
.Version40:
2859
case
TargetDotNetFrameworkVersion
.Version35:
2863
case
TargetDotNetFrameworkVersion
.Version30:
2878
private string GetDotNetFramework(
TargetDotNetFrameworkVersion
version)
2882
case
TargetDotNetFrameworkVersion
.Version20:
2886
case
TargetDotNetFrameworkVersion
.Version30:
2890
case
TargetDotNetFrameworkVersion
.Version35:
2894
case
TargetDotNetFrameworkVersion
.Version40: