diff --git a/src/MySqlConnector.Authentication.Ed25519/MySqlConnector.Authentication.Ed25519.csproj b/src/MySqlConnector.Authentication.Ed25519/MySqlConnector.Authentication.Ed25519.csproj index 7ff459ad5..f8e8efc10 100644 --- a/src/MySqlConnector.Authentication.Ed25519/MySqlConnector.Authentication.Ed25519.csproj +++ b/src/MySqlConnector.Authentication.Ed25519/MySqlConnector.Authentication.Ed25519.csproj @@ -1,7 +1,7 @@ - net461;netstandard2.0 + net462;netstandard2.0 MySqlConnector Ed25519 Authentication Plugin Implements the client_ed25519 authentication plugin for MariaDB. Copyright 2019–2022 Bradley Grainger diff --git a/src/MySqlConnector.Logging.Microsoft.Extensions.Logging/MySqlConnector.Logging.Microsoft.Extensions.Logging.csproj b/src/MySqlConnector.Logging.Microsoft.Extensions.Logging/MySqlConnector.Logging.Microsoft.Extensions.Logging.csproj index 418c0971d..c0c4ea754 100644 --- a/src/MySqlConnector.Logging.Microsoft.Extensions.Logging/MySqlConnector.Logging.Microsoft.Extensions.Logging.csproj +++ b/src/MySqlConnector.Logging.Microsoft.Extensions.Logging/MySqlConnector.Logging.Microsoft.Extensions.Logging.csproj @@ -12,7 +12,7 @@ - + diff --git a/src/MySqlConnector.Logging.NLog/MySqlConnector.Logging.NLog.csproj b/src/MySqlConnector.Logging.NLog/MySqlConnector.Logging.NLog.csproj index ff359b51e..baeb849b0 100644 --- a/src/MySqlConnector.Logging.NLog/MySqlConnector.Logging.NLog.csproj +++ b/src/MySqlConnector.Logging.NLog/MySqlConnector.Logging.NLog.csproj @@ -1,7 +1,7 @@ - net461;netstandard2.0 + net462;netstandard2.0 MySqlConnector Logging Adapter for NLog Writes lightly-structured MySqlConnector logging output to NLog. Copyright 2018–2022 Bradley Grainger diff --git a/src/MySqlConnector.Logging.Serilog/MySqlConnector.Logging.Serilog.csproj b/src/MySqlConnector.Logging.Serilog/MySqlConnector.Logging.Serilog.csproj index 4129910f3..b828bb8c2 100644 --- a/src/MySqlConnector.Logging.Serilog/MySqlConnector.Logging.Serilog.csproj +++ b/src/MySqlConnector.Logging.Serilog/MySqlConnector.Logging.Serilog.csproj @@ -1,7 +1,7 @@ - net461;netstandard2.0 + net462;netstandard2.0 MySqlConnector Logging Adapter for Serilog Writes lightly-structured MySqlConnector logging output to Serilog. Copyright 2017–2022 Bradley Grainger diff --git a/src/MySqlConnector.Logging.log4net/MySqlConnector.Logging.log4net.csproj b/src/MySqlConnector.Logging.log4net/MySqlConnector.Logging.log4net.csproj index 31f39920f..f3874bef9 100644 --- a/src/MySqlConnector.Logging.log4net/MySqlConnector.Logging.log4net.csproj +++ b/src/MySqlConnector.Logging.log4net/MySqlConnector.Logging.log4net.csproj @@ -1,7 +1,7 @@ - net461;netstandard2.0 + net462;netstandard2.0 MySqlConnector Logging Adapter for log4net Writes MySqlConnector logging output to log4net with one line of code. Copyright 2017–2022 Bradley Grainger diff --git a/src/MySqlConnector/CompatibilitySuppressions.xml b/src/MySqlConnector/CompatibilitySuppressions.xml index b7bf516eb..1bb44ab01 100644 --- a/src/MySqlConnector/CompatibilitySuppressions.xml +++ b/src/MySqlConnector/CompatibilitySuppressions.xml @@ -18,11 +18,24 @@ lib/net461/MySqlConnector.dll lib/net471/MySqlConnector.dll + + CP0001 + T:System.Data.Common.DbColumn + lib/net461/MySqlConnector.dll + lib/netstandard2.0/MySqlConnector.dll + true + + + CP0001 + T:System.Data.Common.DbColumn + lib/net462/MySqlConnector.dll + lib/net471/MySqlConnector.dll + CP0008 T:MySqlConnector.MySqlDataReader lib/netstandard2.0/MySqlConnector.dll - lib/net461/MySqlConnector.dll + lib/net462/MySqlConnector.dll PKV006 diff --git a/src/MySqlConnector/Core/ServerSession.cs b/src/MySqlConnector/Core/ServerSession.cs index 9a6a92aa3..ea95530e6 100644 --- a/src/MySqlConnector/Core/ServerSession.cs +++ b/src/MySqlConnector/Core/ServerSession.cs @@ -1597,7 +1597,7 @@ X509CertificateCollection LoadCertificate(string sslKeyFile, string sslCertifica } rsa.ImportParameters(rsaParameters); -#if NET461 || NET471 +#if NET462 || NET471 var certificate = new X509Certificate2(sslCertificateFile, "", X509KeyStorageFlags.MachineKeySet) { PrivateKey = rsa, diff --git a/src/MySqlConnector/Logging/MySqlConnectorLogManager.cs b/src/MySqlConnector/Logging/MySqlConnectorLogManager.cs index 226b2cb51..9c914425b 100644 --- a/src/MySqlConnector/Logging/MySqlConnectorLogManager.cs +++ b/src/MySqlConnector/Logging/MySqlConnectorLogManager.cs @@ -47,7 +47,9 @@ private sealed class MySqlConnectorLogger : ILogger public MySqlConnectorLogger(IMySqlConnectorLogger logger) => m_logger = logger; - public IDisposable BeginScope(TState state) => throw new NotSupportedException(); + public IDisposable BeginScope(TState state) + where TState : notnull + => throw new NotSupportedException(); public bool IsEnabled(LogLevel logLevel) => m_logger.IsEnabled(ConvertLogLevel(logLevel)); diff --git a/src/MySqlConnector/MySqlConnector.csproj b/src/MySqlConnector/MySqlConnector.csproj index 2d1d37dd5..c80814b5d 100644 --- a/src/MySqlConnector/MySqlConnector.csproj +++ b/src/MySqlConnector/MySqlConnector.csproj @@ -1,7 +1,7 @@ - net461;net471;netstandard2.0;netstandard2.1;net6.0;net7.0 + net462;net471;netstandard2.0;netstandard2.1;net6.0;net7.0 A truly async MySQL ADO.NET provider, supporting MySQL Server, MariaDB, Percona Server, Amazon Aurora, Azure Database for MySQL and more. Copyright 2016–2022 Bradley Grainger Bradley Grainger @@ -16,23 +16,23 @@ - + - + - + - - + + diff --git a/src/MySqlConnector/MySqlDataReader.cs b/src/MySqlConnector/MySqlDataReader.cs index a196dbd5a..3dc1f9dd2 100644 --- a/src/MySqlConnector/MySqlDataReader.cs +++ b/src/MySqlConnector/MySqlDataReader.cs @@ -11,7 +11,7 @@ namespace MySqlConnector; #pragma warning disable CA1010 // Generic interface should also be implemented -#if NET461 +#if NET462 public sealed class MySqlDataReader : DbDataReader #else public sealed class MySqlDataReader : DbDataReader, IDbColumnSchemaGenerator diff --git a/src/MySqlConnector/Shims/DbColumn.cs b/src/MySqlConnector/Shims/DbColumn.cs index 7aa45e216..814d125bb 100644 --- a/src/MySqlConnector/Shims/DbColumn.cs +++ b/src/MySqlConnector/Shims/DbColumn.cs @@ -1,4 +1,4 @@ -#if NET461 +#if NET462 #pragma warning disable CA1716 // Don't use reserved language keywords namespace System.Data.Common; diff --git a/src/MySqlConnector/Utilities/NullableAttributes.cs b/src/MySqlConnector/Utilities/NullableAttributes.cs index 833e9b0ec..39beefa27 100644 --- a/src/MySqlConnector/Utilities/NullableAttributes.cs +++ b/src/MySqlConnector/Utilities/NullableAttributes.cs @@ -1,7 +1,7 @@ // Supports using nullable attributes on older frameworks. // Copied from https://github.com/dotnet/corefx/blob/master/src/Common/src/CoreLib/System/Diagnostics/CodeAnalysis/NullableAttributes.cs -#if NET461 || NET471 || NETSTANDARD2_0 || NETCOREAPP2_1 +#if NET462 || NET471 || NETSTANDARD2_0 || NETCOREAPP2_1 namespace System.Diagnostics.CodeAnalysis; /// Specifies that null is allowed as an input even if the corresponding type disallows it. diff --git a/src/MySqlConnector/Utilities/Utility.cs b/src/MySqlConnector/Utilities/Utility.cs index b15dd479b..6da68bcc7 100644 --- a/src/MySqlConnector/Utilities/Utility.cs +++ b/src/MySqlConnector/Utilities/Utility.cs @@ -518,7 +518,7 @@ public static void SwapBytes(byte[] bytes, int offset1, int offset2) bytes[offset2] = swap; } -#if NET461 +#if NET462 public static bool IsWindows() => Environment.OSVersion.Platform == PlatformID.Win32NT; public static void GetOSDetails(out string? os, out string osDescription, out string architecture) @@ -557,13 +557,13 @@ public static void GetOSDetails(out string? os, out string osDescription, out st } #endif -#if NET461 +#if NET462 public static SslProtocols GetDefaultSslProtocols() { if (!s_defaultSslProtocols.HasValue) { // Prior to .NET Framework 4.7, SslProtocols.None is not a valid argument to SslStream.AuthenticateAsClientAsync. - // If the NET461 build is loaded by an application that targets .NET 4.7 (or later), or if app.config has set + // If the NET462 build is loaded by an application that targets .NET 4.7 (or later), or if app.config has set // Switch.System.Net.DontEnableSystemDefaultTlsVersions to false, then SslProtocols.None will work; otherwise, // if the application targets .NET 4.6.2 or earlier and hasn't changed the AppContext switch, then it will // fail at runtime. We attempt to determine if it will fail by accessing the internal static