From 02a5cf20dff215f6fa90ca6acc82459d9c623d2a Mon Sep 17 00:00:00 2001 From: Todd Anderson Date: Mon, 21 Sep 2026 16:19:22 -0400 Subject: [PATCH 1/2] feat: replace EOL netcoreapp3.1 target with net8.0 The netcoreapp3.1 target causes an assembly built against EOL .NET Core 3.1 to be selected by all .NET 5+ applications, which security scanners flag. Retarget to net8.0, matching the rest of the SDK family. No code changes are needed: Logs.CoreLogging is gated on NETCOREAPP, which is also defined for net8.0. --- CONTRIBUTING.md | 4 ++-- README.md | 2 +- src/LaunchDarkly.Logging/LaunchDarkly.Logging.csproj | 4 ++-- src/LaunchDarkly.Logging/Logs.cs | 4 ++-- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index a35a6c3..bad49bb 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -44,8 +44,8 @@ To run all unit tests, for all targets: dotnet test test/LaunchDarkly.Logging.Tests ``` -Or, to run tests only for the .NET Standard 2.0 target (using the .NET Core 2.1 runtime): +Or, to run tests for only one target framework: ``` -dotnet test test/LaunchDarkly.Logging.Tests -f netcoreapp2.1 +dotnet test test/LaunchDarkly.Logging.Tests -f net8.0 ``` diff --git a/README.md b/README.md index 510c634..e8d4ba2 100644 --- a/README.md +++ b/README.md @@ -13,7 +13,7 @@ For more information and examples, see the [API documentation](https://launchdar This version of the library is built for the following targets: * .NET Framework 4.6.2: runs on .NET Framework 4.6.2 and above. -* .NET Core 3.1: runs on .NET Core 3.x, or .NET 6.0+. This target provides an adapter to the standard .NET Core logging framework, `Logs.CoreLogging`, which is not available in .NET Framework except as a separate package. +* .NET 8.0: runs on .NET 8.0 and above. This target provides an adapter to the standard .NET logging framework, `Logs.CoreLogging`, which is not available in the other targets except as a separate package. * .NET Standard 2.0: runs on application platforms that are neither of the above, such as Xamarin, or within a library that is targeted to .NET Standard 2.x. The .NET build tools should automatically load the most appropriate build of the library for whatever platform your application or library is targeted to. diff --git a/src/LaunchDarkly.Logging/LaunchDarkly.Logging.csproj b/src/LaunchDarkly.Logging/LaunchDarkly.Logging.csproj index 8efbc08..9d0077d 100644 --- a/src/LaunchDarkly.Logging/LaunchDarkly.Logging.csproj +++ b/src/LaunchDarkly.Logging/LaunchDarkly.Logging.csproj @@ -6,7 +6,7 @@ an environment variable is that we want to be able to run CI tests using .NET SDKs that may not support all of these target frameworks. --> - netstandard2.0;netcoreapp3.1;net462 + netstandard2.0;net8.0;net462 $(BUILDFRAMEWORKS) portable LaunchDarkly.Logging @@ -27,7 +27,7 @@ 1570,1571,1572,1573,1574,1580,1581,1584,1591,1710,1711,1712 - + diff --git a/src/LaunchDarkly.Logging/Logs.cs b/src/LaunchDarkly.Logging/Logs.cs index 90fa6c0..8fbdfff 100644 --- a/src/LaunchDarkly.Logging/Logs.cs +++ b/src/LaunchDarkly.Logging/Logs.cs @@ -102,12 +102,12 @@ public static SimpleLogging ToMethod(Action writeLineMethod) => /// /// /// - /// This method is only available when your target framework is .NET Core or .NET 6.0+. It causes + /// This method is only available when your target framework is .NET 8.0 or later. It causes /// the LaunchDarkly.Logging APIs to delegate to the Microsoft.Extensions.Logging /// framework. The ILoggingFactory is the main configuration object for /// Microsoft.Extensions.Logging; application code can construct it programmatically, /// or can obtain it by dependency injection. For more information, see - /// Logging + /// Logging /// in .NET Core and ASP.NET Core. /// /// From 4698802e077b9dbf84b612c621962e2e011ebe1f Mon Sep 17 00:00:00 2001 From: Todd Anderson Date: Tue, 22 Sep 2026 09:30:53 -0400 Subject: [PATCH 2/2] fix: match Microsoft.Extensions.Logging.Abstractions to the net8.0 framework band Per review: the net8.0 target now floors M.E.L.A at 8.0.3, and the test project uses Microsoft.Extensions.Logging 8.0.1 so tests run against the declared band. --- src/LaunchDarkly.Logging/LaunchDarkly.Logging.csproj | 2 +- .../LaunchDarkly.Logging.Tests.csproj | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/LaunchDarkly.Logging/LaunchDarkly.Logging.csproj b/src/LaunchDarkly.Logging/LaunchDarkly.Logging.csproj index 9d0077d..1a2edd6 100644 --- a/src/LaunchDarkly.Logging/LaunchDarkly.Logging.csproj +++ b/src/LaunchDarkly.Logging/LaunchDarkly.Logging.csproj @@ -28,7 +28,7 @@ - + diff --git a/test/LaunchDarkly.Logging.Tests/LaunchDarkly.Logging.Tests.csproj b/test/LaunchDarkly.Logging.Tests/LaunchDarkly.Logging.Tests.csproj index 0c69cf2..b5d1611 100644 --- a/test/LaunchDarkly.Logging.Tests/LaunchDarkly.Logging.Tests.csproj +++ b/test/LaunchDarkly.Logging.Tests/LaunchDarkly.Logging.Tests.csproj @@ -11,7 +11,7 @@ - +