248 references to TargetDotNetFrameworkVersion
Microsoft.Build.Engine.OM.UnitTests (9)
Definition\Project_Tests.cs (5)
25
using TargetDotNetFrameworkVersion = Microsoft.Build.Utilities.
TargetDotNetFrameworkVersion
;
1062
if (ToolLocationHelper.GetPathToDotNetFramework(
TargetDotNetFrameworkVersion
.Version35) == null)
1113
if (ToolLocationHelper.GetPathToDotNetFramework(
TargetDotNetFrameworkVersion
.Version20) == null)
1142
if (ToolLocationHelper.GetPathToDotNetFramework(
TargetDotNetFrameworkVersion
.Version20) != null)
1166
if (ToolLocationHelper.GetPathToDotNetFramework(
TargetDotNetFrameworkVersion
.Version20) == null)
Definition\ProjectCollection_Tests.cs (4)
497
if (ToolLocationHelper.GetPathToDotNetFramework(
TargetDotNetFrameworkVersion
.Version35) == null)
503
if (ToolLocationHelper.GetPathToDotNetFramework(
TargetDotNetFrameworkVersion
.Version20) == null)
1086
if (ToolLocationHelper.GetPathToDotNetFramework(
TargetDotNetFrameworkVersion
.Version20) == null)
1106
if (ToolLocationHelper.GetPathToDotNetFramework(
TargetDotNetFrameworkVersion
.Version20) != null)
Microsoft.Build.Engine.UnitTests (2)
BackEnd\BuildManager_Tests.cs (1)
859
string netFrameworkDirectory = ToolLocationHelper.GetPathToDotNetFrameworkReferenceAssemblies(
TargetDotNetFrameworkVersion
.Version45);
Evaluation\Expander_Tests.cs (1)
1989
if (ToolLocationHelper.GetPathToDotNetFrameworkReferenceAssemblies(
TargetDotNetFrameworkVersion
.Version48) == null)
Microsoft.Build.Tasks.CodeAnalysis (1)
src\Compilers\Core\MSBuildTask\ManagedCompiler.cs (1)
1277
TargetDotNetFrameworkVersion
.Version46
Microsoft.Build.Tasks.CodeAnalysis.Sdk (1)
src\Compilers\Core\MSBuildTask\ManagedCompiler.cs (1)
1277
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 (151)
ToolLocationHelper_Tests.cs (151)
510
ToolLocationHelper.GetDotNetFrameworkVersionFolderPrefix(
TargetDotNetFrameworkVersion
.Version40),
621
ToolLocationHelper.GetDotNetFrameworkVersionFolderPrefix(
TargetDotNetFrameworkVersion
.Version11).ShouldBe(FrameworkLocationHelper.dotNetFrameworkVersionFolderPrefixV11);
622
ToolLocationHelper.GetDotNetFrameworkVersionFolderPrefix(
TargetDotNetFrameworkVersion
.Version20).ShouldBe(FrameworkLocationHelper.dotNetFrameworkVersionFolderPrefixV20);
623
ToolLocationHelper.GetDotNetFrameworkVersionFolderPrefix(
TargetDotNetFrameworkVersion
.Version30).ShouldBe(FrameworkLocationHelper.dotNetFrameworkVersionFolderPrefixV30);
624
ToolLocationHelper.GetDotNetFrameworkVersionFolderPrefix(
TargetDotNetFrameworkVersion
.Version35).ShouldBe(FrameworkLocationHelper.dotNetFrameworkVersionFolderPrefixV35);
625
ToolLocationHelper.GetDotNetFrameworkVersionFolderPrefix(
TargetDotNetFrameworkVersion
.Version40).ShouldBe(FrameworkLocationHelper.dotNetFrameworkVersionFolderPrefixV40);
626
ToolLocationHelper.GetDotNetFrameworkVersionFolderPrefix(
TargetDotNetFrameworkVersion
.VersionLatest).ShouldBe(FrameworkLocationHelper.dotNetFrameworkVersionFolderPrefixV40);
627
ToolLocationHelper.GetDotNetFrameworkRootRegistryKey(
TargetDotNetFrameworkVersion
.VersionLatest).ShouldBe(FrameworkLocationHelper.fullDotNetFrameworkRegistryKey);
628
ToolLocationHelper.GetDotNetFrameworkVersionFolderPrefix(
TargetDotNetFrameworkVersion
.Latest).ShouldBe(FrameworkLocationHelper.dotNetFrameworkVersionFolderPrefixV40);
629
ToolLocationHelper.GetDotNetFrameworkRootRegistryKey(
TargetDotNetFrameworkVersion
.Latest).ShouldBe(FrameworkLocationHelper.fullDotNetFrameworkRegistryKey);
631
ToolLocationHelper.GetPathToDotNetFramework(
TargetDotNetFrameworkVersion
.Version11).ShouldBe(FrameworkLocationHelper.PathToDotNetFrameworkV11);
632
ToolLocationHelper.GetPathToDotNetFramework(
TargetDotNetFrameworkVersion
.Version20).ShouldBe(FrameworkLocationHelper.PathToDotNetFrameworkV20);
633
ToolLocationHelper.GetPathToDotNetFramework(
TargetDotNetFrameworkVersion
.Version30).ShouldBe(FrameworkLocationHelper.PathToDotNetFrameworkV30);
634
ToolLocationHelper.GetPathToDotNetFramework(
TargetDotNetFrameworkVersion
.Version35).ShouldBe(FrameworkLocationHelper.PathToDotNetFrameworkV35);
635
ToolLocationHelper.GetPathToDotNetFramework(
TargetDotNetFrameworkVersion
.Version40).ShouldBe(FrameworkLocationHelper.PathToDotNetFrameworkV40);
636
ToolLocationHelper.GetPathToDotNetFramework(
TargetDotNetFrameworkVersion
.VersionLatest).ShouldBe(FrameworkLocationHelper.PathToDotNetFrameworkV40);
637
ToolLocationHelper.GetPathToDotNetFramework(
TargetDotNetFrameworkVersion
.Latest).ShouldBe(FrameworkLocationHelper.PathToDotNetFrameworkV40);
639
ToolLocationHelper.GetPathToDotNetFramework(
TargetDotNetFrameworkVersion
.Version11, UtilitiesDotNetFrameworkArchitecture.Bitness32).ShouldBe(
641
ToolLocationHelper.GetPathToDotNetFramework(
TargetDotNetFrameworkVersion
.Version20, UtilitiesDotNetFrameworkArchitecture.Bitness32).ShouldBe(
643
ToolLocationHelper.GetPathToDotNetFramework(
TargetDotNetFrameworkVersion
.Version30, UtilitiesDotNetFrameworkArchitecture.Bitness32).ShouldBe(
645
ToolLocationHelper.GetPathToDotNetFramework(
TargetDotNetFrameworkVersion
.Version35, UtilitiesDotNetFrameworkArchitecture.Bitness32).ShouldBe(
648
ToolLocationHelper.GetPathToDotNetFramework(
TargetDotNetFrameworkVersion
.Version40, UtilitiesDotNetFrameworkArchitecture.Bitness32).ShouldBe(
650
ToolLocationHelper.GetPathToDotNetFramework(
TargetDotNetFrameworkVersion
.VersionLatest, UtilitiesDotNetFrameworkArchitecture.Bitness32).ShouldBe(
652
ToolLocationHelper.GetPathToDotNetFramework(
TargetDotNetFrameworkVersion
.Latest, UtilitiesDotNetFrameworkArchitecture.Bitness32).ShouldBe(
658
ToolLocationHelper.GetPathToDotNetFramework(
TargetDotNetFrameworkVersion
.Version11, UtilitiesDotNetFrameworkArchitecture.Bitness64).ShouldBe(
660
ToolLocationHelper.GetPathToDotNetFramework(
TargetDotNetFrameworkVersion
.Version20, UtilitiesDotNetFrameworkArchitecture.Bitness64).ShouldBe(
662
ToolLocationHelper.GetPathToDotNetFramework(
TargetDotNetFrameworkVersion
.Version30, UtilitiesDotNetFrameworkArchitecture.Bitness64).ShouldBe(
664
ToolLocationHelper.GetPathToDotNetFramework(
TargetDotNetFrameworkVersion
.Version35, UtilitiesDotNetFrameworkArchitecture.Bitness64).ShouldBe(
667
ToolLocationHelper.GetPathToDotNetFramework(
TargetDotNetFrameworkVersion
.Version40, UtilitiesDotNetFrameworkArchitecture.Bitness64).ShouldBe(
669
ToolLocationHelper.GetPathToDotNetFramework(
TargetDotNetFrameworkVersion
.VersionLatest, UtilitiesDotNetFrameworkArchitecture.Bitness64).ShouldBe(
671
ToolLocationHelper.GetPathToDotNetFramework(
TargetDotNetFrameworkVersion
.Latest, UtilitiesDotNetFrameworkArchitecture.Bitness64).ShouldBe(
679
string net20Path = ToolLocationHelper.GetPathToDotNetFrameworkFile(Constants.MSBuildExecutableName,
TargetDotNetFrameworkVersion
.Version20);
683
string net35Path = ToolLocationHelper.GetPathToDotNetFrameworkFile(Constants.MSBuildExecutableName,
TargetDotNetFrameworkVersion
.Version35);
687
ToolLocationHelper.GetPathToDotNetFrameworkFile(Constants.MSBuildExecutableName,
TargetDotNetFrameworkVersion
.Version40).ShouldBe(ToolLocationHelper.GetPathToBuildToolsFile(Constants.MSBuildExecutableName, "4.0"));
702
string net20Path = ToolLocationHelper.GetPathToDotNetFrameworkFile(Constants.MSBuildExecutableName,
TargetDotNetFrameworkVersion
.Version20, UtilitiesDotNetFrameworkArchitecture.Bitness32);
705
string net35Path = ToolLocationHelper.GetPathToDotNetFrameworkFile(Constants.MSBuildExecutableName,
TargetDotNetFrameworkVersion
.Version35, UtilitiesDotNetFrameworkArchitecture.Bitness32);
708
ToolLocationHelper.GetPathToDotNetFrameworkFile(Constants.MSBuildExecutableName,
TargetDotNetFrameworkVersion
.Version40, UtilitiesDotNetFrameworkArchitecture.Bitness32).ShouldBe(
724
Should.Throw<ArgumentException>(() => ToolLocationHelper.GetDotNetFrameworkSdkRootRegistryKey((
TargetDotNetFrameworkVersion
)99, vsVersion));
728
foreach (
var
dotNetVersion in EnumDotNetFrameworkVersions())
736
ToolLocationHelper.GetDotNetFrameworkSdkRootRegistryKey(
TargetDotNetFrameworkVersion
.Version11, vsVersion).ShouldBe(FrameworkLocationHelper.fullDotNetFrameworkRegistryKey);
739
ToolLocationHelper.GetDotNetFrameworkSdkRootRegistryKey(
TargetDotNetFrameworkVersion
.Version20, vsVersion).ShouldBe(FrameworkLocationHelper.fullDotNetFrameworkRegistryKey);
742
Should.Throw<ArgumentException>(() => ToolLocationHelper.GetDotNetFrameworkSdkRootRegistryKey(
TargetDotNetFrameworkVersion
.Version30, vsVersion));
745
ToolLocationHelper.GetDotNetFrameworkSdkRootRegistryKey(
TargetDotNetFrameworkVersion
.Version35, vsVersion).ShouldBe(
762
ToolLocationHelper.GetDotNetFrameworkSdkRootRegistryKey(
TargetDotNetFrameworkVersion
.Version40, VisualStudioVersion.Version100).ShouldBe(fullDotNetFrameworkSdkRegistryPathForV4ToolsOnManagedToolsSDK70A);
763
ToolLocationHelper.GetDotNetFrameworkSdkRootRegistryKey(
TargetDotNetFrameworkVersion
.Version40, VisualStudioVersion.Version110).ShouldBe(fullDotNetFrameworkSdkRegistryPathForV4ToolsOnManagedToolsSDK80A);
764
ToolLocationHelper.GetDotNetFrameworkSdkRootRegistryKey(
TargetDotNetFrameworkVersion
.Version40, VisualStudioVersion.Version120).ShouldBe(fullDotNetFrameworkSdkRegistryPathForV4ToolsOnManagedToolsSDK81A);
765
ToolLocationHelper.GetDotNetFrameworkSdkRootRegistryKey(
TargetDotNetFrameworkVersion
.Version40, VisualStudioVersion.Version140).ShouldBe(fullDotNetFrameworkSdkRegistryPathForV4ToolsOnManagedToolsSDK46);
768
ToolLocationHelper.GetDotNetFrameworkSdkRootRegistryKey(
TargetDotNetFrameworkVersion
.Version45, VisualStudioVersion.Version100).ShouldBe(fullDotNetFrameworkSdkRegistryPathForV4ToolsOnManagedToolsSDK80A);
769
ToolLocationHelper.GetDotNetFrameworkSdkRootRegistryKey(
TargetDotNetFrameworkVersion
.Version45, VisualStudioVersion.Version110).ShouldBe(fullDotNetFrameworkSdkRegistryPathForV4ToolsOnManagedToolsSDK80A);
770
ToolLocationHelper.GetDotNetFrameworkSdkRootRegistryKey(
TargetDotNetFrameworkVersion
.Version45, VisualStudioVersion.Version120).ShouldBe(fullDotNetFrameworkSdkRegistryPathForV4ToolsOnManagedToolsSDK81A);
771
ToolLocationHelper.GetDotNetFrameworkSdkRootRegistryKey(
TargetDotNetFrameworkVersion
.Version45, VisualStudioVersion.Version140).ShouldBe(fullDotNetFrameworkSdkRegistryPathForV4ToolsOnManagedToolsSDK46);
774
Should.Throw<ArgumentException>(() => ToolLocationHelper.GetDotNetFrameworkSdkRootRegistryKey(
TargetDotNetFrameworkVersion
.Version451, VisualStudioVersion.Version100));
775
Should.Throw<ArgumentException>(() => ToolLocationHelper.GetDotNetFrameworkSdkRootRegistryKey(
TargetDotNetFrameworkVersion
.Version451, VisualStudioVersion.Version110));
776
ToolLocationHelper.GetDotNetFrameworkSdkRootRegistryKey(
TargetDotNetFrameworkVersion
.Version451, VisualStudioVersion.Version120).ShouldBe(fullDotNetFrameworkSdkRegistryPathForV4ToolsOnManagedToolsSDK81A);
777
ToolLocationHelper.GetDotNetFrameworkSdkRootRegistryKey(
TargetDotNetFrameworkVersion
.Version451, VisualStudioVersion.Version140).ShouldBe(fullDotNetFrameworkSdkRegistryPathForV4ToolsOnManagedToolsSDK46);
780
Should.Throw<ArgumentException>(() => ToolLocationHelper.GetDotNetFrameworkSdkRootRegistryKey(
TargetDotNetFrameworkVersion
.Version452, VisualStudioVersion.Version100));
781
Should.Throw<ArgumentException>(() => ToolLocationHelper.GetDotNetFrameworkSdkRootRegistryKey(
TargetDotNetFrameworkVersion
.Version452, VisualStudioVersion.Version110));
782
ToolLocationHelper.GetDotNetFrameworkSdkRootRegistryKey(
TargetDotNetFrameworkVersion
.Version452, VisualStudioVersion.Version120).ShouldBe(fullDotNetFrameworkSdkRegistryPathForV4ToolsOnManagedToolsSDK81A);
783
ToolLocationHelper.GetDotNetFrameworkSdkRootRegistryKey(
TargetDotNetFrameworkVersion
.Version452, VisualStudioVersion.Version140).ShouldBe(fullDotNetFrameworkSdkRegistryPathForV4ToolsOnManagedToolsSDK46);
786
Should.Throw<ArgumentException>(() => ToolLocationHelper.GetDotNetFrameworkSdkRootRegistryKey(
TargetDotNetFrameworkVersion
.Version46, VisualStudioVersion.Version100));
787
Should.Throw<ArgumentException>(() => ToolLocationHelper.GetDotNetFrameworkSdkRootRegistryKey(
TargetDotNetFrameworkVersion
.Version46, VisualStudioVersion.Version110));
788
Should.Throw<ArgumentException>(() => ToolLocationHelper.GetDotNetFrameworkSdkRootRegistryKey(
TargetDotNetFrameworkVersion
.Version46, VisualStudioVersion.Version120));
789
ToolLocationHelper.GetDotNetFrameworkSdkRootRegistryKey(
TargetDotNetFrameworkVersion
.Version46, VisualStudioVersion.Version140).ShouldBe(fullDotNetFrameworkSdkRegistryPathForV4ToolsOnManagedToolsSDK46);
792
Should.Throw<ArgumentException>(() => ToolLocationHelper.GetDotNetFrameworkSdkRootRegistryKey(
TargetDotNetFrameworkVersion
.Version461, VisualStudioVersion.Version100));
793
Should.Throw<ArgumentException>(() => ToolLocationHelper.GetDotNetFrameworkSdkRootRegistryKey(
TargetDotNetFrameworkVersion
.Version461, VisualStudioVersion.Version110));
794
Should.Throw<ArgumentException>(() => ToolLocationHelper.GetDotNetFrameworkSdkRootRegistryKey(
TargetDotNetFrameworkVersion
.Version461, VisualStudioVersion.Version120));
795
ToolLocationHelper.GetDotNetFrameworkSdkRootRegistryKey(
TargetDotNetFrameworkVersion
.Version461, VisualStudioVersion.Version140).ShouldBe(fullDotNetFrameworkSdkRegistryPathForV4ToolsOnManagedToolsSDK461);
798
Should.Throw<ArgumentException>(() => ToolLocationHelper.GetDotNetFrameworkSdkRootRegistryKey(
TargetDotNetFrameworkVersion
.Version462, VisualStudioVersion.Version100));
799
Should.Throw<ArgumentException>(() => ToolLocationHelper.GetDotNetFrameworkSdkRootRegistryKey(
TargetDotNetFrameworkVersion
.Version462, VisualStudioVersion.Version110));
800
Should.Throw<ArgumentException>(() => ToolLocationHelper.GetDotNetFrameworkSdkRootRegistryKey(
TargetDotNetFrameworkVersion
.Version462, VisualStudioVersion.Version120));
801
ToolLocationHelper.GetDotNetFrameworkSdkRootRegistryKey(
TargetDotNetFrameworkVersion
.Version462, VisualStudioVersion.Version150).ShouldBe(fullDotNetFrameworkSdkRegistryPathForV4ToolsOnManagedToolsSDK462);
804
Should.Throw<ArgumentException>(() => ToolLocationHelper.GetDotNetFrameworkSdkRootRegistryKey(
TargetDotNetFrameworkVersion
.Version47, VisualStudioVersion.Version100));
805
Should.Throw<ArgumentException>(() => ToolLocationHelper.GetDotNetFrameworkSdkRootRegistryKey(
TargetDotNetFrameworkVersion
.Version47, VisualStudioVersion.Version110));
806
Should.Throw<ArgumentException>(() => ToolLocationHelper.GetDotNetFrameworkSdkRootRegistryKey(
TargetDotNetFrameworkVersion
.Version47, VisualStudioVersion.Version120));
807
ToolLocationHelper.GetDotNetFrameworkSdkRootRegistryKey(
TargetDotNetFrameworkVersion
.Version47, VisualStudioVersion.Version150).ShouldBe(fullDotNetFrameworkSdkRegistryPathForV4ToolsOnManagedToolsSDK47);
810
Should.Throw<ArgumentException>(() => ToolLocationHelper.GetDotNetFrameworkSdkRootRegistryKey(
TargetDotNetFrameworkVersion
.Version471, VisualStudioVersion.Version100));
811
Should.Throw<ArgumentException>(() => ToolLocationHelper.GetDotNetFrameworkSdkRootRegistryKey(
TargetDotNetFrameworkVersion
.Version471, VisualStudioVersion.Version110));
812
Should.Throw<ArgumentException>(() => ToolLocationHelper.GetDotNetFrameworkSdkRootRegistryKey(
TargetDotNetFrameworkVersion
.Version471, VisualStudioVersion.Version120));
813
ToolLocationHelper.GetDotNetFrameworkSdkRootRegistryKey(
TargetDotNetFrameworkVersion
.Version471, VisualStudioVersion.Version150).ShouldBe(fullDotNetFrameworkSdkRegistryPathForV4ToolsOnManagedToolsSDK471);
816
Should.Throw<ArgumentException>(() => ToolLocationHelper.GetDotNetFrameworkSdkRootRegistryKey(
TargetDotNetFrameworkVersion
.Version472, VisualStudioVersion.Version100));
817
Should.Throw<ArgumentException>(() => ToolLocationHelper.GetDotNetFrameworkSdkRootRegistryKey(
TargetDotNetFrameworkVersion
.Version472, VisualStudioVersion.Version110));
818
Should.Throw<ArgumentException>(() => ToolLocationHelper.GetDotNetFrameworkSdkRootRegistryKey(
TargetDotNetFrameworkVersion
.Version472, VisualStudioVersion.Version120));
819
ToolLocationHelper.GetDotNetFrameworkSdkRootRegistryKey(
TargetDotNetFrameworkVersion
.Version472, VisualStudioVersion.Version150).ShouldBe(fullDotNetFrameworkSdkRegistryPathForV4ToolsOnManagedToolsSDK472);
822
Should.Throw<ArgumentException>(() => ToolLocationHelper.GetDotNetFrameworkSdkRootRegistryKey(
TargetDotNetFrameworkVersion
.Version48, VisualStudioVersion.Version100));
823
Should.Throw<ArgumentException>(() => ToolLocationHelper.GetDotNetFrameworkSdkRootRegistryKey(
TargetDotNetFrameworkVersion
.Version48, VisualStudioVersion.Version110));
824
Should.Throw<ArgumentException>(() => ToolLocationHelper.GetDotNetFrameworkSdkRootRegistryKey(
TargetDotNetFrameworkVersion
.Version48, VisualStudioVersion.Version120));
825
Should.Throw<ArgumentException>(() => ToolLocationHelper.GetDotNetFrameworkSdkRootRegistryKey(
TargetDotNetFrameworkVersion
.Version48, VisualStudioVersion.Version140));
826
ToolLocationHelper.GetDotNetFrameworkSdkRootRegistryKey(
TargetDotNetFrameworkVersion
.Version48, VisualStudioVersion.Version150).ShouldBe(fullDotNetFrameworkSdkRegistryPathForV4ToolsOnManagedToolsSDK48);
827
ToolLocationHelper.GetDotNetFrameworkSdkRootRegistryKey(
TargetDotNetFrameworkVersion
.Version48, VisualStudioVersion.Version160).ShouldBe(fullDotNetFrameworkSdkRegistryPathForV4ToolsOnManagedToolsSDK48);
828
ToolLocationHelper.GetDotNetFrameworkSdkRootRegistryKey(
TargetDotNetFrameworkVersion
.Version48, VisualStudioVersion.Version170).ShouldBe(fullDotNetFrameworkSdkRegistryPathForV4ToolsOnManagedToolsSDK48);
831
Should.Throw<ArgumentException>(() => ToolLocationHelper.GetDotNetFrameworkSdkRootRegistryKey(
TargetDotNetFrameworkVersion
.Version481, VisualStudioVersion.Version100));
832
Should.Throw<ArgumentException>(() => ToolLocationHelper.GetDotNetFrameworkSdkRootRegistryKey(
TargetDotNetFrameworkVersion
.Version481, VisualStudioVersion.Version110));
833
Should.Throw<ArgumentException>(() => ToolLocationHelper.GetDotNetFrameworkSdkRootRegistryKey(
TargetDotNetFrameworkVersion
.Version481, VisualStudioVersion.Version120));
834
Should.Throw<ArgumentException>(() => ToolLocationHelper.GetDotNetFrameworkSdkRootRegistryKey(
TargetDotNetFrameworkVersion
.Version481, VisualStudioVersion.Version140));
835
Should.Throw<ArgumentException>(() => ToolLocationHelper.GetDotNetFrameworkSdkRootRegistryKey(
TargetDotNetFrameworkVersion
.Version481, VisualStudioVersion.Version150));
836
Should.Throw<ArgumentException>(() => ToolLocationHelper.GetDotNetFrameworkSdkRootRegistryKey(
TargetDotNetFrameworkVersion
.Version481, VisualStudioVersion.Version160));
837
ToolLocationHelper.GetDotNetFrameworkSdkRootRegistryKey(
TargetDotNetFrameworkVersion
.Version481, VisualStudioVersion.Version170).ShouldBe(fullDotNetFrameworkSdkRegistryPathForV4ToolsOnManagedToolsSDK481);
840
ToolLocationHelper.GetDotNetFrameworkSdkRootRegistryKey(
TargetDotNetFrameworkVersion
.Latest, VisualStudioVersion.Version170).ShouldBe(fullDotNetFrameworkSdkRegistryPathForV4ToolsOnManagedToolsSDK481);
849
Should.Throw<ArgumentException>(() => ToolLocationHelper.GetDotNetFrameworkSdkInstallKeyValue((
TargetDotNetFrameworkVersion
)99, vsVersion));
853
foreach (
var
dotNetVersion in EnumDotNetFrameworkVersions())
863
ToolLocationHelper.GetDotNetFrameworkSdkInstallKeyValue(
TargetDotNetFrameworkVersion
.Version11, vsVersion).ShouldBe(FrameworkLocationHelper.dotNetFrameworkSdkInstallKeyValueV11);
866
ToolLocationHelper.GetDotNetFrameworkSdkInstallKeyValue(
TargetDotNetFrameworkVersion
.Version20, vsVersion).ShouldBe(FrameworkLocationHelper.dotNetFrameworkSdkInstallKeyValueV20);
869
Should.Throw<ArgumentException>(() => ToolLocationHelper.GetDotNetFrameworkSdkInstallKeyValue(
TargetDotNetFrameworkVersion
.Version30, vsVersion));
872
ToolLocationHelper.GetDotNetFrameworkSdkInstallKeyValue(
TargetDotNetFrameworkVersion
.Version35, vsVersion).ShouldBe(InstallationFolder);
875
ToolLocationHelper.GetDotNetFrameworkSdkInstallKeyValue(
TargetDotNetFrameworkVersion
.Version40, vsVersion).ShouldBe(InstallationFolder);
878
ToolLocationHelper.GetDotNetFrameworkSdkInstallKeyValue(
TargetDotNetFrameworkVersion
.Version45, vsVersion).ShouldBe(InstallationFolder);
882
Should.Throw<ArgumentException>(() => ToolLocationHelper.GetDotNetFrameworkSdkInstallKeyValue(
TargetDotNetFrameworkVersion
.Version451, VisualStudioVersion.Version100));
883
Should.Throw<ArgumentException>(() => ToolLocationHelper.GetDotNetFrameworkSdkInstallKeyValue(
TargetDotNetFrameworkVersion
.Version451, VisualStudioVersion.Version110));
884
ToolLocationHelper.GetDotNetFrameworkSdkInstallKeyValue(
TargetDotNetFrameworkVersion
.Version451, VisualStudioVersion.Version120).ShouldBe(InstallationFolder);
885
ToolLocationHelper.GetDotNetFrameworkSdkInstallKeyValue(
TargetDotNetFrameworkVersion
.Version451, VisualStudioVersion.Version140).ShouldBe(InstallationFolder);
888
Should.Throw<ArgumentException>(() => ToolLocationHelper.GetDotNetFrameworkSdkInstallKeyValue(
TargetDotNetFrameworkVersion
.Version46, VisualStudioVersion.Version100));
889
Should.Throw<ArgumentException>(() => ToolLocationHelper.GetDotNetFrameworkSdkInstallKeyValue(
TargetDotNetFrameworkVersion
.Version46, VisualStudioVersion.Version110));
890
Should.Throw<ArgumentException>(() => ToolLocationHelper.GetDotNetFrameworkSdkInstallKeyValue(
TargetDotNetFrameworkVersion
.Version46, VisualStudioVersion.Version120));
891
ToolLocationHelper.GetDotNetFrameworkSdkInstallKeyValue(
TargetDotNetFrameworkVersion
.Version46, VisualStudioVersion.Version140).ShouldBe(InstallationFolder);
904
Should.Throw<ArgumentException>(() => ToolLocationHelper.GetPathToDotNetFrameworkSdk((
TargetDotNetFrameworkVersion
)99, vsVersion));
908
foreach (
var
dotNetVersion in EnumDotNetFrameworkVersions())
938
ToolLocationHelper.GetPathToDotNetFrameworkSdk(
TargetDotNetFrameworkVersion
.Version11, vsVersion).ShouldBe(FrameworkLocationHelper.PathToDotNetFrameworkSdkV11);
941
ToolLocationHelper.GetPathToDotNetFrameworkSdk(
TargetDotNetFrameworkVersion
.Version20, vsVersion).ShouldBe(FrameworkLocationHelper.PathToDotNetFrameworkSdkV20);
944
Should.Throw<ArgumentException>(() => ToolLocationHelper.GetPathToDotNetFrameworkSdk(
TargetDotNetFrameworkVersion
.Version30, vsVersion));
947
ToolLocationHelper.GetPathToDotNetFrameworkSdk(
TargetDotNetFrameworkVersion
.Version35, vsVersion).ShouldBe(pathToSdk35InstallRoot);
951
ToolLocationHelper.GetPathToDotNetFrameworkSdk(
TargetDotNetFrameworkVersion
.Version40, VisualStudioVersion.Version100).ShouldBe(pathToSdkV4InstallRootOnVS10);
952
ToolLocationHelper.GetPathToDotNetFrameworkSdk(
TargetDotNetFrameworkVersion
.Version40, VisualStudioVersion.Version110).ShouldBe(pathToSdkV4InstallRootOnVS11);
953
ToolLocationHelper.GetPathToDotNetFrameworkSdk(
TargetDotNetFrameworkVersion
.Version40, VisualStudioVersion.Version120).ShouldBe(pathToSdkV4InstallRootOnVS12);
954
ToolLocationHelper.GetPathToDotNetFrameworkSdk(
TargetDotNetFrameworkVersion
.Version40, VisualStudioVersion.Version140).ShouldBe(pathToSdkV4InstallRootOnVS14);
957
ToolLocationHelper.GetPathToDotNetFrameworkSdk(
TargetDotNetFrameworkVersion
.Version45, VisualStudioVersion.Version100).ShouldBe(pathToSdkV4InstallRootOnVS11);
958
ToolLocationHelper.GetPathToDotNetFrameworkSdk(
TargetDotNetFrameworkVersion
.Version45, VisualStudioVersion.Version110).ShouldBe(pathToSdkV4InstallRootOnVS11);
959
ToolLocationHelper.GetPathToDotNetFrameworkSdk(
TargetDotNetFrameworkVersion
.Version45, VisualStudioVersion.Version120).ShouldBe(pathToSdkV4InstallRootOnVS12);
960
ToolLocationHelper.GetPathToDotNetFrameworkSdk(
TargetDotNetFrameworkVersion
.Version45, VisualStudioVersion.Version140).ShouldBe(pathToSdkV4InstallRootOnVS14);
963
Should.Throw<ArgumentException>(() => ToolLocationHelper.GetPathToDotNetFrameworkSdk(
TargetDotNetFrameworkVersion
.Version451, VisualStudioVersion.Version100));
964
Should.Throw<ArgumentException>(() => ToolLocationHelper.GetPathToDotNetFrameworkSdk(
TargetDotNetFrameworkVersion
.Version451, VisualStudioVersion.Version110));
965
ToolLocationHelper.GetPathToDotNetFrameworkSdk(
TargetDotNetFrameworkVersion
.Version451, VisualStudioVersion.Version120).ShouldBe(pathToSdkV4InstallRootOnVS12);
966
ToolLocationHelper.GetPathToDotNetFrameworkSdk(
TargetDotNetFrameworkVersion
.Version451, VisualStudioVersion.Version140).ShouldBe(pathToSdkV4InstallRootOnVS14);
969
Should.Throw<ArgumentException>(() => ToolLocationHelper.GetPathToDotNetFrameworkSdk(
TargetDotNetFrameworkVersion
.Version46, VisualStudioVersion.Version100));
970
Should.Throw<ArgumentException>(() => ToolLocationHelper.GetPathToDotNetFrameworkSdk(
TargetDotNetFrameworkVersion
.Version46, VisualStudioVersion.Version110));
971
Should.Throw<ArgumentException>(() => ToolLocationHelper.GetPathToDotNetFrameworkSdk(
TargetDotNetFrameworkVersion
.Version46, VisualStudioVersion.Version120));
972
ToolLocationHelper.GetPathToDotNetFrameworkSdk(
TargetDotNetFrameworkVersion
.Version46, VisualStudioVersion.Version140).ShouldBe(pathToSdkV4InstallRootOnVS14);
1917
if (ToolLocationHelper.GetPathToDotNetFrameworkReferenceAssemblies(
TargetDotNetFrameworkVersion
.Version48) != null)
1923
string referenceAssemblyPath = ToolLocationHelper.GetPathToDotNetFrameworkReferenceAssemblies(
TargetDotNetFrameworkVersion
.Version48);
2779
private static IEnumerable<
TargetDotNetFrameworkVersion
> EnumDotNetFrameworkVersions()
2781
for (
TargetDotNetFrameworkVersion
dotNetVersion =
TargetDotNetFrameworkVersion
.Version11; dotNetVersion <=
TargetDotNetFrameworkVersion
.VersionLatest; ++dotNetVersion)
2852
private string GetDotNetFrameworkReferenceAssemblies(
TargetDotNetFrameworkVersion
version)
2856
case
TargetDotNetFrameworkVersion
.Version40:
2860
case
TargetDotNetFrameworkVersion
.Version35:
2864
case
TargetDotNetFrameworkVersion
.Version30:
2879
private string GetDotNetFramework(
TargetDotNetFrameworkVersion
version)
2883
case
TargetDotNetFrameworkVersion
.Version20:
2887
case
TargetDotNetFrameworkVersion
.Version30:
2891
case
TargetDotNetFrameworkVersion
.Version35:
2895
case
TargetDotNetFrameworkVersion
.Version40: