-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Adding target framework intrinsic functions #5234
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
7872c62
89578b6
80abdc9
6258784
17396fc
a3a2fcb
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -4,8 +4,6 @@ | |
| using System; | ||
| using System.Collections.Generic; | ||
| using System.IO; | ||
| using System.Linq; | ||
| using System.Reflection; | ||
| using System.Runtime.InteropServices; | ||
| using System.Text.RegularExpressions; | ||
|
|
||
|
|
@@ -32,6 +30,8 @@ internal static class IntrinsicFunctions | |
| private static readonly Lazy<Regex> RegistrySdkRegex = new Lazy<Regex>(() => new Regex(@"^HKEY_LOCAL_MACHINE\\Software\\Microsoft\\Microsoft SDKs\\Windows\\v(\d+\.\d+)$", RegexOptions.IgnoreCase)); | ||
| #endif // FEATURE_WIN32_REGISTRY | ||
|
|
||
| private static readonly Lazy<NuGetFrameworkWrapper> NuGetFramework = new Lazy<NuGetFrameworkWrapper>(() => new NuGetFrameworkWrapper()); | ||
|
|
||
| /// <summary> | ||
| /// Add two doubles | ||
| /// </summary> | ||
|
|
@@ -480,6 +480,21 @@ internal static bool VersionLessThanOrEquals(string a, string b) | |
| return SimpleVersion.Parse(a) <= SimpleVersion.Parse(b); | ||
| } | ||
|
|
||
| internal static string GetTargetFrameworkIdentifier(string tfm) | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You should have a follow up issue for getting the platform (.NET 5 era intrinsics) |
||
| { | ||
| return NuGetFramework.Value.GetTargetFrameworkIdentifier(tfm); | ||
| } | ||
|
|
||
| internal static string GetTargetFrameworkVersion(string tfm) | ||
| { | ||
| return NuGetFramework.Value.GetTargetFrameworkVersion(tfm); | ||
| } | ||
|
|
||
| internal static bool IsTargetFrameworkCompatible(string target, string candidate) | ||
| { | ||
| return NuGetFramework.Value.IsCompatible(target, candidate); | ||
| } | ||
|
|
||
| public static string GetCurrentToolsDirectory() | ||
| { | ||
| return BuildEnvironmentHelper.Instance.CurrentMSBuildToolsDirectory; | ||
|
|
||
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Uh oh!
There was an error while loading. Please reload this page.