Skip to content

Commit

Permalink
chore: Deprecate .NET 7, update warning message. (#2482)
Browse files Browse the repository at this point in the history
  • Loading branch information
tippmar-nr authored May 15, 2024
1 parent bf4eba3 commit c358d21
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/Agent/NewRelic/Agent/Core/AgentManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,7 @@ private void LogInitialized()
#else
if (NewRelic.Core.DotnetVersion.IsUnsupportedDotnetCoreVersion(AgentInstallConfiguration.DotnetCoreVersion))
{
Log.Warn("Unsupported .NET version {0} detected. Please use a version of .NET >= net6.", AgentInstallConfiguration.DotnetCoreVersion);
Log.Warn("Unsupported .NET version {0} detected. Please use net6 or net8 or newer.", AgentInstallConfiguration.DotnetCoreVersion);
}
#endif
}
Expand Down
2 changes: 1 addition & 1 deletion src/NewRelic.Core/DotnetVersion.cs
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ public static bool IsUnsupportedDotnetCoreVersion(DotnetCoreVersion version)
// Newer versions of .net will be flagged as Other until we update our version checking logic.
// So we can either check against a supported list, or an unsupported list, but the supported list
// is smaller.
var supportedDotnetCoreVersions = new List<DotnetCoreVersion> { DotnetCoreVersion.net6, DotnetCoreVersion.net7, DotnetCoreVersion.net8, DotnetCoreVersion.Other };
var supportedDotnetCoreVersions = new List<DotnetCoreVersion> { DotnetCoreVersion.net6, DotnetCoreVersion.net8, DotnetCoreVersion.Other };
return !supportedDotnetCoreVersions.Contains(version);
}

Expand Down
2 changes: 1 addition & 1 deletion tests/NewRelic.Core.Tests/DotnetVersionTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ public class DotnetVersionTests
[TestCase(DotnetCoreVersion.netcoreapp31, ExpectedResult = true)]
[TestCase(DotnetCoreVersion.net5, ExpectedResult = true)]
[TestCase(DotnetCoreVersion.net6, ExpectedResult = false)]
[TestCase(DotnetCoreVersion.net7, ExpectedResult = false)]
[TestCase(DotnetCoreVersion.net7, ExpectedResult = true)]
[TestCase(DotnetCoreVersion.net8, ExpectedResult = false)]
[TestCase(DotnetCoreVersion.Other, ExpectedResult = false)]
public bool IsUnsupportedDotnetCoreVersion(DotnetCoreVersion version)
Expand Down

0 comments on commit c358d21

Please sign in to comment.