247 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)
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)
859
string netFrameworkDirectory = ToolLocationHelper.GetPathToDotNetFrameworkReferenceAssemblies(
TargetDotNetFrameworkVersion
.Version45);
Evaluation\Expander_Tests.cs (1)
1950
if (ToolLocationHelper.GetPathToDotNetFrameworkReferenceAssemblies(
TargetDotNetFrameworkVersion
.Version48) == null)
Microsoft.Build.Tasks.CodeAnalysis (1)
ManagedCompiler.cs (1)
1207
TargetDotNetFrameworkVersion
.Version46
Microsoft.Build.Tasks.Core (26)
AddToWin32Manifest.cs (1)
101
string? defaultManifestPath = ToolLocationHelper.GetPathToDotNetFrameworkFile(DefaultManifestName,
TargetDotNetFrameworkVersion
.Version46);
GetFrameworkPath.cs (16)
35
private static readonly Lazy<string> s_path = new Lazy<string>(() => ToolLocationHelper.GetPathToDotNetFramework(
TargetDotNetFrameworkVersion
.Latest));
36
private static readonly Lazy<string> s_version11Path = new Lazy<string>(() => ToolLocationHelper.GetPathToDotNetFramework(
TargetDotNetFrameworkVersion
.Version11));
37
private static readonly Lazy<string> s_version20Path = new Lazy<string>(() => ToolLocationHelper.GetPathToDotNetFramework(
TargetDotNetFrameworkVersion
.Version20));
38
private static readonly Lazy<string> s_version30Path = new Lazy<string>(() => ToolLocationHelper.GetPathToDotNetFramework(
TargetDotNetFrameworkVersion
.Version30));
39
private static readonly Lazy<string> s_version35Path = new Lazy<string>(() => ToolLocationHelper.GetPathToDotNetFramework(
TargetDotNetFrameworkVersion
.Version35));
40
private static readonly Lazy<string> s_version40Path = new Lazy<string>(() => ToolLocationHelper.GetPathToDotNetFramework(
TargetDotNetFrameworkVersion
.Version40));
41
private static readonly Lazy<string> s_version45Path = new Lazy<string>(() => ToolLocationHelper.GetPathToDotNetFramework(
TargetDotNetFrameworkVersion
.Version45));
42
private static readonly Lazy<string> s_version451Path = new Lazy<string>(() => ToolLocationHelper.GetPathToDotNetFramework(
TargetDotNetFrameworkVersion
.Version451));
43
private static readonly Lazy<string> s_version452Path = new Lazy<string>(() => ToolLocationHelper.GetPathToDotNetFramework(
TargetDotNetFrameworkVersion
.Version452));
44
private static readonly Lazy<string> s_version46Path = new Lazy<string>(() => ToolLocationHelper.GetPathToDotNetFramework(
TargetDotNetFrameworkVersion
.Version46));
45
private static readonly Lazy<string> s_version461Path = new Lazy<string>(() => ToolLocationHelper.GetPathToDotNetFramework(
TargetDotNetFrameworkVersion
.Version461));
46
private static readonly Lazy<string> s_version462Path = new Lazy<string>(() => ToolLocationHelper.GetPathToDotNetFramework(
TargetDotNetFrameworkVersion
.Version462));
47
private static readonly Lazy<string> s_version47Path = new Lazy<string>(() => ToolLocationHelper.GetPathToDotNetFramework(
TargetDotNetFrameworkVersion
.Version47));
48
private static readonly Lazy<string> s_version471Path = new Lazy<string>(() => ToolLocationHelper.GetPathToDotNetFramework(
TargetDotNetFrameworkVersion
.Version471));
49
private static readonly Lazy<string> s_version472Path = new Lazy<string>(() => ToolLocationHelper.GetPathToDotNetFramework(
TargetDotNetFrameworkVersion
.Version472));
50
private static readonly Lazy<string> s_version48Path = new Lazy<string>(() => ToolLocationHelper.GetPathToDotNetFramework(
TargetDotNetFrameworkVersion
.Version48));
ManifestUtil\SecurityUtil.cs (3)
854
string toolPath = ToolLocationHelper.GetPathToWindowsSdkFile(ToolName,
TargetDotNetFrameworkVersion
.VersionLatest, VisualStudioVersion.VersionLatest);
857
toolPath = ToolLocationHelper.GetPathToWindowsSdkFile(ToolName,
TargetDotNetFrameworkVersion
.Version45,
862
var pathToDotNetFrameworkSdk = ToolLocationHelper.GetPathToDotNetFrameworkSdk(
TargetDotNetFrameworkVersion
.Version40, VisualStudioVersion.Version100);
RedistList.cs (4)
217
string frameworkVersion20Path = ToolLocationHelper.GetPathToDotNetFramework(
TargetDotNetFrameworkVersion
.Version20);
240
return GetFrameworkListFromReferenceAssembliesPath(
TargetDotNetFrameworkVersion
.Version30);
250
return GetFrameworkListFromReferenceAssembliesPath(
TargetDotNetFrameworkVersion
.Version35);
269
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)
291
internal delegate string VersionToPath(
TargetDotNetFrameworkVersion
version);
1630
public static string GetDotNetFrameworkVersionFolderPrefix(
TargetDotNetFrameworkVersion
version) => FrameworkLocationHelper.GetDotNetFrameworkVersionFolderPrefix(TargetDotNetFrameworkVersionToSystemVersion(version));
1637
public static string GetDotNetFrameworkRootRegistryKey(
TargetDotNetFrameworkVersion
version) => FrameworkLocationHelper.fullDotNetFrameworkRegistryKey;
1646
public static string GetDotNetFrameworkSdkRootRegistryKey(
TargetDotNetFrameworkVersion
version) => GetDotNetFrameworkSdkRootRegistryKey(version, VisualStudioVersion.VersionLatest);
1653
public static string GetDotNetFrameworkSdkRootRegistryKey(
TargetDotNetFrameworkVersion
version, VisualStudioVersion visualStudioVersion)
1667
public static string GetDotNetFrameworkSdkInstallKeyValue(
TargetDotNetFrameworkVersion
version) => GetDotNetFrameworkSdkInstallKeyValue(version, VisualStudioVersion.VersionLatest);
1674
public static string GetDotNetFrameworkSdkInstallKeyValue(
TargetDotNetFrameworkVersion
version, VisualStudioVersion visualStudioVersion)
1686
public static string GetPathToDotNetFramework(
TargetDotNetFrameworkVersion
version) => GetPathToDotNetFramework(version, UtilitiesDotNetFrameworkArchitecture.Current);
1694
public static string GetPathToDotNetFramework(
TargetDotNetFrameworkVersion
version, UtilitiesDotNetFrameworkArchitecture architecture)
1708
public static string GetPathToDotNetFrameworkSdk() => GetPathToDotNetFrameworkSdk(
TargetDotNetFrameworkVersion
.Latest);
1718
public static string GetPathToDotNetFrameworkSdk(
TargetDotNetFrameworkVersion
version) => GetPathToDotNetFrameworkSdk(version, VisualStudioVersion.VersionLatest);
1723
/// <param name="version">The <see cref="
TargetDotNetFrameworkVersion
"/> of the .NET Framework.</param>
1726
public static string GetPathToDotNetFrameworkSdk(
TargetDotNetFrameworkVersion
version, VisualStudioVersion visualStudioVersion)
1738
public static string GetPathToDotNetFrameworkReferenceAssemblies(
TargetDotNetFrameworkVersion
version)
1948
private static string VersionToDotNetFrameworkPath(VersionToPath PathToDotNetFramework,
TargetDotNetFrameworkVersion
version)
1957
private static string VersionToDotNetReferenceAssemblies(VersionToPath PathToDotReferenceAssemblies,
TargetDotNetFrameworkVersion
version)
1994
private static string GetPathToDotNetFrameworkSdkToolsFolderRoot(
TargetDotNetFrameworkVersion
version, VisualStudioVersion visualStudioVersion)
2001
private static Version TargetDotNetFrameworkVersionToSystemVersion(
TargetDotNetFrameworkVersion
version)
2005
case
TargetDotNetFrameworkVersion
.Version11:
2008
case
TargetDotNetFrameworkVersion
.Version20:
2011
case
TargetDotNetFrameworkVersion
.Version30:
2014
case
TargetDotNetFrameworkVersion
.Version35:
2017
case
TargetDotNetFrameworkVersion
.Version40:
2020
case
TargetDotNetFrameworkVersion
.Version45:
2023
case
TargetDotNetFrameworkVersion
.Version451:
2026
case
TargetDotNetFrameworkVersion
.Version452:
2029
case
TargetDotNetFrameworkVersion
.Version46:
2032
case
TargetDotNetFrameworkVersion
.Version461:
2035
case
TargetDotNetFrameworkVersion
.Version462:
2038
case
TargetDotNetFrameworkVersion
.Version47:
2041
case
TargetDotNetFrameworkVersion
.Version471:
2044
case
TargetDotNetFrameworkVersion
.Version472:
2047
case
TargetDotNetFrameworkVersion
.Version48:
2050
case
TargetDotNetFrameworkVersion
.Version481:
2051
case
TargetDotNetFrameworkVersion
.Latest: // Latest is a special value to indicate the highest version we know about.
2106
string referenceAssemblyPath = VersionToDotNetReferenceAssemblies(PathToReferenceAssemblies,
TargetDotNetFrameworkVersion
.Version35);
2107
string dotNetFrameworkPath = VersionToDotNetFrameworkPath(PathToDotNetFramework,
TargetDotNetFrameworkVersion
.Version35);
2132
string referenceAssemblyPath = VersionToDotNetReferenceAssemblies(PathToReferenceAssemblies,
TargetDotNetFrameworkVersion
.Version30);
2133
string dotNetFrameworkPath = VersionToDotNetFrameworkPath(PathToDotNetFramework,
TargetDotNetFrameworkVersion
.Version30);
2156
string referencePath = VersionToDotNetFrameworkPath(PathToDotNetFramework,
TargetDotNetFrameworkVersion
.Version20);
3233
=> GetPathToDotNetFrameworkSdkFile(fileName,
TargetDotNetFrameworkVersion
.Latest);
3244
public static string GetPathToDotNetFrameworkSdkFile(string fileName,
TargetDotNetFrameworkVersion
version)
3254
public static string GetPathToDotNetFrameworkSdkFile(string fileName,
TargetDotNetFrameworkVersion
version, VisualStudioVersion visualStudioVersion)
3269
public static string GetPathToDotNetFrameworkSdkFile(string fileName,
TargetDotNetFrameworkVersion
version, UtilitiesDotNetFrameworkArchitecture architecture) => GetPathToDotNetFrameworkSdkFile(fileName, version, VisualStudioVersion.VersionLatest, architecture);
3279
public static string GetPathToDotNetFrameworkSdkFile(string fileName,
TargetDotNetFrameworkVersion
version, VisualStudioVersion visualStudioVersion, UtilitiesDotNetFrameworkArchitecture architecture)
3298
private static string GetPathToDotNetFrameworkSdkFile(string fileName,
TargetDotNetFrameworkVersion
version, VisualStudioVersion visualStudioVersion, UtilitiesDotNetFrameworkArchitecture architecture, bool canFallBackIfNecessary)
3414
public static string GetPathToWindowsSdk(
TargetDotNetFrameworkVersion
version, VisualStudioVersion visualStudioVersion)
3426
public static string GetPathToWindowsSdkFile(string fileName,
TargetDotNetFrameworkVersion
version, VisualStudioVersion visualStudioVersion)
3444
public static string GetPathToWindowsSdkFile(string fileName,
TargetDotNetFrameworkVersion
version, VisualStudioVersion visualStudioVersion, DotNetFrameworkArchitecture architecture)
3463
private static string GetPathToWindowsSdkFile(string fileName,
TargetDotNetFrameworkVersion
version, VisualStudioVersion visualStudioVersion, DotNetFrameworkArchitecture architecture, bool canFallBackIfNecessary)
3552
"2.0" => GetPathToDotNetFramework(
TargetDotNetFrameworkVersion
.Version20, architecture),
3553
"3.5" => GetPathToDotNetFramework(
TargetDotNetFrameworkVersion
.Version35, architecture),
3554
"4.0" => GetPathToDotNetFramework(
TargetDotNetFrameworkVersion
.Version40, architecture),
3602
public static string GetPathToDotNetFrameworkFile(string fileName,
TargetDotNetFrameworkVersion
version) => GetPathToDotNetFrameworkFile(fileName, version, UtilitiesDotNetFrameworkArchitecture.Current);
3611
public static string GetPathToDotNetFrameworkFile(string fileName,
TargetDotNetFrameworkVersion
version, UtilitiesDotNetFrameworkArchitecture architecture)
3801
string dotNetFx20Path = GetPathToDotNetFramework(
TargetDotNetFrameworkVersion
.Version20);
3936
string dotNetFx35Path = GetPathToDotNetFramework(
TargetDotNetFrameworkVersion
.Version35);
3943
string dotNetFx20Path = GetPathToDotNetFramework(
TargetDotNetFrameworkVersion
.Version20);
Microsoft.Build.Utilities.UnitTests (151)
ToolLocationHelper_Tests.cs (151)
513
ToolLocationHelper.GetDotNetFrameworkVersionFolderPrefix(
TargetDotNetFrameworkVersion
.Version40),
624
ToolLocationHelper.GetDotNetFrameworkVersionFolderPrefix(
TargetDotNetFrameworkVersion
.Version11).ShouldBe(FrameworkLocationHelper.dotNetFrameworkVersionFolderPrefixV11);
625
ToolLocationHelper.GetDotNetFrameworkVersionFolderPrefix(
TargetDotNetFrameworkVersion
.Version20).ShouldBe(FrameworkLocationHelper.dotNetFrameworkVersionFolderPrefixV20);
626
ToolLocationHelper.GetDotNetFrameworkVersionFolderPrefix(
TargetDotNetFrameworkVersion
.Version30).ShouldBe(FrameworkLocationHelper.dotNetFrameworkVersionFolderPrefixV30);
627
ToolLocationHelper.GetDotNetFrameworkVersionFolderPrefix(
TargetDotNetFrameworkVersion
.Version35).ShouldBe(FrameworkLocationHelper.dotNetFrameworkVersionFolderPrefixV35);
628
ToolLocationHelper.GetDotNetFrameworkVersionFolderPrefix(
TargetDotNetFrameworkVersion
.Version40).ShouldBe(FrameworkLocationHelper.dotNetFrameworkVersionFolderPrefixV40);
629
ToolLocationHelper.GetDotNetFrameworkVersionFolderPrefix(
TargetDotNetFrameworkVersion
.VersionLatest).ShouldBe(FrameworkLocationHelper.dotNetFrameworkVersionFolderPrefixV40);
630
ToolLocationHelper.GetDotNetFrameworkRootRegistryKey(
TargetDotNetFrameworkVersion
.VersionLatest).ShouldBe(FrameworkLocationHelper.fullDotNetFrameworkRegistryKey);
631
ToolLocationHelper.GetDotNetFrameworkVersionFolderPrefix(
TargetDotNetFrameworkVersion
.Latest).ShouldBe(FrameworkLocationHelper.dotNetFrameworkVersionFolderPrefixV40);
632
ToolLocationHelper.GetDotNetFrameworkRootRegistryKey(
TargetDotNetFrameworkVersion
.Latest).ShouldBe(FrameworkLocationHelper.fullDotNetFrameworkRegistryKey);
634
ToolLocationHelper.GetPathToDotNetFramework(
TargetDotNetFrameworkVersion
.Version11).ShouldBe(FrameworkLocationHelper.PathToDotNetFrameworkV11);
635
ToolLocationHelper.GetPathToDotNetFramework(
TargetDotNetFrameworkVersion
.Version20).ShouldBe(FrameworkLocationHelper.PathToDotNetFrameworkV20);
636
ToolLocationHelper.GetPathToDotNetFramework(
TargetDotNetFrameworkVersion
.Version30).ShouldBe(FrameworkLocationHelper.PathToDotNetFrameworkV30);
637
ToolLocationHelper.GetPathToDotNetFramework(
TargetDotNetFrameworkVersion
.Version35).ShouldBe(FrameworkLocationHelper.PathToDotNetFrameworkV35);
638
ToolLocationHelper.GetPathToDotNetFramework(
TargetDotNetFrameworkVersion
.Version40).ShouldBe(FrameworkLocationHelper.PathToDotNetFrameworkV40);
639
ToolLocationHelper.GetPathToDotNetFramework(
TargetDotNetFrameworkVersion
.VersionLatest).ShouldBe(FrameworkLocationHelper.PathToDotNetFrameworkV40);
640
ToolLocationHelper.GetPathToDotNetFramework(
TargetDotNetFrameworkVersion
.Latest).ShouldBe(FrameworkLocationHelper.PathToDotNetFrameworkV40);
642
ToolLocationHelper.GetPathToDotNetFramework(
TargetDotNetFrameworkVersion
.Version11, UtilitiesDotNetFrameworkArchitecture.Bitness32).ShouldBe(
644
ToolLocationHelper.GetPathToDotNetFramework(
TargetDotNetFrameworkVersion
.Version20, UtilitiesDotNetFrameworkArchitecture.Bitness32).ShouldBe(
646
ToolLocationHelper.GetPathToDotNetFramework(
TargetDotNetFrameworkVersion
.Version30, UtilitiesDotNetFrameworkArchitecture.Bitness32).ShouldBe(
648
ToolLocationHelper.GetPathToDotNetFramework(
TargetDotNetFrameworkVersion
.Version35, UtilitiesDotNetFrameworkArchitecture.Bitness32).ShouldBe(
651
ToolLocationHelper.GetPathToDotNetFramework(
TargetDotNetFrameworkVersion
.Version40, UtilitiesDotNetFrameworkArchitecture.Bitness32).ShouldBe(
653
ToolLocationHelper.GetPathToDotNetFramework(
TargetDotNetFrameworkVersion
.VersionLatest, UtilitiesDotNetFrameworkArchitecture.Bitness32).ShouldBe(
655
ToolLocationHelper.GetPathToDotNetFramework(
TargetDotNetFrameworkVersion
.Latest, UtilitiesDotNetFrameworkArchitecture.Bitness32).ShouldBe(
661
ToolLocationHelper.GetPathToDotNetFramework(
TargetDotNetFrameworkVersion
.Version11, UtilitiesDotNetFrameworkArchitecture.Bitness64).ShouldBe(
663
ToolLocationHelper.GetPathToDotNetFramework(
TargetDotNetFrameworkVersion
.Version20, UtilitiesDotNetFrameworkArchitecture.Bitness64).ShouldBe(
665
ToolLocationHelper.GetPathToDotNetFramework(
TargetDotNetFrameworkVersion
.Version30, UtilitiesDotNetFrameworkArchitecture.Bitness64).ShouldBe(
667
ToolLocationHelper.GetPathToDotNetFramework(
TargetDotNetFrameworkVersion
.Version35, UtilitiesDotNetFrameworkArchitecture.Bitness64).ShouldBe(
670
ToolLocationHelper.GetPathToDotNetFramework(
TargetDotNetFrameworkVersion
.Version40, UtilitiesDotNetFrameworkArchitecture.Bitness64).ShouldBe(
672
ToolLocationHelper.GetPathToDotNetFramework(
TargetDotNetFrameworkVersion
.VersionLatest, UtilitiesDotNetFrameworkArchitecture.Bitness64).ShouldBe(
674
ToolLocationHelper.GetPathToDotNetFramework(
TargetDotNetFrameworkVersion
.Latest, UtilitiesDotNetFrameworkArchitecture.Bitness64).ShouldBe(
682
string net20Path = ToolLocationHelper.GetPathToDotNetFrameworkFile("MSBuild.exe",
TargetDotNetFrameworkVersion
.Version20);
686
string net35Path = ToolLocationHelper.GetPathToDotNetFrameworkFile("MSBuild.exe",
TargetDotNetFrameworkVersion
.Version35);
690
ToolLocationHelper.GetPathToDotNetFrameworkFile("MSBuild.exe",
TargetDotNetFrameworkVersion
.Version40).ShouldBe(ToolLocationHelper.GetPathToBuildToolsFile("MSBuild.exe", "4.0"));
705
string net20Path = ToolLocationHelper.GetPathToDotNetFrameworkFile("msbuild.exe",
TargetDotNetFrameworkVersion
.Version20, UtilitiesDotNetFrameworkArchitecture.Bitness32);
708
string net35Path = ToolLocationHelper.GetPathToDotNetFrameworkFile("msbuild.exe",
TargetDotNetFrameworkVersion
.Version35, UtilitiesDotNetFrameworkArchitecture.Bitness32);
711
ToolLocationHelper.GetPathToDotNetFrameworkFile("msbuild.exe",
TargetDotNetFrameworkVersion
.Version40, UtilitiesDotNetFrameworkArchitecture.Bitness32).ShouldBe(
727
Should.Throw<ArgumentException>(() => ToolLocationHelper.GetDotNetFrameworkSdkRootRegistryKey((
TargetDotNetFrameworkVersion
)99, vsVersion));
731
foreach (
var
dotNetVersion in EnumDotNetFrameworkVersions())
739
ToolLocationHelper.GetDotNetFrameworkSdkRootRegistryKey(
TargetDotNetFrameworkVersion
.Version11, vsVersion).ShouldBe(FrameworkLocationHelper.fullDotNetFrameworkRegistryKey);
742
ToolLocationHelper.GetDotNetFrameworkSdkRootRegistryKey(
TargetDotNetFrameworkVersion
.Version20, vsVersion).ShouldBe(FrameworkLocationHelper.fullDotNetFrameworkRegistryKey);
745
Should.Throw<ArgumentException>(() => ToolLocationHelper.GetDotNetFrameworkSdkRootRegistryKey(
TargetDotNetFrameworkVersion
.Version30, vsVersion));
748
ToolLocationHelper.GetDotNetFrameworkSdkRootRegistryKey(
TargetDotNetFrameworkVersion
.Version35, vsVersion).ShouldBe(
765
ToolLocationHelper.GetDotNetFrameworkSdkRootRegistryKey(
TargetDotNetFrameworkVersion
.Version40, VisualStudioVersion.Version100).ShouldBe(fullDotNetFrameworkSdkRegistryPathForV4ToolsOnManagedToolsSDK70A);
766
ToolLocationHelper.GetDotNetFrameworkSdkRootRegistryKey(
TargetDotNetFrameworkVersion
.Version40, VisualStudioVersion.Version110).ShouldBe(fullDotNetFrameworkSdkRegistryPathForV4ToolsOnManagedToolsSDK80A);
767
ToolLocationHelper.GetDotNetFrameworkSdkRootRegistryKey(
TargetDotNetFrameworkVersion
.Version40, VisualStudioVersion.Version120).ShouldBe(fullDotNetFrameworkSdkRegistryPathForV4ToolsOnManagedToolsSDK81A);
768
ToolLocationHelper.GetDotNetFrameworkSdkRootRegistryKey(
TargetDotNetFrameworkVersion
.Version40, VisualStudioVersion.Version140).ShouldBe(fullDotNetFrameworkSdkRegistryPathForV4ToolsOnManagedToolsSDK46);
771
ToolLocationHelper.GetDotNetFrameworkSdkRootRegistryKey(
TargetDotNetFrameworkVersion
.Version45, VisualStudioVersion.Version100).ShouldBe(fullDotNetFrameworkSdkRegistryPathForV4ToolsOnManagedToolsSDK80A);
772
ToolLocationHelper.GetDotNetFrameworkSdkRootRegistryKey(
TargetDotNetFrameworkVersion
.Version45, VisualStudioVersion.Version110).ShouldBe(fullDotNetFrameworkSdkRegistryPathForV4ToolsOnManagedToolsSDK80A);
773
ToolLocationHelper.GetDotNetFrameworkSdkRootRegistryKey(
TargetDotNetFrameworkVersion
.Version45, VisualStudioVersion.Version120).ShouldBe(fullDotNetFrameworkSdkRegistryPathForV4ToolsOnManagedToolsSDK81A);
774
ToolLocationHelper.GetDotNetFrameworkSdkRootRegistryKey(
TargetDotNetFrameworkVersion
.Version45, VisualStudioVersion.Version140).ShouldBe(fullDotNetFrameworkSdkRegistryPathForV4ToolsOnManagedToolsSDK46);
777
Should.Throw<ArgumentException>(() => ToolLocationHelper.GetDotNetFrameworkSdkRootRegistryKey(
TargetDotNetFrameworkVersion
.Version451, VisualStudioVersion.Version100));
778
Should.Throw<ArgumentException>(() => ToolLocationHelper.GetDotNetFrameworkSdkRootRegistryKey(
TargetDotNetFrameworkVersion
.Version451, VisualStudioVersion.Version110));
779
ToolLocationHelper.GetDotNetFrameworkSdkRootRegistryKey(
TargetDotNetFrameworkVersion
.Version451, VisualStudioVersion.Version120).ShouldBe(fullDotNetFrameworkSdkRegistryPathForV4ToolsOnManagedToolsSDK81A);
780
ToolLocationHelper.GetDotNetFrameworkSdkRootRegistryKey(
TargetDotNetFrameworkVersion
.Version451, VisualStudioVersion.Version140).ShouldBe(fullDotNetFrameworkSdkRegistryPathForV4ToolsOnManagedToolsSDK46);
783
Should.Throw<ArgumentException>(() => ToolLocationHelper.GetDotNetFrameworkSdkRootRegistryKey(
TargetDotNetFrameworkVersion
.Version452, VisualStudioVersion.Version100));
784
Should.Throw<ArgumentException>(() => ToolLocationHelper.GetDotNetFrameworkSdkRootRegistryKey(
TargetDotNetFrameworkVersion
.Version452, VisualStudioVersion.Version110));
785
ToolLocationHelper.GetDotNetFrameworkSdkRootRegistryKey(
TargetDotNetFrameworkVersion
.Version452, VisualStudioVersion.Version120).ShouldBe(fullDotNetFrameworkSdkRegistryPathForV4ToolsOnManagedToolsSDK81A);
786
ToolLocationHelper.GetDotNetFrameworkSdkRootRegistryKey(
TargetDotNetFrameworkVersion
.Version452, VisualStudioVersion.Version140).ShouldBe(fullDotNetFrameworkSdkRegistryPathForV4ToolsOnManagedToolsSDK46);
789
Should.Throw<ArgumentException>(() => ToolLocationHelper.GetDotNetFrameworkSdkRootRegistryKey(
TargetDotNetFrameworkVersion
.Version46, VisualStudioVersion.Version100));
790
Should.Throw<ArgumentException>(() => ToolLocationHelper.GetDotNetFrameworkSdkRootRegistryKey(
TargetDotNetFrameworkVersion
.Version46, VisualStudioVersion.Version110));
791
Should.Throw<ArgumentException>(() => ToolLocationHelper.GetDotNetFrameworkSdkRootRegistryKey(
TargetDotNetFrameworkVersion
.Version46, VisualStudioVersion.Version120));
792
ToolLocationHelper.GetDotNetFrameworkSdkRootRegistryKey(
TargetDotNetFrameworkVersion
.Version46, VisualStudioVersion.Version140).ShouldBe(fullDotNetFrameworkSdkRegistryPathForV4ToolsOnManagedToolsSDK46);
795
Should.Throw<ArgumentException>(() => ToolLocationHelper.GetDotNetFrameworkSdkRootRegistryKey(
TargetDotNetFrameworkVersion
.Version461, VisualStudioVersion.Version100));
796
Should.Throw<ArgumentException>(() => ToolLocationHelper.GetDotNetFrameworkSdkRootRegistryKey(
TargetDotNetFrameworkVersion
.Version461, VisualStudioVersion.Version110));
797
Should.Throw<ArgumentException>(() => ToolLocationHelper.GetDotNetFrameworkSdkRootRegistryKey(
TargetDotNetFrameworkVersion
.Version461, VisualStudioVersion.Version120));
798
ToolLocationHelper.GetDotNetFrameworkSdkRootRegistryKey(
TargetDotNetFrameworkVersion
.Version461, VisualStudioVersion.Version140).ShouldBe(fullDotNetFrameworkSdkRegistryPathForV4ToolsOnManagedToolsSDK461);
801
Should.Throw<ArgumentException>(() => ToolLocationHelper.GetDotNetFrameworkSdkRootRegistryKey(
TargetDotNetFrameworkVersion
.Version462, VisualStudioVersion.Version100));
802
Should.Throw<ArgumentException>(() => ToolLocationHelper.GetDotNetFrameworkSdkRootRegistryKey(
TargetDotNetFrameworkVersion
.Version462, VisualStudioVersion.Version110));
803
Should.Throw<ArgumentException>(() => ToolLocationHelper.GetDotNetFrameworkSdkRootRegistryKey(
TargetDotNetFrameworkVersion
.Version462, VisualStudioVersion.Version120));
804
ToolLocationHelper.GetDotNetFrameworkSdkRootRegistryKey(
TargetDotNetFrameworkVersion
.Version462, VisualStudioVersion.Version150).ShouldBe(fullDotNetFrameworkSdkRegistryPathForV4ToolsOnManagedToolsSDK462);
807
Should.Throw<ArgumentException>(() => ToolLocationHelper.GetDotNetFrameworkSdkRootRegistryKey(
TargetDotNetFrameworkVersion
.Version47, VisualStudioVersion.Version100));
808
Should.Throw<ArgumentException>(() => ToolLocationHelper.GetDotNetFrameworkSdkRootRegistryKey(
TargetDotNetFrameworkVersion
.Version47, VisualStudioVersion.Version110));
809
Should.Throw<ArgumentException>(() => ToolLocationHelper.GetDotNetFrameworkSdkRootRegistryKey(
TargetDotNetFrameworkVersion
.Version47, VisualStudioVersion.Version120));
810
ToolLocationHelper.GetDotNetFrameworkSdkRootRegistryKey(
TargetDotNetFrameworkVersion
.Version47, VisualStudioVersion.Version150).ShouldBe(fullDotNetFrameworkSdkRegistryPathForV4ToolsOnManagedToolsSDK47);
813
Should.Throw<ArgumentException>(() => ToolLocationHelper.GetDotNetFrameworkSdkRootRegistryKey(
TargetDotNetFrameworkVersion
.Version471, VisualStudioVersion.Version100));
814
Should.Throw<ArgumentException>(() => ToolLocationHelper.GetDotNetFrameworkSdkRootRegistryKey(
TargetDotNetFrameworkVersion
.Version471, VisualStudioVersion.Version110));
815
Should.Throw<ArgumentException>(() => ToolLocationHelper.GetDotNetFrameworkSdkRootRegistryKey(
TargetDotNetFrameworkVersion
.Version471, VisualStudioVersion.Version120));
816
ToolLocationHelper.GetDotNetFrameworkSdkRootRegistryKey(
TargetDotNetFrameworkVersion
.Version471, VisualStudioVersion.Version150).ShouldBe(fullDotNetFrameworkSdkRegistryPathForV4ToolsOnManagedToolsSDK471);
819
Should.Throw<ArgumentException>(() => ToolLocationHelper.GetDotNetFrameworkSdkRootRegistryKey(
TargetDotNetFrameworkVersion
.Version472, VisualStudioVersion.Version100));
820
Should.Throw<ArgumentException>(() => ToolLocationHelper.GetDotNetFrameworkSdkRootRegistryKey(
TargetDotNetFrameworkVersion
.Version472, VisualStudioVersion.Version110));
821
Should.Throw<ArgumentException>(() => ToolLocationHelper.GetDotNetFrameworkSdkRootRegistryKey(
TargetDotNetFrameworkVersion
.Version472, VisualStudioVersion.Version120));
822
ToolLocationHelper.GetDotNetFrameworkSdkRootRegistryKey(
TargetDotNetFrameworkVersion
.Version472, VisualStudioVersion.Version150).ShouldBe(fullDotNetFrameworkSdkRegistryPathForV4ToolsOnManagedToolsSDK472);
825
Should.Throw<ArgumentException>(() => ToolLocationHelper.GetDotNetFrameworkSdkRootRegistryKey(
TargetDotNetFrameworkVersion
.Version48, VisualStudioVersion.Version100));
826
Should.Throw<ArgumentException>(() => ToolLocationHelper.GetDotNetFrameworkSdkRootRegistryKey(
TargetDotNetFrameworkVersion
.Version48, VisualStudioVersion.Version110));
827
Should.Throw<ArgumentException>(() => ToolLocationHelper.GetDotNetFrameworkSdkRootRegistryKey(
TargetDotNetFrameworkVersion
.Version48, VisualStudioVersion.Version120));
828
Should.Throw<ArgumentException>(() => ToolLocationHelper.GetDotNetFrameworkSdkRootRegistryKey(
TargetDotNetFrameworkVersion
.Version48, VisualStudioVersion.Version140));
829
ToolLocationHelper.GetDotNetFrameworkSdkRootRegistryKey(
TargetDotNetFrameworkVersion
.Version48, VisualStudioVersion.Version150).ShouldBe(fullDotNetFrameworkSdkRegistryPathForV4ToolsOnManagedToolsSDK48);
830
ToolLocationHelper.GetDotNetFrameworkSdkRootRegistryKey(
TargetDotNetFrameworkVersion
.Version48, VisualStudioVersion.Version160).ShouldBe(fullDotNetFrameworkSdkRegistryPathForV4ToolsOnManagedToolsSDK48);
831
ToolLocationHelper.GetDotNetFrameworkSdkRootRegistryKey(
TargetDotNetFrameworkVersion
.Version48, VisualStudioVersion.Version170).ShouldBe(fullDotNetFrameworkSdkRegistryPathForV4ToolsOnManagedToolsSDK48);
834
Should.Throw<ArgumentException>(() => ToolLocationHelper.GetDotNetFrameworkSdkRootRegistryKey(
TargetDotNetFrameworkVersion
.Version481, VisualStudioVersion.Version100));
835
Should.Throw<ArgumentException>(() => ToolLocationHelper.GetDotNetFrameworkSdkRootRegistryKey(
TargetDotNetFrameworkVersion
.Version481, VisualStudioVersion.Version110));
836
Should.Throw<ArgumentException>(() => ToolLocationHelper.GetDotNetFrameworkSdkRootRegistryKey(
TargetDotNetFrameworkVersion
.Version481, VisualStudioVersion.Version120));
837
Should.Throw<ArgumentException>(() => ToolLocationHelper.GetDotNetFrameworkSdkRootRegistryKey(
TargetDotNetFrameworkVersion
.Version481, VisualStudioVersion.Version140));
838
Should.Throw<ArgumentException>(() => ToolLocationHelper.GetDotNetFrameworkSdkRootRegistryKey(
TargetDotNetFrameworkVersion
.Version481, VisualStudioVersion.Version150));
839
Should.Throw<ArgumentException>(() => ToolLocationHelper.GetDotNetFrameworkSdkRootRegistryKey(
TargetDotNetFrameworkVersion
.Version481, VisualStudioVersion.Version160));
840
ToolLocationHelper.GetDotNetFrameworkSdkRootRegistryKey(
TargetDotNetFrameworkVersion
.Version481, VisualStudioVersion.Version170).ShouldBe(fullDotNetFrameworkSdkRegistryPathForV4ToolsOnManagedToolsSDK481);
843
ToolLocationHelper.GetDotNetFrameworkSdkRootRegistryKey(
TargetDotNetFrameworkVersion
.Latest, VisualStudioVersion.Version170).ShouldBe(fullDotNetFrameworkSdkRegistryPathForV4ToolsOnManagedToolsSDK481);
852
Should.Throw<ArgumentException>(() => ToolLocationHelper.GetDotNetFrameworkSdkInstallKeyValue((
TargetDotNetFrameworkVersion
)99, vsVersion));
856
foreach (
var
dotNetVersion in EnumDotNetFrameworkVersions())
866
ToolLocationHelper.GetDotNetFrameworkSdkInstallKeyValue(
TargetDotNetFrameworkVersion
.Version11, vsVersion).ShouldBe(FrameworkLocationHelper.dotNetFrameworkSdkInstallKeyValueV11);
869
ToolLocationHelper.GetDotNetFrameworkSdkInstallKeyValue(
TargetDotNetFrameworkVersion
.Version20, vsVersion).ShouldBe(FrameworkLocationHelper.dotNetFrameworkSdkInstallKeyValueV20);
872
Should.Throw<ArgumentException>(() => ToolLocationHelper.GetDotNetFrameworkSdkInstallKeyValue(
TargetDotNetFrameworkVersion
.Version30, vsVersion));
875
ToolLocationHelper.GetDotNetFrameworkSdkInstallKeyValue(
TargetDotNetFrameworkVersion
.Version35, vsVersion).ShouldBe(InstallationFolder);
878
ToolLocationHelper.GetDotNetFrameworkSdkInstallKeyValue(
TargetDotNetFrameworkVersion
.Version40, vsVersion).ShouldBe(InstallationFolder);
881
ToolLocationHelper.GetDotNetFrameworkSdkInstallKeyValue(
TargetDotNetFrameworkVersion
.Version45, vsVersion).ShouldBe(InstallationFolder);
885
Should.Throw<ArgumentException>(() => ToolLocationHelper.GetDotNetFrameworkSdkInstallKeyValue(
TargetDotNetFrameworkVersion
.Version451, VisualStudioVersion.Version100));
886
Should.Throw<ArgumentException>(() => ToolLocationHelper.GetDotNetFrameworkSdkInstallKeyValue(
TargetDotNetFrameworkVersion
.Version451, VisualStudioVersion.Version110));
887
ToolLocationHelper.GetDotNetFrameworkSdkInstallKeyValue(
TargetDotNetFrameworkVersion
.Version451, VisualStudioVersion.Version120).ShouldBe(InstallationFolder);
888
ToolLocationHelper.GetDotNetFrameworkSdkInstallKeyValue(
TargetDotNetFrameworkVersion
.Version451, VisualStudioVersion.Version140).ShouldBe(InstallationFolder);
891
Should.Throw<ArgumentException>(() => ToolLocationHelper.GetDotNetFrameworkSdkInstallKeyValue(
TargetDotNetFrameworkVersion
.Version46, VisualStudioVersion.Version100));
892
Should.Throw<ArgumentException>(() => ToolLocationHelper.GetDotNetFrameworkSdkInstallKeyValue(
TargetDotNetFrameworkVersion
.Version46, VisualStudioVersion.Version110));
893
Should.Throw<ArgumentException>(() => ToolLocationHelper.GetDotNetFrameworkSdkInstallKeyValue(
TargetDotNetFrameworkVersion
.Version46, VisualStudioVersion.Version120));
894
ToolLocationHelper.GetDotNetFrameworkSdkInstallKeyValue(
TargetDotNetFrameworkVersion
.Version46, VisualStudioVersion.Version140).ShouldBe(InstallationFolder);
907
Should.Throw<ArgumentException>(() => ToolLocationHelper.GetPathToDotNetFrameworkSdk((
TargetDotNetFrameworkVersion
)99, vsVersion));
911
foreach (
var
dotNetVersion in EnumDotNetFrameworkVersions())
941
ToolLocationHelper.GetPathToDotNetFrameworkSdk(
TargetDotNetFrameworkVersion
.Version11, vsVersion).ShouldBe(FrameworkLocationHelper.PathToDotNetFrameworkSdkV11);
944
ToolLocationHelper.GetPathToDotNetFrameworkSdk(
TargetDotNetFrameworkVersion
.Version20, vsVersion).ShouldBe(FrameworkLocationHelper.PathToDotNetFrameworkSdkV20);
947
Should.Throw<ArgumentException>(() => ToolLocationHelper.GetPathToDotNetFrameworkSdk(
TargetDotNetFrameworkVersion
.Version30, vsVersion));
950
ToolLocationHelper.GetPathToDotNetFrameworkSdk(
TargetDotNetFrameworkVersion
.Version35, vsVersion).ShouldBe(pathToSdk35InstallRoot);
954
ToolLocationHelper.GetPathToDotNetFrameworkSdk(
TargetDotNetFrameworkVersion
.Version40, VisualStudioVersion.Version100).ShouldBe(pathToSdkV4InstallRootOnVS10);
955
ToolLocationHelper.GetPathToDotNetFrameworkSdk(
TargetDotNetFrameworkVersion
.Version40, VisualStudioVersion.Version110).ShouldBe(pathToSdkV4InstallRootOnVS11);
956
ToolLocationHelper.GetPathToDotNetFrameworkSdk(
TargetDotNetFrameworkVersion
.Version40, VisualStudioVersion.Version120).ShouldBe(pathToSdkV4InstallRootOnVS12);
957
ToolLocationHelper.GetPathToDotNetFrameworkSdk(
TargetDotNetFrameworkVersion
.Version40, VisualStudioVersion.Version140).ShouldBe(pathToSdkV4InstallRootOnVS14);
960
ToolLocationHelper.GetPathToDotNetFrameworkSdk(
TargetDotNetFrameworkVersion
.Version45, VisualStudioVersion.Version100).ShouldBe(pathToSdkV4InstallRootOnVS11);
961
ToolLocationHelper.GetPathToDotNetFrameworkSdk(
TargetDotNetFrameworkVersion
.Version45, VisualStudioVersion.Version110).ShouldBe(pathToSdkV4InstallRootOnVS11);
962
ToolLocationHelper.GetPathToDotNetFrameworkSdk(
TargetDotNetFrameworkVersion
.Version45, VisualStudioVersion.Version120).ShouldBe(pathToSdkV4InstallRootOnVS12);
963
ToolLocationHelper.GetPathToDotNetFrameworkSdk(
TargetDotNetFrameworkVersion
.Version45, VisualStudioVersion.Version140).ShouldBe(pathToSdkV4InstallRootOnVS14);
966
Should.Throw<ArgumentException>(() => ToolLocationHelper.GetPathToDotNetFrameworkSdk(
TargetDotNetFrameworkVersion
.Version451, VisualStudioVersion.Version100));
967
Should.Throw<ArgumentException>(() => ToolLocationHelper.GetPathToDotNetFrameworkSdk(
TargetDotNetFrameworkVersion
.Version451, VisualStudioVersion.Version110));
968
ToolLocationHelper.GetPathToDotNetFrameworkSdk(
TargetDotNetFrameworkVersion
.Version451, VisualStudioVersion.Version120).ShouldBe(pathToSdkV4InstallRootOnVS12);
969
ToolLocationHelper.GetPathToDotNetFrameworkSdk(
TargetDotNetFrameworkVersion
.Version451, VisualStudioVersion.Version140).ShouldBe(pathToSdkV4InstallRootOnVS14);
972
Should.Throw<ArgumentException>(() => ToolLocationHelper.GetPathToDotNetFrameworkSdk(
TargetDotNetFrameworkVersion
.Version46, VisualStudioVersion.Version100));
973
Should.Throw<ArgumentException>(() => ToolLocationHelper.GetPathToDotNetFrameworkSdk(
TargetDotNetFrameworkVersion
.Version46, VisualStudioVersion.Version110));
974
Should.Throw<ArgumentException>(() => ToolLocationHelper.GetPathToDotNetFrameworkSdk(
TargetDotNetFrameworkVersion
.Version46, VisualStudioVersion.Version120));
975
ToolLocationHelper.GetPathToDotNetFrameworkSdk(
TargetDotNetFrameworkVersion
.Version46, VisualStudioVersion.Version140).ShouldBe(pathToSdkV4InstallRootOnVS14);
1920
if (ToolLocationHelper.GetPathToDotNetFrameworkReferenceAssemblies(
TargetDotNetFrameworkVersion
.Version48) != null)
1926
string referenceAssemblyPath = ToolLocationHelper.GetPathToDotNetFrameworkReferenceAssemblies(
TargetDotNetFrameworkVersion
.Version48);
2782
private static IEnumerable<
TargetDotNetFrameworkVersion
> EnumDotNetFrameworkVersions()
2784
for (
TargetDotNetFrameworkVersion
dotNetVersion =
TargetDotNetFrameworkVersion
.Version11; dotNetVersion <=
TargetDotNetFrameworkVersion
.VersionLatest; ++dotNetVersion)
2855
private string GetDotNetFrameworkReferenceAssemblies(
TargetDotNetFrameworkVersion
version)
2859
case
TargetDotNetFrameworkVersion
.Version40:
2863
case
TargetDotNetFrameworkVersion
.Version35:
2867
case
TargetDotNetFrameworkVersion
.Version30:
2882
private string GetDotNetFramework(
TargetDotNetFrameworkVersion
version)
2886
case
TargetDotNetFrameworkVersion
.Version20:
2890
case
TargetDotNetFrameworkVersion
.Version30:
2894
case
TargetDotNetFrameworkVersion
.Version35:
2898
case
TargetDotNetFrameworkVersion
.Version40: