diff --git a/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.EolTargetFrameworks.targets b/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.EolTargetFrameworks.targets
index d9bd74aa368f..8608d9f77a33 100644
--- a/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.EolTargetFrameworks.targets
+++ b/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.EolTargetFrameworks.targets
@@ -21,7 +21,7 @@ Copyright (c) .NET Foundation. All rights reserved.
receive servicing updates and security fixes.
-->
- <_EolNetCoreTargetFrameworkVersions Include="1.0;1.1;2.0;2.1;2.2;3.0;3.1;5.0" />
+ <_EolNetCoreTargetFrameworkVersions Include="1.0;1.1;2.0;2.1;2.2;3.0;3.1;5.0;7.0" />
<_MinimumNonEolSupportedNetCoreTargetFramework>net6.0
diff --git a/src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantToTargetEolFrameworks.cs b/src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantToTargetEolFrameworks.cs
index 9f196512336e..6e020c0df98f 100644
--- a/src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantToTargetEolFrameworks.cs
+++ b/src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantToTargetEolFrameworks.cs
@@ -15,6 +15,7 @@ public GivenThatWeWantToTargetEolFrameworks(ITestOutputHelper log) : base(log)
[InlineData("netcoreapp3.0")]
[InlineData("netcoreapp3.1")]
[InlineData("net5.0")]
+ [InlineData("net7.0")]
public void It_warns_that_framework_is_out_of_support(string targetFrameworks)
{
var testProject = new TestProject()
diff --git a/src/Tests/Microsoft.NET.Publish.Tests/GivenThatWeWantToPublishAnAotApp.cs b/src/Tests/Microsoft.NET.Publish.Tests/GivenThatWeWantToPublishAnAotApp.cs
index ea382026a18b..d136a7f9e3d4 100644
--- a/src/Tests/Microsoft.NET.Publish.Tests/GivenThatWeWantToPublishAnAotApp.cs
+++ b/src/Tests/Microsoft.NET.Publish.Tests/GivenThatWeWantToPublishAnAotApp.cs
@@ -43,7 +43,7 @@ public void NativeAot_hw_runs_with_no_warnings_when_PublishAot_is_enabled(string
var publishCommand = new PublishCommand(Log, Path.Combine(testAsset.TestRoot, testProject.Name));
publishCommand
- .Execute($"/p:UseCurrentRuntimeIdentifier=true", "/p:SelfContained=true")
+ .Execute($"/p:UseCurrentRuntimeIdentifier=true", "/p:SelfContained=true", "/p:CheckEolTargetFramework=false")
.Should().Pass()
.And.NotHaveStdOutContaining("IL2026")
.And.NotHaveStdErrContaining("NETSDK1179")
@@ -87,7 +87,7 @@ public void NativeAot_hw_runs_with_no_warnings_when_PublishAot_is_false(string t
var publishCommand = new PublishCommand(testAsset);
publishCommand
- .Execute($"/p:RuntimeIdentifier={rid}", "/p:SelfContained=true")
+ .Execute($"/p:RuntimeIdentifier={rid}", "/p:SelfContained=true", "/p:CheckEolTargetFramework=false")
.Should().Pass()
.And.NotHaveStdOutContaining("IL2026")
.And.NotHaveStdErrContaining("NETSDK1179")
diff --git a/src/Tests/dotnet-new.Tests/CommonTemplatesTests.cs b/src/Tests/dotnet-new.Tests/CommonTemplatesTests.cs
index 21bd69d702aa..aaa2da896b15 100644
--- a/src/Tests/dotnet-new.Tests/CommonTemplatesTests.cs
+++ b/src/Tests/dotnet-new.Tests/CommonTemplatesTests.cs
@@ -230,8 +230,8 @@ public async void AotVariants(string name, string language)
var templatesToTest = new[]
{
- new { Template = consoleTemplateShortname, Frameworks = new[] { null, "net6.0", "net7.0", "net8.0" } },
- new { Template = "classlib", Frameworks = new[] { null, "net6.0", "net7.0", "net8.0", "netstandard2.0", "netstandard2.1" } }
+ new { Template = consoleTemplateShortname, Frameworks = new[] { null, "net6.0", "net8.0" } },
+ new { Template = "classlib", Frameworks = new[] { null, "net6.0", "net8.0", "netstandard2.0", "netstandard2.1" } }
};
//features: top-level statements; nullables; implicit usings; filescoped namespaces
@@ -240,9 +240,9 @@ public async void AotVariants(string name, string language)
//C# 12 is not supported yet - https://github.com/dotnet/sdk/issues/29195
string?[] supportedLanguageVersions = { null, "ISO-2", "2", "3", "4", "5", "6", "7", "7.1", "7.2", "7.3", "8.0", "9.0", "10.0", "11.0", "11", /*"12",*/ "latest", "latestMajor", "default", "preview" };
- string?[] nullableSupportedInFrameworkByDefault = { null, "net6.0", "net7.0", "net8.0", "netstandard2.1" };
- string?[] implicitUsingsSupportedInFramework = { null, "net6.0", "net7.0", "net8.0" };
- string?[] fileScopedNamespacesSupportedFrameworkByDefault = { null, "net6.0", "net7.0", "net8.0" };
+ string?[] nullableSupportedInFrameworkByDefault = { null, "net6.0", "net8.0", "netstandard2.1" };
+ string?[] implicitUsingsSupportedInFramework = { null, "net6.0", "net8.0" };
+ string?[] fileScopedNamespacesSupportedFrameworkByDefault = { null, "net6.0", "net8.0" };
string?[] nullableSupportedLanguages = { "8.0", "9.0", "10.0", "11.0", "11", /*"12",*/ "latest", "latestMajor", "default", "preview" };
string?[] topLevelStatementSupportedLanguages = { null, "9.0", "10.0", "11", "11.0", /*"12",*/ "latest", "latestMajor", "default", "preview" };