Skip to content

Commit af5a704

Browse files
authored
Add net11.0 to common frameworks (#7129)
1 parent a527f9e commit af5a704

3 files changed

Lines changed: 8 additions & 0 deletions

File tree

src/NuGet.Core/NuGet.Frameworks/FrameworkConstants.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ public static class FrameworkConstants
1515
public static readonly Version Version8 = new Version(8, 0, 0, 0);
1616
public static readonly Version Version9 = new Version(9, 0, 0, 0);
1717
public static readonly Version Version10 = new Version(10, 0, 0, 0);
18+
public static readonly Version Version11 = new Version(11, 0, 0, 0);
1819
public static readonly FrameworkRange DotNetAll = new FrameworkRange(
1920
new NuGetFramework(FrameworkIdentifiers.NetPlatform, FrameworkConstants.EmptyVersion),
2021
new NuGetFramework(FrameworkIdentifiers.NetPlatform, FrameworkConstants.MaxVersion));
@@ -240,6 +241,8 @@ public static readonly NuGetFramework NetCoreApp31
240241
public static readonly NuGetFramework Net90 = new NuGetFramework(FrameworkIdentifiers.NetCoreApp, Version9);
241242
/// <summary>net10.0 (.NETCoreApp,Version=v10.0)</summary>
242243
public static readonly NuGetFramework Net10_0 = new NuGetFramework(FrameworkIdentifiers.NetCoreApp, Version10);
244+
/// <summary>net11.0 (.NETCoreApp,Version=v11.0)</summary>
245+
public static readonly NuGetFramework Net11_0 = new NuGetFramework(FrameworkIdentifiers.NetCoreApp, Version11);
243246

244247
public static readonly NuGetFramework Native = new NuGetFramework(FrameworkIdentifiers.Native, new Version(0, 0, 0, 0));
245248
}

src/NuGet.Core/NuGet.Frameworks/NuGetFrameworkFactory.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -689,6 +689,9 @@ private static bool TryParseCommonFramework(string frameworkString, [NotNullWhen
689689
case "net10.0":
690690
framework = FrameworkConstants.CommonFrameworks.Net10_0;
691691
break;
692+
case "net11.0":
693+
framework = FrameworkConstants.CommonFrameworks.Net11_0;
694+
break;
692695
}
693696

694697
return framework != null;
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
11
#nullable enable
2+
static readonly NuGet.Frameworks.FrameworkConstants.CommonFrameworks.Net11_0 -> NuGet.Frameworks.NuGetFramework!
3+
static readonly NuGet.Frameworks.FrameworkConstants.Version11 -> System.Version!

0 commit comments

Comments
 (0)