From 22a894d8252a8c7aa8573605daf756223cbbead3 Mon Sep 17 00:00:00 2001 From: Ben Russell Date: Mon, 17 Nov 2025 18:39:41 -0600 Subject: [PATCH 1/6] Remove MatchingRefApiCompatBaseline.txt --- .../netcore/src/MatchingRefApiCompatBaseline.txt | 14 -------------- 1 file changed, 14 deletions(-) delete mode 100644 src/Microsoft.Data.SqlClient/netcore/src/MatchingRefApiCompatBaseline.txt diff --git a/src/Microsoft.Data.SqlClient/netcore/src/MatchingRefApiCompatBaseline.txt b/src/Microsoft.Data.SqlClient/netcore/src/MatchingRefApiCompatBaseline.txt deleted file mode 100644 index 6805b94289..0000000000 --- a/src/Microsoft.Data.SqlClient/netcore/src/MatchingRefApiCompatBaseline.txt +++ /dev/null @@ -1,14 +0,0 @@ -# -# netstandard dll has been shipped with IDbColumnSchemaGenerator inherited and SqlDataReader.GetColumnScheme() implemented in source, but not exposed in ref contract. -# Removing SqlDataReader.GetColumnScheme() from netstandard implementation potentially breaks existing customer source code -# that utilizes SqlDataReader.GetColumnScheme() indirectly by casting SqlDataReader to IDbColumnSchemaGenerator type. -# In order to prevent it, the API needs to be kept in public, and following 5 error message should be remaining in this baseline file. -# -# PoolBlockingPeriod was not added until .NET Framework 4.6.2, hence, the respective APIs are netcoreapp specific only. -Compat issues with assembly Microsoft.Data.SqlClient: -CannotRemoveBaseTypeOrInterface : Type 'Microsoft.Data.SqlClient.SqlDataReader' does not implement interface 'System.Data.Common.IDbColumnSchemaGenerator' in the reference but it does in the implementation. -MembersMustExist : Member 'Microsoft.Data.SqlClient.SqlDataReader.GetColumnSchema()' does not exist in the reference but it does exist in the implementation. -TypesMustExist : Type 'Microsoft.Data.SqlClient.PoolBlockingPeriod' does not exist in the reference but it does exist in the implementation. -MembersMustExist : Member 'Microsoft.Data.SqlClient.SqlConnectionStringBuilder.PoolBlockingPeriod.get()' does not exist in the reference but it does exist in the implementation. -MembersMustExist : Member 'Microsoft.Data.SqlClient.SqlConnectionStringBuilder.PoolBlockingPeriod.set(Microsoft.Data.SqlClient.PoolBlockingPeriod)' does not exist in the reference but it does exist in the implementation. -Total Issues: 5 From 706dc15c6698edc5ecfdbc5905bbffb1adca4b62 Mon Sep 17 00:00:00 2001 From: Ben Russell Date: Mon, 17 Nov 2025 18:44:58 -0600 Subject: [PATCH 2/6] Move TypeForwards to common project --- .../netcore/src/Microsoft.Data.SqlClient.csproj | 4 +++- .../TypeForwards.netcore.cs} | 4 ++++ 2 files changed, 7 insertions(+), 1 deletion(-) rename src/Microsoft.Data.SqlClient/{netcore/src/Microsoft.Data.SqlClient.TypeForwards.cs => src/TypeForwards.netcore.cs} (99%) diff --git a/src/Microsoft.Data.SqlClient/netcore/src/Microsoft.Data.SqlClient.csproj b/src/Microsoft.Data.SqlClient/netcore/src/Microsoft.Data.SqlClient.csproj index 950d7f83b1..32b9e76c98 100644 --- a/src/Microsoft.Data.SqlClient/netcore/src/Microsoft.Data.SqlClient.csproj +++ b/src/Microsoft.Data.SqlClient/netcore/src/Microsoft.Data.SqlClient.csproj @@ -861,7 +861,9 @@ System\Diagnostics\CodeAnalysis.cs - + + TypeForwards.netcore.cs + diff --git a/src/Microsoft.Data.SqlClient/netcore/src/Microsoft.Data.SqlClient.TypeForwards.cs b/src/Microsoft.Data.SqlClient/src/TypeForwards.netcore.cs similarity index 99% rename from src/Microsoft.Data.SqlClient/netcore/src/Microsoft.Data.SqlClient.TypeForwards.cs rename to src/Microsoft.Data.SqlClient/src/TypeForwards.netcore.cs index 1a726d07cc..96f635b7c7 100644 --- a/src/Microsoft.Data.SqlClient/netcore/src/Microsoft.Data.SqlClient.TypeForwards.cs +++ b/src/Microsoft.Data.SqlClient/src/TypeForwards.netcore.cs @@ -2,6 +2,8 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +#if NET + [assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Data.SqlDbType))] [assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Data.StatementCompletedEventArgs))] [assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Data.StatementCompletedEventHandler))] @@ -26,3 +28,5 @@ [assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Data.SqlTypes.SqlTruncateException))] [assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Data.SqlTypes.SqlTypeException))] [assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Data.SqlTypes.SqlXml))] + +#endif From ccbc69ff3d71fd35e538d422dd9962318bdf912d Mon Sep 17 00:00:00 2001 From: Ben Russell Date: Mon, 17 Nov 2025 18:46:02 -0600 Subject: [PATCH 3/6] removing netcore editorconfig, should use solution-wide .editorconfig going forward --- .../netcore/src/.editorconfig | 18 ------------------ 1 file changed, 18 deletions(-) delete mode 100644 src/Microsoft.Data.SqlClient/netcore/src/.editorconfig diff --git a/src/Microsoft.Data.SqlClient/netcore/src/.editorconfig b/src/Microsoft.Data.SqlClient/netcore/src/.editorconfig deleted file mode 100644 index b45670d5f5..0000000000 --- a/src/Microsoft.Data.SqlClient/netcore/src/.editorconfig +++ /dev/null @@ -1,18 +0,0 @@ -# editorconfig.org - -# top-most EditorConfig file -root = false - -[*.cs] - -# IDE0090: Use 'new(...)' -csharp_style_implicit_object_creation_when_type_is_apparent = false - -# IDE0063: Use simple 'using' statement -csharp_prefer_simple_using_statement = false - -# SYSLIB0039: Type or member is obsolete -dotnet_diagnostic.SYSLIB0039.severity = suggestion - -# CA1310: Specify StringComparison for correctness -dotnet_diagnostic.CA1310.severity = error From 79efe5276ca3440c31fdf55444eac5e66a74f3e7 Mon Sep 17 00:00:00 2001 From: Ben Russell Date: Mon, 17 Nov 2025 18:47:55 -0600 Subject: [PATCH 4/6] Remove pinvoke exception file, should be covered via APIScan --- ...lyzerExceptionList.analyzerdata.netcoreapp | 44 ------------------- 1 file changed, 44 deletions(-) delete mode 100644 src/Microsoft.Data.SqlClient/netcore/src/PinvokeAnalyzerExceptionList.analyzerdata.netcoreapp diff --git a/src/Microsoft.Data.SqlClient/netcore/src/PinvokeAnalyzerExceptionList.analyzerdata.netcoreapp b/src/Microsoft.Data.SqlClient/netcore/src/PinvokeAnalyzerExceptionList.analyzerdata.netcoreapp deleted file mode 100644 index 5c0648966d..0000000000 --- a/src/Microsoft.Data.SqlClient/netcore/src/PinvokeAnalyzerExceptionList.analyzerdata.netcoreapp +++ /dev/null @@ -1,44 +0,0 @@ - -kernel32.dll!LoadLibraryExW -sni.dll!GetSniMaxComposedSpnLength -sni.dll!SNIAddProviderWrapper -sni.dll!SNICheckConnectionWrapper -sni.dll!SNICloseWrapper -sni.dll!SNIGetInfoWrapper -sni.dll!SNIGetLastError -sni.dll!SNIInitialize -sni.dll!SNIOpenSyncExWrapper -sni.dll!SNIOpenWrapper -sni.dll!SNIPacketAllocateWrapper -sni.dll!SNIPacketGetDataWrapper -sni.dll!SNIPacketRelease -sni.dll!SNIPacketResetWrapper -sni.dll!SNIPacketSetData -sni.dll!SNIQueryInfo -sni.dll!SNIReadAsyncWrapper -sni.dll!SNIReadSyncOverAsync -sni.dll!SNIRemoveProviderWrapper -sni.dll!SNISecGenClientContextWrapper -sni.dll!SNISecInitPackage -sni.dll!SNISetInfoWrapper -sni.dll!SNITerminate -sni.dll!SNIWaitForSSLHandshakeToCompleteWrapper -sni.dll!SNIWriteAsyncWrapper -sni.dll!SNIWriteSyncOverAsync -sni.dll!UnmanagedIsTokenRestricted -sspicli.dll!AcceptSecurityContext -sspicli.dll!AcquireCredentialsHandleW -sspicli.dll!ApplyControlToken -sspicli.dll!CompleteAuthToken -sspicli.dll!DecryptMessage -sspicli.dll!DeleteSecurityContext -sspicli.dll!EncryptMessage -sspicli.dll!EnumerateSecurityPackagesW -sspicli.dll!FreeContextBuffer -sspicli.dll!FreeCredentialsHandle -sspicli.dll!InitializeSecurityContextW -sspicli.dll!QueryContextAttributesW -sspicli.dll!QuerySecurityContextToken -sspicli.dll!SetContextAttributesW -sspicli.dll!SspiEncodeStringsAsAuthIdentity -sspicli.dll!SspiFreeAuthIdentity \ No newline at end of file From 5c5946e23075c8ce4471aad10f4b996f4a0ad3e7 Mon Sep 17 00:00:00 2001 From: Ben Russell Date: Mon, 17 Nov 2025 18:58:02 -0600 Subject: [PATCH 5/6] Remove netfx .editorconfig, should use solution-wide .editorconfig going forward --- src/Microsoft.Data.SqlClient/netfx/src/.editorconfig | 12 ------------ 1 file changed, 12 deletions(-) delete mode 100644 src/Microsoft.Data.SqlClient/netfx/src/.editorconfig diff --git a/src/Microsoft.Data.SqlClient/netfx/src/.editorconfig b/src/Microsoft.Data.SqlClient/netfx/src/.editorconfig deleted file mode 100644 index f6fe9011f8..0000000000 --- a/src/Microsoft.Data.SqlClient/netfx/src/.editorconfig +++ /dev/null @@ -1,12 +0,0 @@ -# editorconfig.org - -# top-most EditorConfig file -root = false - -[*.cs] - -# IDE0090: Use 'new(...)' -csharp_style_implicit_object_creation_when_type_is_apparent = false - -# CA1310: Specify StringComparison for correctness -dotnet_diagnostic.CA1310.severity = error From 55f5bf0bcb8c95be9c85ea7c324b59b4ec9777f1 Mon Sep 17 00:00:00 2001 From: Ben Russell Date: Tue, 18 Nov 2025 14:24:19 -0600 Subject: [PATCH 6/6] Remove netfx GenerateThisAssemblyCs.targets and use the common one This is adds the NugetPackageVersion field to the netfx project, but since these are internal fields, it should not matter. --- .../netfx/src/Microsoft.Data.SqlClient.csproj | 2 +- .../targets/GenerateThisAssemblyCs.targets | 44 ------------------- 2 files changed, 1 insertion(+), 45 deletions(-) delete mode 100644 src/Microsoft.Data.SqlClient/netfx/tools/targets/GenerateThisAssemblyCs.targets diff --git a/src/Microsoft.Data.SqlClient/netfx/src/Microsoft.Data.SqlClient.csproj b/src/Microsoft.Data.SqlClient/netfx/src/Microsoft.Data.SqlClient.csproj index 104b9261e7..36a87b4eb2 100644 --- a/src/Microsoft.Data.SqlClient/netfx/src/Microsoft.Data.SqlClient.csproj +++ b/src/Microsoft.Data.SqlClient/netfx/src/Microsoft.Data.SqlClient.csproj @@ -1080,7 +1080,7 @@ - + diff --git a/src/Microsoft.Data.SqlClient/netfx/tools/targets/GenerateThisAssemblyCs.targets b/src/Microsoft.Data.SqlClient/netfx/tools/targets/GenerateThisAssemblyCs.targets deleted file mode 100644 index 35ab47239d..0000000000 --- a/src/Microsoft.Data.SqlClient/netfx/tools/targets/GenerateThisAssemblyCs.targets +++ /dev/null @@ -1,44 +0,0 @@ - - - - - - - - - -namespace System -{ -internal static class ThisAssembly -{ -internal const string InformationalVersion = "$(AssemblyFileVersion)"%3B -} -} - - - - - - - - - - - - - - -