From 5533a3b21f53c6d96fd966b61cfff9a6db0d5116 Mon Sep 17 00:00:00 2001 From: Dennis Dyall Date: Tue, 1 Jul 2025 12:29:50 +0200 Subject: [PATCH 1/3] build: Update target frameworks to net48 from net47 --- Yubico.Core/src/Yubico.Core.csproj | 2 +- .../src/Yubico/Core/Devices/Hid/WindowsHidDevice.cs | 2 +- .../{Libraries.Net47.cs => Libraries.Net48.cs} | 8 ++++---- Yubico.Core/src/Yubico/PlatformInterop/Libraries.cs | 4 ++-- Yubico.YubiKey/src/Yubico.YubiKey.csproj | 6 +++--- 5 files changed, 11 insertions(+), 11 deletions(-) rename Yubico.Core/src/Yubico/PlatformInterop/{Libraries.Net47.cs => Libraries.Net48.cs} (97%) diff --git a/Yubico.Core/src/Yubico.Core.csproj b/Yubico.Core/src/Yubico.Core.csproj index b932be8e9..63d5daaa0 100644 --- a/Yubico.Core/src/Yubico.Core.csproj +++ b/Yubico.Core/src/Yubico.Core.csproj @@ -19,7 +19,7 @@ limitations under the License. --> - netstandard2.0;netstandard2.1;net47 + netstandard2.0;netstandard2.1;net48 true diff --git a/Yubico.Core/src/Yubico/Core/Devices/Hid/WindowsHidDevice.cs b/Yubico.Core/src/Yubico/Core/Devices/Hid/WindowsHidDevice.cs index 02d21b5d1..a150b62af 100644 --- a/Yubico.Core/src/Yubico/Core/Devices/Hid/WindowsHidDevice.cs +++ b/Yubico.Core/src/Yubico/Core/Devices/Hid/WindowsHidDevice.cs @@ -76,7 +76,7 @@ private void ResolveIdsFromInstancePath(string instancePath) // 012345678901234567890123456789 // ^--- ^--- - // Disable string comparison warning for this method as it needs to compile for both net47, netstandard 2.0 and 2.1 + // Disable string comparison warning for this method as it needs to compile for both net48, netstandard 2.0 and 2.1 #pragma warning disable CA1862 if (instancePath.ToUpperInvariant().Contains("VID") && instancePath.ToUpperInvariant().Contains("HID")) #pragma warning restore CA1862 diff --git a/Yubico.Core/src/Yubico/PlatformInterop/Libraries.Net47.cs b/Yubico.Core/src/Yubico/PlatformInterop/Libraries.Net48.cs similarity index 97% rename from Yubico.Core/src/Yubico/PlatformInterop/Libraries.Net47.cs rename to Yubico.Core/src/Yubico/PlatformInterop/Libraries.Net48.cs index 23eccf967..8fe52a9ac 100644 --- a/Yubico.Core/src/Yubico/PlatformInterop/Libraries.Net47.cs +++ b/Yubico.Core/src/Yubico/PlatformInterop/Libraries.Net48.cs @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#if NET47 +#if NET48 using System; using System.IO; @@ -48,15 +48,15 @@ internal static partial class Libraries /// /// /// This method must be called before any P/Invoke calls are made. - /// The implementation details are handled in Libraries.Net47.cs. + /// The implementation details are handled in Libraries.Net48.cs. /// - public static void EnsureInitialized() => Net47Implementation.Initialize(); + public static void EnsureInitialized() => Net48Implementation.Initialize(); /// /// Encapsulates the .NET Framework 4.7 specific implementation details for native library management. /// This nested class handles the dynamic loading of architecture-specific (x86/x64) native libraries. /// - private static class Net47Implementation + private static class Net48Implementation { // Handle to the loaded native library private static UnmanagedDynamicLibrary? _nativeShims; diff --git a/Yubico.Core/src/Yubico/PlatformInterop/Libraries.cs b/Yubico.Core/src/Yubico/PlatformInterop/Libraries.cs index e7d13e8ed..2469ab265 100644 --- a/Yubico.Core/src/Yubico/PlatformInterop/Libraries.cs +++ b/Yubico.Core/src/Yubico/PlatformInterop/Libraries.cs @@ -12,9 +12,9 @@ // See the License for the specific language governing permissions and // limitations under the License. -// As long as we have the Libraries.Net47.cs class which holds the opposite preprocessor directive check, +// As long as we have the Libraries.Net48.cs class which holds the opposite preprocessor directive check, // this check is required - as having both at the same time is not possible. -#if !NET47 +#if !NET48 namespace Yubico.PlatformInterop { diff --git a/Yubico.YubiKey/src/Yubico.YubiKey.csproj b/Yubico.YubiKey/src/Yubico.YubiKey.csproj index f367b4bb0..c859de5bc 100644 --- a/Yubico.YubiKey/src/Yubico.YubiKey.csproj +++ b/Yubico.YubiKey/src/Yubico.YubiKey.csproj @@ -20,7 +20,7 @@ limitations under the License. --> As of 2020, netstandard2.0 allows us to reach the widest audience while providing a large enough set of the .NET library to be productive. --> - netstandard2.0;netstandard2.1;net47 + netstandard2.0;netstandard2.1;net48 @@ -130,8 +130,8 @@ limitations under the License. --> - - + + From aa5b16fe137497c11f7f6503457698770b9f15ab Mon Sep 17 00:00:00 2001 From: Dennis Dyall Date: Tue, 1 Jul 2025 12:52:51 +0200 Subject: [PATCH 2/3] deps: Upgrade / remove deps Microsoft.Extensions.Configuration.Json Microsoft.Extensions.Logging.Abstractions Microsoft.Extensions.Logging.Console Microsoft.Extensions.Options.ConfigurationExtensions --- Yubico.Core/src/Yubico.Core.csproj | 7 +++---- Yubico.NativeShims/Yubico.NativeShims.nuspec | 4 ++++ Yubico.YubiKey/src/Yubico.YubiKey.csproj | 6 +++--- 3 files changed, 10 insertions(+), 7 deletions(-) diff --git a/Yubico.Core/src/Yubico.Core.csproj b/Yubico.Core/src/Yubico.Core.csproj index 63d5daaa0..ef9f4f199 100644 --- a/Yubico.Core/src/Yubico.Core.csproj +++ b/Yubico.Core/src/Yubico.Core.csproj @@ -116,10 +116,10 @@ limitations under the License. --> all runtime; build; native; contentfiles; analyzers; buildtransitive - - + + - + @@ -127,7 +127,6 @@ limitations under the License. --> runtime; build; native; contentfiles; analyzers; buildtransitive - diff --git a/Yubico.NativeShims/Yubico.NativeShims.nuspec b/Yubico.NativeShims/Yubico.NativeShims.nuspec index df69c1a38..856c85517 100644 --- a/Yubico.NativeShims/Yubico.NativeShims.nuspec +++ b/Yubico.NativeShims/Yubico.NativeShims.nuspec @@ -13,6 +13,7 @@ docs/readme.md + @@ -34,7 +35,10 @@ + + + diff --git a/Yubico.YubiKey/src/Yubico.YubiKey.csproj b/Yubico.YubiKey/src/Yubico.YubiKey.csproj index c859de5bc..d2a895eba 100644 --- a/Yubico.YubiKey/src/Yubico.YubiKey.csproj +++ b/Yubico.YubiKey/src/Yubico.YubiKey.csproj @@ -104,12 +104,12 @@ limitations under the License. --> - + all runtime; build; native; contentfiles; analyzers; buildtransitive - + @@ -125,7 +125,7 @@ limitations under the License. --> - + From c1a04fdfc1a6059d9ebb5c27389eaaf37b02eb46 Mon Sep 17 00:00:00 2001 From: Dennis Dyallo Date: Fri, 4 Jul 2025 11:47:58 +0200 Subject: [PATCH 3/3] build: Update target frameworks from net48 to net472 for compatibility --- Yubico.Core/src/Yubico.Core.csproj | 2 +- Yubico.Core/src/Yubico/Core/Devices/Hid/WindowsHidDevice.cs | 2 +- .../{Libraries.Net48.cs => Libraries.Net47.cs} | 2 +- Yubico.Core/src/Yubico/PlatformInterop/Libraries.cs | 2 +- Yubico.YubiKey/src/Yubico.YubiKey.csproj | 6 +++--- 5 files changed, 7 insertions(+), 7 deletions(-) rename Yubico.Core/src/Yubico/PlatformInterop/{Libraries.Net48.cs => Libraries.Net47.cs} (99%) diff --git a/Yubico.Core/src/Yubico.Core.csproj b/Yubico.Core/src/Yubico.Core.csproj index ef9f4f199..f2b10cd10 100644 --- a/Yubico.Core/src/Yubico.Core.csproj +++ b/Yubico.Core/src/Yubico.Core.csproj @@ -19,7 +19,7 @@ limitations under the License. --> - netstandard2.0;netstandard2.1;net48 + netstandard2.0;netstandard2.1;net472 true diff --git a/Yubico.Core/src/Yubico/Core/Devices/Hid/WindowsHidDevice.cs b/Yubico.Core/src/Yubico/Core/Devices/Hid/WindowsHidDevice.cs index a150b62af..02d21b5d1 100644 --- a/Yubico.Core/src/Yubico/Core/Devices/Hid/WindowsHidDevice.cs +++ b/Yubico.Core/src/Yubico/Core/Devices/Hid/WindowsHidDevice.cs @@ -76,7 +76,7 @@ private void ResolveIdsFromInstancePath(string instancePath) // 012345678901234567890123456789 // ^--- ^--- - // Disable string comparison warning for this method as it needs to compile for both net48, netstandard 2.0 and 2.1 + // Disable string comparison warning for this method as it needs to compile for both net47, netstandard 2.0 and 2.1 #pragma warning disable CA1862 if (instancePath.ToUpperInvariant().Contains("VID") && instancePath.ToUpperInvariant().Contains("HID")) #pragma warning restore CA1862 diff --git a/Yubico.Core/src/Yubico/PlatformInterop/Libraries.Net48.cs b/Yubico.Core/src/Yubico/PlatformInterop/Libraries.Net47.cs similarity index 99% rename from Yubico.Core/src/Yubico/PlatformInterop/Libraries.Net48.cs rename to Yubico.Core/src/Yubico/PlatformInterop/Libraries.Net47.cs index 8fe52a9ac..47aa793b6 100644 --- a/Yubico.Core/src/Yubico/PlatformInterop/Libraries.Net48.cs +++ b/Yubico.Core/src/Yubico/PlatformInterop/Libraries.Net47.cs @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#if NET48 +#if NET47 using System; using System.IO; diff --git a/Yubico.Core/src/Yubico/PlatformInterop/Libraries.cs b/Yubico.Core/src/Yubico/PlatformInterop/Libraries.cs index 2469ab265..c10ae4ecf 100644 --- a/Yubico.Core/src/Yubico/PlatformInterop/Libraries.cs +++ b/Yubico.Core/src/Yubico/PlatformInterop/Libraries.cs @@ -14,7 +14,7 @@ // As long as we have the Libraries.Net48.cs class which holds the opposite preprocessor directive check, // this check is required - as having both at the same time is not possible. -#if !NET48 +#if !NET47 namespace Yubico.PlatformInterop { diff --git a/Yubico.YubiKey/src/Yubico.YubiKey.csproj b/Yubico.YubiKey/src/Yubico.YubiKey.csproj index d2a895eba..7ea6f2442 100644 --- a/Yubico.YubiKey/src/Yubico.YubiKey.csproj +++ b/Yubico.YubiKey/src/Yubico.YubiKey.csproj @@ -20,7 +20,7 @@ limitations under the License. --> As of 2020, netstandard2.0 allows us to reach the widest audience while providing a large enough set of the .NET library to be productive. --> - netstandard2.0;netstandard2.1;net48 + netstandard2.0;netstandard2.1;net472 @@ -130,8 +130,8 @@ limitations under the License. --> - - + +