From 27e6af85137ce6b72a95a5dca242833bff3e3ce9 Mon Sep 17 00:00:00 2001 From: Ben Russell Date: Thu, 17 Oct 2024 15:39:03 -0500 Subject: [PATCH 01/10] Move crypt32 libraries --- .../netcore/src/Microsoft.Data.SqlClient.csproj | 12 ++++++++---- .../Windows/Crypt32/Interop.certificates.netcore.cs} | 2 +- .../Crypt32/Interop.certificates_types.netcore.cs} | 2 +- 3 files changed, 10 insertions(+), 6 deletions(-) rename src/Microsoft.Data.SqlClient/{netcore/src/Common/Interop/Windows/Crypt32/Interop.certificates.cs => src/Interop/Windows/Crypt32/Interop.certificates.netcore.cs} (96%) rename src/Microsoft.Data.SqlClient/{netcore/src/Common/Interop/Windows/Crypt32/Interop.certificates_types.cs => src/Interop/Windows/Crypt32/Interop.certificates_types.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 08e07b1989..d48c4cabc4 100644 --- a/src/Microsoft.Data.SqlClient/netcore/src/Microsoft.Data.SqlClient.csproj +++ b/src/Microsoft.Data.SqlClient/netcore/src/Microsoft.Data.SqlClient.csproj @@ -680,8 +680,11 @@ - - Common\Interop\Windows\Kernel32\Interop.GetFileType_SafeHandle.cs + + Common\Interop\Windows\Crypt32\Interop.certificates.netcore.cs + + + Common\Interop\Windows\Crypt32\Interop.certificates_types.netcore.cs Common\Interop\Windows\Interop.Errors.cs @@ -701,6 +704,9 @@ Common\Interop\Windows\Kernel32\Interop.FileTypes.cs + + Common\Interop\Windows\Kernel32\Interop.GetFileType_SafeHandle.cs + Common\Interop\Windows\Kernel32\Interop.GetFullPathName.cs @@ -759,8 +765,6 @@ Microsoft\Data\SqlTypes\SqlFileStream.Windows.cs - - diff --git a/src/Microsoft.Data.SqlClient/netcore/src/Common/Interop/Windows/Crypt32/Interop.certificates.cs b/src/Microsoft.Data.SqlClient/src/Interop/Windows/Crypt32/Interop.certificates.netcore.cs similarity index 96% rename from src/Microsoft.Data.SqlClient/netcore/src/Common/Interop/Windows/Crypt32/Interop.certificates.cs rename to src/Microsoft.Data.SqlClient/src/Interop/Windows/Crypt32/Interop.certificates.netcore.cs index 6b8e616894..4610352a46 100644 --- a/src/Microsoft.Data.SqlClient/netcore/src/Common/Interop/Windows/Crypt32/Interop.certificates.cs +++ b/src/Microsoft.Data.SqlClient/src/Interop/Windows/Crypt32/Interop.certificates.netcore.cs @@ -2,7 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#if !NET8_0_OR_GREATER +#if !NETFRAMEWORK && !NET8_0_OR_GREATER using System; using System.Runtime.InteropServices; diff --git a/src/Microsoft.Data.SqlClient/netcore/src/Common/Interop/Windows/Crypt32/Interop.certificates_types.cs b/src/Microsoft.Data.SqlClient/src/Interop/Windows/Crypt32/Interop.certificates_types.netcore.cs similarity index 99% rename from src/Microsoft.Data.SqlClient/netcore/src/Common/Interop/Windows/Crypt32/Interop.certificates_types.cs rename to src/Microsoft.Data.SqlClient/src/Interop/Windows/Crypt32/Interop.certificates_types.netcore.cs index c120f1ba71..efe37caf5f 100644 --- a/src/Microsoft.Data.SqlClient/netcore/src/Common/Interop/Windows/Crypt32/Interop.certificates_types.cs +++ b/src/Microsoft.Data.SqlClient/src/Interop/Windows/Crypt32/Interop.certificates_types.netcore.cs @@ -2,7 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#if !NET8_0_OR_GREATER +#if !NETFRAMEWORK && !NET8_0_OR_GREATER using System; using System.Runtime.InteropServices; From aed17d2dbacf697d524b826472c915894d9b2d42 Mon Sep 17 00:00:00 2001 From: Ben Russell Date: Thu, 17 Oct 2024 16:12:58 -0500 Subject: [PATCH 02/10] Move the rest of kernel32 interop --- .../netcore/src/Microsoft.Data.SqlClient.csproj | 16 ++++++++++++---- .../Kernel32/Interop.CloseHandle.netcore.cs} | 2 +- .../Kernel32/Interop.FreeLibrary.netcore.cs} | 4 ++++ .../Kernel32/Interop.GetProcAddress.netcore.cs} | 4 ++++ .../Kernel32/Interop.LoadLibraryEx.netcore.cs} | 4 ++++ 5 files changed, 25 insertions(+), 5 deletions(-) rename src/Microsoft.Data.SqlClient/{netcore/src/Common/Interop/Windows/kernel32/Interop.CloseHandle.cs => src/Interop/Windows/Kernel32/Interop.CloseHandle.netcore.cs} (92%) rename src/Microsoft.Data.SqlClient/{netcore/src/Common/Interop/Windows/kernel32/Interop.FreeLibrary.cs => src/Interop/Windows/Kernel32/Interop.FreeLibrary.netcore.cs} (95%) rename src/Microsoft.Data.SqlClient/{netcore/src/Common/Interop/Windows/kernel32/Interop.GetProcAddress.cs => src/Interop/Windows/Kernel32/Interop.GetProcAddress.netcore.cs} (96%) rename src/Microsoft.Data.SqlClient/{netcore/src/Common/Interop/Windows/kernel32/Interop.LoadLibraryEx.cs => src/Interop/Windows/Kernel32/Interop.LoadLibraryEx.netcore.cs} (96%) 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 d48c4cabc4..83d54b59ab 100644 --- a/src/Microsoft.Data.SqlClient/netcore/src/Microsoft.Data.SqlClient.csproj +++ b/src/Microsoft.Data.SqlClient/netcore/src/Microsoft.Data.SqlClient.csproj @@ -695,6 +695,12 @@ Common\Interop\Windows\Interop.UNICODE_STRING.cs + + Common\Interop\Windows\Kernel32\Interop.GetProcAddress.netcore.cs + + + Common\Interop\Windows\Kernel32\Interop.CloseHandle.netcore.cs + Common\Interop\Windows\Kernel32\Interop.CTL_CODE.cs @@ -704,6 +710,9 @@ Common\Interop\Windows\Kernel32\Interop.FileTypes.cs + + Common\Interop\Windows\Kernel32\Interop.FreeLibrary.netcore.cs + Common\Interop\Windows\Kernel32\Interop.GetFileType_SafeHandle.cs @@ -716,6 +725,9 @@ Common\Interop\Windows\Kernel32\Interop.IoControlTransferType.cs + + Common\Interop\Windows\Kernel32\Interop.LoadLibraryEx.netcore.cs + Common\Interop\Windows\Kernel32\Interop.SetThreadErrorMode.cs @@ -765,10 +777,6 @@ Microsoft\Data\SqlTypes\SqlFileStream.Windows.cs - - - - diff --git a/src/Microsoft.Data.SqlClient/netcore/src/Common/Interop/Windows/kernel32/Interop.CloseHandle.cs b/src/Microsoft.Data.SqlClient/src/Interop/Windows/Kernel32/Interop.CloseHandle.netcore.cs similarity index 92% rename from src/Microsoft.Data.SqlClient/netcore/src/Common/Interop/Windows/kernel32/Interop.CloseHandle.cs rename to src/Microsoft.Data.SqlClient/src/Interop/Windows/Kernel32/Interop.CloseHandle.netcore.cs index f133f10156..1602e7251c 100644 --- a/src/Microsoft.Data.SqlClient/netcore/src/Common/Interop/Windows/kernel32/Interop.CloseHandle.cs +++ b/src/Microsoft.Data.SqlClient/src/Interop/Windows/Kernel32/Interop.CloseHandle.netcore.cs @@ -2,7 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#if !NET8_0_OR_GREATER +#if !NETFRAMEWORK && !NET8_0_OR_GREATER using System; using System.Runtime.InteropServices; diff --git a/src/Microsoft.Data.SqlClient/netcore/src/Common/Interop/Windows/kernel32/Interop.FreeLibrary.cs b/src/Microsoft.Data.SqlClient/src/Interop/Windows/Kernel32/Interop.FreeLibrary.netcore.cs similarity index 95% rename from src/Microsoft.Data.SqlClient/netcore/src/Common/Interop/Windows/kernel32/Interop.FreeLibrary.cs rename to src/Microsoft.Data.SqlClient/src/Interop/Windows/Kernel32/Interop.FreeLibrary.netcore.cs index e3b330b33d..ce18335820 100644 --- a/src/Microsoft.Data.SqlClient/netcore/src/Common/Interop/Windows/kernel32/Interop.FreeLibrary.cs +++ b/src/Microsoft.Data.SqlClient/src/Interop/Windows/Kernel32/Interop.FreeLibrary.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 !NETFRAMEWORK + using System; using System.Runtime.InteropServices; @@ -15,3 +17,5 @@ internal partial class Kernel32 public static extern unsafe bool FreeLibrary([In] IntPtr hModule); } } + +#endif diff --git a/src/Microsoft.Data.SqlClient/netcore/src/Common/Interop/Windows/kernel32/Interop.GetProcAddress.cs b/src/Microsoft.Data.SqlClient/src/Interop/Windows/Kernel32/Interop.GetProcAddress.netcore.cs similarity index 96% rename from src/Microsoft.Data.SqlClient/netcore/src/Common/Interop/Windows/kernel32/Interop.GetProcAddress.cs rename to src/Microsoft.Data.SqlClient/src/Interop/Windows/Kernel32/Interop.GetProcAddress.netcore.cs index 4178eba4e7..393bbd2846 100644 --- a/src/Microsoft.Data.SqlClient/netcore/src/Common/Interop/Windows/kernel32/Interop.GetProcAddress.cs +++ b/src/Microsoft.Data.SqlClient/src/Interop/Windows/Kernel32/Interop.GetProcAddress.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 !NETFRAMEWORK + using System; using System.Runtime.InteropServices; @@ -18,3 +20,5 @@ internal partial class Kernel32 public static extern IntPtr GetProcAddress(IntPtr hModule, string lpProcName); } } + +#endif diff --git a/src/Microsoft.Data.SqlClient/netcore/src/Common/Interop/Windows/kernel32/Interop.LoadLibraryEx.cs b/src/Microsoft.Data.SqlClient/src/Interop/Windows/Kernel32/Interop.LoadLibraryEx.netcore.cs similarity index 96% rename from src/Microsoft.Data.SqlClient/netcore/src/Common/Interop/Windows/kernel32/Interop.LoadLibraryEx.cs rename to src/Microsoft.Data.SqlClient/src/Interop/Windows/Kernel32/Interop.LoadLibraryEx.netcore.cs index d24d4d3c6a..2082659b2f 100644 --- a/src/Microsoft.Data.SqlClient/netcore/src/Common/Interop/Windows/kernel32/Interop.LoadLibraryEx.cs +++ b/src/Microsoft.Data.SqlClient/src/Interop/Windows/Kernel32/Interop.LoadLibraryEx.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 !NETFRAMEWORK + using System; using System.Runtime.InteropServices; @@ -18,3 +20,5 @@ internal partial class Kernel32 public static extern SafeLibraryHandle LoadLibraryExW([In] string lpwLibFileName, [In] IntPtr hFile, [In] uint dwFlags); } } + +#endif From 855ba863b0dddf6ad7f37e6e7b2b941366d8f4ba Mon Sep 17 00:00:00 2001 From: Ben Russell Date: Thu, 17 Oct 2024 16:21:11 -0500 Subject: [PATCH 03/10] Move SChannel interop --- .../netcore/src/Microsoft.Data.SqlClient.csproj | 12 +++++++++--- .../SChannel/Interop.SECURITY_STATUS.netcore.cs} | 2 +- ...rop.SecPkgContext_ApplicationProtocol.netcore.cs} | 4 ++++ .../SecPkgContext_ConnectionInfo.netcore.cs} | 2 +- 4 files changed, 15 insertions(+), 5 deletions(-) rename src/Microsoft.Data.SqlClient/{netcore/src/Common/Interop/Windows/SChannel/Interop.SECURITY_STATUS.cs => src/Interop/Windows/SChannel/Interop.SECURITY_STATUS.netcore.cs} (99%) rename src/Microsoft.Data.SqlClient/{netcore/src/Common/Interop/Windows/SChannel/Interop.SecPkgContext_ApplicationProtocol.cs => src/Interop/Windows/SChannel/Interop.SecPkgContext_ApplicationProtocol.netcore.cs} (97%) rename src/Microsoft.Data.SqlClient/{netcore/src/Common/Interop/Windows/SChannel/SecPkgContext_ConnectionInfo.cs => src/Interop/Windows/SChannel/SecPkgContext_ConnectionInfo.netcore.cs} (97%) 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 83d54b59ab..df306ab0b4 100644 --- a/src/Microsoft.Data.SqlClient/netcore/src/Microsoft.Data.SqlClient.csproj +++ b/src/Microsoft.Data.SqlClient/netcore/src/Microsoft.Data.SqlClient.csproj @@ -746,6 +746,15 @@ Common\Interop\Windows\NtDll\Interop.SecurityQualityOfService.cs + + Common\Interop\Windows\SChannel\Interop.SecPkgContext_ApplicationProtocol.netcore.cs + + + Common\Interop\Windows\SChannel\SecPkgContext_ConnectionInfo.netcore.cs + + + Common\Interop\Windows\SChannel\Interop.SECURITY_STATUS.netcore.cs + Microsoft\Data\Common\AdapterUtil.Windows.cs @@ -777,9 +786,6 @@ Microsoft\Data\SqlTypes\SqlFileStream.Windows.cs - - - diff --git a/src/Microsoft.Data.SqlClient/netcore/src/Common/Interop/Windows/SChannel/Interop.SECURITY_STATUS.cs b/src/Microsoft.Data.SqlClient/src/Interop/Windows/SChannel/Interop.SECURITY_STATUS.netcore.cs similarity index 99% rename from src/Microsoft.Data.SqlClient/netcore/src/Common/Interop/Windows/SChannel/Interop.SECURITY_STATUS.cs rename to src/Microsoft.Data.SqlClient/src/Interop/Windows/SChannel/Interop.SECURITY_STATUS.netcore.cs index dfd98621d6..a5223dc6ea 100644 --- a/src/Microsoft.Data.SqlClient/netcore/src/Common/Interop/Windows/SChannel/Interop.SECURITY_STATUS.cs +++ b/src/Microsoft.Data.SqlClient/src/Interop/Windows/SChannel/Interop.SECURITY_STATUS.netcore.cs @@ -2,7 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#if !NET8_0_OR_GREATER +#if !NETFRAMEWORK && !NET8_0_OR_GREATER internal static partial class Interop { diff --git a/src/Microsoft.Data.SqlClient/netcore/src/Common/Interop/Windows/SChannel/Interop.SecPkgContext_ApplicationProtocol.cs b/src/Microsoft.Data.SqlClient/src/Interop/Windows/SChannel/Interop.SecPkgContext_ApplicationProtocol.netcore.cs similarity index 97% rename from src/Microsoft.Data.SqlClient/netcore/src/Common/Interop/Windows/SChannel/Interop.SecPkgContext_ApplicationProtocol.cs rename to src/Microsoft.Data.SqlClient/src/Interop/Windows/SChannel/Interop.SecPkgContext_ApplicationProtocol.netcore.cs index 447afb98db..acfae06fe1 100644 --- a/src/Microsoft.Data.SqlClient/netcore/src/Common/Interop/Windows/SChannel/Interop.SecPkgContext_ApplicationProtocol.cs +++ b/src/Microsoft.Data.SqlClient/src/Interop/Windows/SChannel/Interop.SecPkgContext_ApplicationProtocol.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 !NETFRAMEWORK + using System; using System.Runtime.InteropServices; @@ -40,3 +42,5 @@ public byte[] Protocol } } } + +#endif diff --git a/src/Microsoft.Data.SqlClient/netcore/src/Common/Interop/Windows/SChannel/SecPkgContext_ConnectionInfo.cs b/src/Microsoft.Data.SqlClient/src/Interop/Windows/SChannel/SecPkgContext_ConnectionInfo.netcore.cs similarity index 97% rename from src/Microsoft.Data.SqlClient/netcore/src/Common/Interop/Windows/SChannel/SecPkgContext_ConnectionInfo.cs rename to src/Microsoft.Data.SqlClient/src/Interop/Windows/SChannel/SecPkgContext_ConnectionInfo.netcore.cs index 762c3ea146..61854ea250 100644 --- a/src/Microsoft.Data.SqlClient/netcore/src/Common/Interop/Windows/SChannel/SecPkgContext_ConnectionInfo.cs +++ b/src/Microsoft.Data.SqlClient/src/Interop/Windows/SChannel/SecPkgContext_ConnectionInfo.netcore.cs @@ -2,7 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#if !NET8_0_OR_GREATER +#if !NETFRAMEWORK && !NET8_0_OR_GREATER using System.Runtime.InteropServices; From 8bf0b14e97020e87771fb9f26e8de9e3a13376b7 Mon Sep 17 00:00:00 2001 From: Ben Russell Date: Thu, 17 Oct 2024 16:33:46 -0500 Subject: [PATCH 04/10] Move SSPI interop --- .../src/Microsoft.Data.SqlClient.csproj | 60 ++++++++++++++----- .../Windows/SspiCli/GlobalSSPI.netcore.cs} | 2 +- .../Windows/SspiCli/Interop.SSPI.netcore.cs} | 2 +- .../SspiCli/NegotiationInfoClass.netcore.cs} | 2 +- .../Windows/SspiCli/SSPIAuthType.netcore.cs} | 2 +- .../Windows/SspiCli/SSPIInterface.netcore.cs} | 2 +- .../SspiCli/SSPISecureChannelType.netcore.cs} | 2 +- .../Windows/SspiCli/SSPIWrapper.netcore.cs} | 2 +- .../SspiCli/SafeDeleteContext.netcore.cs} | 2 +- .../SecPkgContext_Bindings.netcore.cs} | 2 +- ...SecPkgContext_NegotiationInfoW.netcore.cs} | 2 +- .../SspiCli/SecPkgContext_Sizes.netcore.cs} | 2 +- .../SecPkgContext_StreamSizes.netcore.cs} | 2 +- .../SspiCli/SecurityPackageInfo.netcore.cs} | 2 +- .../SecurityPackageInfoClass.netcore.cs} | 2 +- .../SspiCli/SecuritySafeHandles.netcore.cs} | 2 +- .../src/Microsoft.Data.SqlClient.csproj | 3 + 17 files changed, 63 insertions(+), 30 deletions(-) rename src/Microsoft.Data.SqlClient/{netcore/src/Common/Interop/Windows/sspicli/GlobalSSPI.cs => src/Interop/Windows/SspiCli/GlobalSSPI.netcore.cs} (92%) rename src/Microsoft.Data.SqlClient/{netcore/src/Common/Interop/Windows/sspicli/Interop.SSPI.cs => src/Interop/Windows/SspiCli/Interop.SSPI.netcore.cs} (99%) rename src/Microsoft.Data.SqlClient/{netcore/src/Common/Interop/Windows/sspicli/NegotiationInfoClass.cs => src/Interop/Windows/SspiCli/NegotiationInfoClass.netcore.cs} (98%) rename src/Microsoft.Data.SqlClient/{netcore/src/Common/Interop/Windows/sspicli/SSPIAuthType.cs => src/Interop/Windows/SspiCli/SSPIAuthType.netcore.cs} (99%) rename src/Microsoft.Data.SqlClient/{netcore/src/Common/Interop/Windows/sspicli/SSPIInterface.cs => src/Interop/Windows/SspiCli/SSPIInterface.netcore.cs} (98%) rename src/Microsoft.Data.SqlClient/{netcore/src/Common/Interop/Windows/sspicli/SSPISecureChannelType.cs => src/Interop/Windows/SspiCli/SSPISecureChannelType.netcore.cs} (99%) rename src/Microsoft.Data.SqlClient/{netcore/src/Common/Interop/Windows/sspicli/SSPIWrapper.cs => src/Interop/Windows/SspiCli/SSPIWrapper.netcore.cs} (99%) rename src/Microsoft.Data.SqlClient/{netcore/src/Common/Interop/Windows/sspicli/SafeDeleteContext.cs => src/Interop/Windows/SspiCli/SafeDeleteContext.netcore.cs} (97%) rename src/Microsoft.Data.SqlClient/{netcore/src/Common/Interop/Windows/sspicli/SecPkgContext_Bindings.cs => src/Interop/Windows/SspiCli/SecPkgContext_Bindings.netcore.cs} (91%) rename src/Microsoft.Data.SqlClient/{netcore/src/Common/Interop/Windows/sspicli/SecPkgContext_NegotiationInfoW.cs => src/Interop/Windows/SspiCli/SecPkgContext_NegotiationInfoW.netcore.cs} (92%) rename src/Microsoft.Data.SqlClient/{netcore/src/Common/Interop/Windows/sspicli/SecPkgContext_Sizes.cs => src/Interop/Windows/SspiCli/SecPkgContext_Sizes.netcore.cs} (97%) rename src/Microsoft.Data.SqlClient/{netcore/src/Common/Interop/Windows/sspicli/SecPkgContext_StreamSizes.cs => src/Interop/Windows/SspiCli/SecPkgContext_StreamSizes.netcore.cs} (97%) rename src/Microsoft.Data.SqlClient/{netcore/src/Common/Interop/Windows/sspicli/SecurityPackageInfo.cs => src/Interop/Windows/SspiCli/SecurityPackageInfo.netcore.cs} (93%) rename src/Microsoft.Data.SqlClient/{netcore/src/Common/Interop/Windows/sspicli/SecurityPackageInfoClass.cs => src/Interop/Windows/SspiCli/SecurityPackageInfoClass.netcore.cs} (98%) rename src/Microsoft.Data.SqlClient/{netcore/src/Common/Interop/Windows/sspicli/SecuritySafeHandles.cs => src/Interop/Windows/SspiCli/SecuritySafeHandles.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 df306ab0b4..46f1436127 100644 --- a/src/Microsoft.Data.SqlClient/netcore/src/Microsoft.Data.SqlClient.csproj +++ b/src/Microsoft.Data.SqlClient/netcore/src/Microsoft.Data.SqlClient.csproj @@ -755,6 +755,51 @@ Common\Interop\Windows\SChannel\Interop.SECURITY_STATUS.netcore.cs + + Common\Interop\Windows\SspiCli\GlobalSSPI.netcore.cs + + + Common\Interop\Windows\SspiCli\Interop.SSPI.netcore.cs + + + Common\Interop\Windows\SspiCli\NegotiationInfoClass.netcore.cs + + + Common\Interop\Windows\SspiCli\SafeDeleteContext.netcore.cs + + + Common\Interop\Windows\SspiCli\SecPkgContext_Bindings.netcore.cs + + + Common\Interop\Windows\SspiCli\SecPkgContext_NegotiationInfoW.netcore.cs + + + Common\Interop\Windows\SspiCli\SecPkgContext_Sizes.netcore.cs + + + Common\Interop\Windows\SspiCli\SecPkgContext_StreamSizes.netcore.cs + + + Common\Interop\Windows\SspiCli\SecurityPackageInfo.netcore.cs + + + Common\Interop\Windows\SspiCli\SecurityPackageInfoClass.netcore.cs + + + Common\Interop\Windows\SspiCli\SecuritySafeHandles.netcore.cs + + + Common\Interop\Windows\SspiCli\SSPIAuthType.netcore.cs + + + Common\Interop\Windows\SspiCli\SSPIInterface.netcore.cs + + + Common\Interop\Windows\SspiCli\SSPISecureChannelType.netcore.cs + + + Common\Interop\Windows\SspiCli\SSPIWrapper.netcore.cs + Microsoft\Data\Common\AdapterUtil.Windows.cs @@ -786,21 +831,6 @@ Microsoft\Data\SqlTypes\SqlFileStream.Windows.cs - - - - - - - - - - - - - - - diff --git a/src/Microsoft.Data.SqlClient/netcore/src/Common/Interop/Windows/sspicli/GlobalSSPI.cs b/src/Microsoft.Data.SqlClient/src/Interop/Windows/SspiCli/GlobalSSPI.netcore.cs similarity index 92% rename from src/Microsoft.Data.SqlClient/netcore/src/Common/Interop/Windows/sspicli/GlobalSSPI.cs rename to src/Microsoft.Data.SqlClient/src/Interop/Windows/SspiCli/GlobalSSPI.netcore.cs index 6077ba5a77..e4414084d8 100644 --- a/src/Microsoft.Data.SqlClient/netcore/src/Common/Interop/Windows/sspicli/GlobalSSPI.cs +++ b/src/Microsoft.Data.SqlClient/src/Interop/Windows/SspiCli/GlobalSSPI.netcore.cs @@ -2,7 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#if !NET8_0_OR_GREATER +#if !NETFRAMEWORK && !NET8_0_OR_GREATER namespace System.Net { diff --git a/src/Microsoft.Data.SqlClient/netcore/src/Common/Interop/Windows/sspicli/Interop.SSPI.cs b/src/Microsoft.Data.SqlClient/src/Interop/Windows/SspiCli/Interop.SSPI.netcore.cs similarity index 99% rename from src/Microsoft.Data.SqlClient/netcore/src/Common/Interop/Windows/sspicli/Interop.SSPI.cs rename to src/Microsoft.Data.SqlClient/src/Interop/Windows/SspiCli/Interop.SSPI.netcore.cs index bb8d1ede6a..b6534c0f0e 100644 --- a/src/Microsoft.Data.SqlClient/netcore/src/Common/Interop/Windows/sspicli/Interop.SSPI.cs +++ b/src/Microsoft.Data.SqlClient/src/Interop/Windows/SspiCli/Interop.SSPI.netcore.cs @@ -2,7 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#if !NET8_0_OR_GREATER +#if !NETFRAMEWORK && !NET8_0_OR_GREATER using System; using System.Net.Security; diff --git a/src/Microsoft.Data.SqlClient/netcore/src/Common/Interop/Windows/sspicli/NegotiationInfoClass.cs b/src/Microsoft.Data.SqlClient/src/Interop/Windows/SspiCli/NegotiationInfoClass.netcore.cs similarity index 98% rename from src/Microsoft.Data.SqlClient/netcore/src/Common/Interop/Windows/sspicli/NegotiationInfoClass.cs rename to src/Microsoft.Data.SqlClient/src/Interop/Windows/SspiCli/NegotiationInfoClass.netcore.cs index 133c935174..1df19c8408 100644 --- a/src/Microsoft.Data.SqlClient/netcore/src/Common/Interop/Windows/sspicli/NegotiationInfoClass.cs +++ b/src/Microsoft.Data.SqlClient/src/Interop/Windows/SspiCli/NegotiationInfoClass.netcore.cs @@ -2,7 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#if !NET8_0_OR_GREATER +#if !NETFRAMEWORK && !NET8_0_OR_GREATER using System.Runtime.InteropServices; diff --git a/src/Microsoft.Data.SqlClient/netcore/src/Common/Interop/Windows/sspicli/SSPIAuthType.cs b/src/Microsoft.Data.SqlClient/src/Interop/Windows/SspiCli/SSPIAuthType.netcore.cs similarity index 99% rename from src/Microsoft.Data.SqlClient/netcore/src/Common/Interop/Windows/sspicli/SSPIAuthType.cs rename to src/Microsoft.Data.SqlClient/src/Interop/Windows/SspiCli/SSPIAuthType.netcore.cs index 4a86701ffd..0bbc80dae9 100644 --- a/src/Microsoft.Data.SqlClient/netcore/src/Common/Interop/Windows/sspicli/SSPIAuthType.cs +++ b/src/Microsoft.Data.SqlClient/src/Interop/Windows/SspiCli/SSPIAuthType.netcore.cs @@ -2,7 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#if !NET8_0_OR_GREATER +#if !NETFRAMEWORK && !NET8_0_OR_GREATER using System.Net.Security; using System.Runtime.InteropServices; diff --git a/src/Microsoft.Data.SqlClient/netcore/src/Common/Interop/Windows/sspicli/SSPIInterface.cs b/src/Microsoft.Data.SqlClient/src/Interop/Windows/SspiCli/SSPIInterface.netcore.cs similarity index 98% rename from src/Microsoft.Data.SqlClient/netcore/src/Common/Interop/Windows/sspicli/SSPIInterface.cs rename to src/Microsoft.Data.SqlClient/src/Interop/Windows/SspiCli/SSPIInterface.netcore.cs index 22e9a3c93d..401cc372f7 100644 --- a/src/Microsoft.Data.SqlClient/netcore/src/Common/Interop/Windows/sspicli/SSPIInterface.cs +++ b/src/Microsoft.Data.SqlClient/src/Interop/Windows/SspiCli/SSPIInterface.netcore.cs @@ -2,7 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#if !NET8_0_OR_GREATER +#if !NETFRAMEWORK && !NET8_0_OR_GREATER using System.Net.Security; using System.Runtime.InteropServices; diff --git a/src/Microsoft.Data.SqlClient/netcore/src/Common/Interop/Windows/sspicli/SSPISecureChannelType.cs b/src/Microsoft.Data.SqlClient/src/Interop/Windows/SspiCli/SSPISecureChannelType.netcore.cs similarity index 99% rename from src/Microsoft.Data.SqlClient/netcore/src/Common/Interop/Windows/sspicli/SSPISecureChannelType.cs rename to src/Microsoft.Data.SqlClient/src/Interop/Windows/SspiCli/SSPISecureChannelType.netcore.cs index e6c213d241..01a82f8cb0 100644 --- a/src/Microsoft.Data.SqlClient/netcore/src/Common/Interop/Windows/sspicli/SSPISecureChannelType.cs +++ b/src/Microsoft.Data.SqlClient/src/Interop/Windows/SspiCli/SSPISecureChannelType.netcore.cs @@ -2,7 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#if !NET8_0_OR_GREATER +#if !NETFRAMEWORK && !NET8_0_OR_GREATER using System.Net.Security; using System.Runtime.InteropServices; diff --git a/src/Microsoft.Data.SqlClient/netcore/src/Common/Interop/Windows/sspicli/SSPIWrapper.cs b/src/Microsoft.Data.SqlClient/src/Interop/Windows/SspiCli/SSPIWrapper.netcore.cs similarity index 99% rename from src/Microsoft.Data.SqlClient/netcore/src/Common/Interop/Windows/sspicli/SSPIWrapper.cs rename to src/Microsoft.Data.SqlClient/src/Interop/Windows/SspiCli/SSPIWrapper.netcore.cs index 1ad4a18c45..3043179665 100644 --- a/src/Microsoft.Data.SqlClient/netcore/src/Common/Interop/Windows/sspicli/SSPIWrapper.cs +++ b/src/Microsoft.Data.SqlClient/src/Interop/Windows/SspiCli/SSPIWrapper.netcore.cs @@ -2,7 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#if !NET8_0_OR_GREATER +#if !NETFRAMEWORK && !NET8_0_OR_GREATER using System.ComponentModel; using System.Globalization; diff --git a/src/Microsoft.Data.SqlClient/netcore/src/Common/Interop/Windows/sspicli/SafeDeleteContext.cs b/src/Microsoft.Data.SqlClient/src/Interop/Windows/SspiCli/SafeDeleteContext.netcore.cs similarity index 97% rename from src/Microsoft.Data.SqlClient/netcore/src/Common/Interop/Windows/sspicli/SafeDeleteContext.cs rename to src/Microsoft.Data.SqlClient/src/Interop/Windows/SspiCli/SafeDeleteContext.netcore.cs index 7701689286..f11169222a 100644 --- a/src/Microsoft.Data.SqlClient/netcore/src/Common/Interop/Windows/sspicli/SafeDeleteContext.cs +++ b/src/Microsoft.Data.SqlClient/src/Interop/Windows/SspiCli/SafeDeleteContext.netcore.cs @@ -2,7 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#if !NET8_0_OR_GREATER +#if !NETFRAMEWORK && !NET8_0_OR_GREATER using System.Runtime.InteropServices; diff --git a/src/Microsoft.Data.SqlClient/netcore/src/Common/Interop/Windows/sspicli/SecPkgContext_Bindings.cs b/src/Microsoft.Data.SqlClient/src/Interop/Windows/SspiCli/SecPkgContext_Bindings.netcore.cs similarity index 91% rename from src/Microsoft.Data.SqlClient/netcore/src/Common/Interop/Windows/sspicli/SecPkgContext_Bindings.cs rename to src/Microsoft.Data.SqlClient/src/Interop/Windows/SspiCli/SecPkgContext_Bindings.netcore.cs index f5bbb448eb..3a849ad0f8 100644 --- a/src/Microsoft.Data.SqlClient/netcore/src/Common/Interop/Windows/sspicli/SecPkgContext_Bindings.cs +++ b/src/Microsoft.Data.SqlClient/src/Interop/Windows/SspiCli/SecPkgContext_Bindings.netcore.cs @@ -2,7 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#if !NET8_0_OR_GREATER +#if !NETFRAMEWORK && !NET8_0_OR_GREATER using System.Runtime.InteropServices; diff --git a/src/Microsoft.Data.SqlClient/netcore/src/Common/Interop/Windows/sspicli/SecPkgContext_NegotiationInfoW.cs b/src/Microsoft.Data.SqlClient/src/Interop/Windows/SspiCli/SecPkgContext_NegotiationInfoW.netcore.cs similarity index 92% rename from src/Microsoft.Data.SqlClient/netcore/src/Common/Interop/Windows/sspicli/SecPkgContext_NegotiationInfoW.cs rename to src/Microsoft.Data.SqlClient/src/Interop/Windows/SspiCli/SecPkgContext_NegotiationInfoW.netcore.cs index a5c71068eb..cbbe5cf257 100644 --- a/src/Microsoft.Data.SqlClient/netcore/src/Common/Interop/Windows/sspicli/SecPkgContext_NegotiationInfoW.cs +++ b/src/Microsoft.Data.SqlClient/src/Interop/Windows/SspiCli/SecPkgContext_NegotiationInfoW.netcore.cs @@ -2,7 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#if !NET8_0_OR_GREATER +#if !NETFRAMEWORK && !NET8_0_OR_GREATER using System.Runtime.InteropServices; diff --git a/src/Microsoft.Data.SqlClient/netcore/src/Common/Interop/Windows/sspicli/SecPkgContext_Sizes.cs b/src/Microsoft.Data.SqlClient/src/Interop/Windows/SspiCli/SecPkgContext_Sizes.netcore.cs similarity index 97% rename from src/Microsoft.Data.SqlClient/netcore/src/Common/Interop/Windows/sspicli/SecPkgContext_Sizes.cs rename to src/Microsoft.Data.SqlClient/src/Interop/Windows/SspiCli/SecPkgContext_Sizes.netcore.cs index 17fce36c6d..2f0949475c 100644 --- a/src/Microsoft.Data.SqlClient/netcore/src/Common/Interop/Windows/sspicli/SecPkgContext_Sizes.cs +++ b/src/Microsoft.Data.SqlClient/src/Interop/Windows/SspiCli/SecPkgContext_Sizes.netcore.cs @@ -2,7 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#if !NET8_0_OR_GREATER +#if !NETFRAMEWORK && !NET8_0_OR_GREATER using System.Runtime.InteropServices; diff --git a/src/Microsoft.Data.SqlClient/netcore/src/Common/Interop/Windows/sspicli/SecPkgContext_StreamSizes.cs b/src/Microsoft.Data.SqlClient/src/Interop/Windows/SspiCli/SecPkgContext_StreamSizes.netcore.cs similarity index 97% rename from src/Microsoft.Data.SqlClient/netcore/src/Common/Interop/Windows/sspicli/SecPkgContext_StreamSizes.cs rename to src/Microsoft.Data.SqlClient/src/Interop/Windows/SspiCli/SecPkgContext_StreamSizes.netcore.cs index 98ec1a1d60..ef8aa1ae96 100644 --- a/src/Microsoft.Data.SqlClient/netcore/src/Common/Interop/Windows/sspicli/SecPkgContext_StreamSizes.cs +++ b/src/Microsoft.Data.SqlClient/src/Interop/Windows/SspiCli/SecPkgContext_StreamSizes.netcore.cs @@ -2,7 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#if !NET8_0_OR_GREATER +#if !NETFRAMEWORK && !NET8_0_OR_GREATER using System.Runtime.InteropServices; diff --git a/src/Microsoft.Data.SqlClient/netcore/src/Common/Interop/Windows/sspicli/SecurityPackageInfo.cs b/src/Microsoft.Data.SqlClient/src/Interop/Windows/SspiCli/SecurityPackageInfo.netcore.cs similarity index 93% rename from src/Microsoft.Data.SqlClient/netcore/src/Common/Interop/Windows/sspicli/SecurityPackageInfo.cs rename to src/Microsoft.Data.SqlClient/src/Interop/Windows/SspiCli/SecurityPackageInfo.netcore.cs index 73e9c8635c..c291fa673f 100644 --- a/src/Microsoft.Data.SqlClient/netcore/src/Common/Interop/Windows/sspicli/SecurityPackageInfo.cs +++ b/src/Microsoft.Data.SqlClient/src/Interop/Windows/SspiCli/SecurityPackageInfo.netcore.cs @@ -2,7 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#if !NET8_0_OR_GREATER +#if !NETFRAMEWORK && !NET8_0_OR_GREATER using System.Runtime.InteropServices; diff --git a/src/Microsoft.Data.SqlClient/netcore/src/Common/Interop/Windows/sspicli/SecurityPackageInfoClass.cs b/src/Microsoft.Data.SqlClient/src/Interop/Windows/SspiCli/SecurityPackageInfoClass.netcore.cs similarity index 98% rename from src/Microsoft.Data.SqlClient/netcore/src/Common/Interop/Windows/sspicli/SecurityPackageInfoClass.cs rename to src/Microsoft.Data.SqlClient/src/Interop/Windows/SspiCli/SecurityPackageInfoClass.netcore.cs index 433904171e..5a84b0f8b2 100644 --- a/src/Microsoft.Data.SqlClient/netcore/src/Common/Interop/Windows/sspicli/SecurityPackageInfoClass.cs +++ b/src/Microsoft.Data.SqlClient/src/Interop/Windows/SspiCli/SecurityPackageInfoClass.netcore.cs @@ -2,7 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#if !NET8_0_OR_GREATER +#if !NETFRAMEWORK && !NET8_0_OR_GREATER using System.Globalization; using System.Runtime.InteropServices; diff --git a/src/Microsoft.Data.SqlClient/netcore/src/Common/Interop/Windows/sspicli/SecuritySafeHandles.cs b/src/Microsoft.Data.SqlClient/src/Interop/Windows/SspiCli/SecuritySafeHandles.netcore.cs similarity index 99% rename from src/Microsoft.Data.SqlClient/netcore/src/Common/Interop/Windows/sspicli/SecuritySafeHandles.cs rename to src/Microsoft.Data.SqlClient/src/Interop/Windows/SspiCli/SecuritySafeHandles.netcore.cs index ccebeecf0a..9303aea1fb 100644 --- a/src/Microsoft.Data.SqlClient/netcore/src/Common/Interop/Windows/sspicli/SecuritySafeHandles.cs +++ b/src/Microsoft.Data.SqlClient/src/Interop/Windows/SspiCli/SecuritySafeHandles.netcore.cs @@ -2,7 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#if !NET8_0_OR_GREATER +#if !NETFRAMEWORK && !NET8_0_OR_GREATER using System.Diagnostics; using System.Globalization; diff --git a/src/Microsoft.Data.SqlClient/src/Microsoft.Data.SqlClient.csproj b/src/Microsoft.Data.SqlClient/src/Microsoft.Data.SqlClient.csproj index 344f86ff89..2288e74880 100644 --- a/src/Microsoft.Data.SqlClient/src/Microsoft.Data.SqlClient.csproj +++ b/src/Microsoft.Data.SqlClient/src/Microsoft.Data.SqlClient.csproj @@ -11,5 +11,8 @@ + + + From f7a796014b302c2a5eac457ad8bc13b6597ef8d8 Mon Sep 17 00:00:00 2001 From: Ben Russell Date: Thu, 17 Oct 2024 16:39:37 -0500 Subject: [PATCH 05/10] Move unix interop --- .../netcore/src/Microsoft.Data.SqlClient.csproj | 16 ++++++++++++---- .../Interop/Unix/Interop.Libraries.netcore.cs} | 2 +- .../Interop.GssApiException.netcore.cs} | 2 +- .../Interop.GssBuffer.netcore.cs} | 2 +- .../Interop.NetSecurityNative.netcore.cs} | 2 +- 5 files changed, 16 insertions(+), 8 deletions(-) rename src/Microsoft.Data.SqlClient/{netcore/src/Common/Interop/Unix/Interop.Libraries.cs => src/Interop/Unix/Interop.Libraries.netcore.cs} (91%) rename src/Microsoft.Data.SqlClient/{netcore/src/Common/Interop/Unix/System.Net.Security.Native/Interop.GssApiException.cs => src/Interop/Unix/System.Net.Security.Native/Interop.GssApiException.netcore.cs} (98%) rename src/Microsoft.Data.SqlClient/{netcore/src/Common/Interop/Unix/System.Net.Security.Native/Interop.GssBuffer.cs => src/Interop/Unix/System.Net.Security.Native/Interop.GssBuffer.netcore.cs} (98%) rename src/Microsoft.Data.SqlClient/{netcore/src/Common/Interop/Unix/System.Net.Security.Native/Interop.NetSecurityNative.cs => src/Interop/Unix/System.Net.Security.Native/Interop.NetSecurityNative.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 46f1436127..05b995e436 100644 --- a/src/Microsoft.Data.SqlClient/netcore/src/Microsoft.Data.SqlClient.csproj +++ b/src/Microsoft.Data.SqlClient/netcore/src/Microsoft.Data.SqlClient.csproj @@ -853,6 +853,18 @@ + + Common\Interop\Unix\Interop.Libraries.netcore.cs + + + Common\Interop\Unix\System.Net.Security.Native\Interop.GssApiException.netcore.cs + + + Common\Interop\Unix\System.Net.Security.Native\Interop.Interop.GssBuffer.netcore.cs + + + Common\Interop\Unix\System.Net.Security.Native\Interop.NetSecurityNative.netcore.cs + Microsoft\Data\Common\AdapterUtil.Unix.cs @@ -860,10 +872,6 @@ Microsoft\Data\ProviderBase\DbConnectionPoolIdentity.Unix.cs - - - - diff --git a/src/Microsoft.Data.SqlClient/netcore/src/Common/Interop/Unix/Interop.Libraries.cs b/src/Microsoft.Data.SqlClient/src/Interop/Unix/Interop.Libraries.netcore.cs similarity index 91% rename from src/Microsoft.Data.SqlClient/netcore/src/Common/Interop/Unix/Interop.Libraries.cs rename to src/Microsoft.Data.SqlClient/src/Interop/Unix/Interop.Libraries.netcore.cs index 7b74001a4f..a735313f0e 100644 --- a/src/Microsoft.Data.SqlClient/netcore/src/Common/Interop/Unix/Interop.Libraries.cs +++ b/src/Microsoft.Data.SqlClient/src/Interop/Unix/Interop.Libraries.netcore.cs @@ -2,7 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#if !NET8_0_OR_GREATER +#if !NETFRAMEWORK && !NET8_0_OR_GREATER internal static partial class Interop { diff --git a/src/Microsoft.Data.SqlClient/netcore/src/Common/Interop/Unix/System.Net.Security.Native/Interop.GssApiException.cs b/src/Microsoft.Data.SqlClient/src/Interop/Unix/System.Net.Security.Native/Interop.GssApiException.netcore.cs similarity index 98% rename from src/Microsoft.Data.SqlClient/netcore/src/Common/Interop/Unix/System.Net.Security.Native/Interop.GssApiException.cs rename to src/Microsoft.Data.SqlClient/src/Interop/Unix/System.Net.Security.Native/Interop.GssApiException.netcore.cs index 34bc0b18dd..87c9dc9e62 100644 --- a/src/Microsoft.Data.SqlClient/netcore/src/Common/Interop/Unix/System.Net.Security.Native/Interop.GssApiException.cs +++ b/src/Microsoft.Data.SqlClient/src/Interop/Unix/System.Net.Security.Native/Interop.GssApiException.netcore.cs @@ -2,7 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#if !NET8_0_OR_GREATER +#if !NETFRAMEWORK && !NET8_0_OR_GREATER using System; using System.Runtime.InteropServices; diff --git a/src/Microsoft.Data.SqlClient/netcore/src/Common/Interop/Unix/System.Net.Security.Native/Interop.GssBuffer.cs b/src/Microsoft.Data.SqlClient/src/Interop/Unix/System.Net.Security.Native/Interop.GssBuffer.netcore.cs similarity index 98% rename from src/Microsoft.Data.SqlClient/netcore/src/Common/Interop/Unix/System.Net.Security.Native/Interop.GssBuffer.cs rename to src/Microsoft.Data.SqlClient/src/Interop/Unix/System.Net.Security.Native/Interop.GssBuffer.netcore.cs index 112289bc7d..22f2852416 100644 --- a/src/Microsoft.Data.SqlClient/netcore/src/Common/Interop/Unix/System.Net.Security.Native/Interop.GssBuffer.cs +++ b/src/Microsoft.Data.SqlClient/src/Interop/Unix/System.Net.Security.Native/Interop.GssBuffer.netcore.cs @@ -2,7 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#if !NET8_0_OR_GREATER +#if !NETFRAMEWORK && !NET8_0_OR_GREATER using System; using System.Diagnostics; diff --git a/src/Microsoft.Data.SqlClient/netcore/src/Common/Interop/Unix/System.Net.Security.Native/Interop.NetSecurityNative.cs b/src/Microsoft.Data.SqlClient/src/Interop/Unix/System.Net.Security.Native/Interop.NetSecurityNative.netcore.cs similarity index 99% rename from src/Microsoft.Data.SqlClient/netcore/src/Common/Interop/Unix/System.Net.Security.Native/Interop.NetSecurityNative.cs rename to src/Microsoft.Data.SqlClient/src/Interop/Unix/System.Net.Security.Native/Interop.NetSecurityNative.netcore.cs index f5e7d18f24..06a805a7e2 100644 --- a/src/Microsoft.Data.SqlClient/netcore/src/Common/Interop/Unix/System.Net.Security.Native/Interop.NetSecurityNative.cs +++ b/src/Microsoft.Data.SqlClient/src/Interop/Unix/System.Net.Security.Native/Interop.NetSecurityNative.netcore.cs @@ -2,7 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#if !NET8_0_OR_GREATER +#if !NETFRAMEWORK && !NET8_0_OR_GREATER using System; using System.Runtime.InteropServices; From 129094493c4157bf69e432834313304a43cd2b18 Mon Sep 17 00:00:00 2001 From: Ben Russell Date: Fri, 18 Oct 2024 18:28:14 -0500 Subject: [PATCH 06/10] Moving handle classes into common project --- .../src/Microsoft.Data.SqlClient.csproj | 18 +++++++++++++----- ...CriticalHandleMinusOneIsInvalid.netcore.cs} | 2 +- ...alHandleZeroOrMinusOneIsInvalid.netcore.cs} | 2 +- .../Handles/DebugSafeHandle.netcore.cs} | 2 +- .../Handles/SafeLibraryHandle.netcore.cs} | 4 ++++ .../src/Microsoft.Data.SqlClient.csproj | 1 + 6 files changed, 21 insertions(+), 8 deletions(-) rename src/Microsoft.Data.SqlClient/{netcore/src/Common/System/Net/DebugCriticalHandleMinusOneIsInvalid.cs => src/Interop/Windows/Handles/DebugCriticalHandleMinusOneIsInvalid.netcore.cs} (96%) rename src/Microsoft.Data.SqlClient/{netcore/src/Common/System/Net/DebugCriticalHandleZeroOrMinusOneIsInvalid.cs => src/Interop/Windows/Handles/DebugCriticalHandleZeroOrMinusOneIsInvalid.netcore.cs} (96%) rename src/Microsoft.Data.SqlClient/{netcore/src/Common/System/Net/DebugSafeHandle.cs => src/Interop/Windows/Handles/DebugSafeHandle.netcore.cs} (96%) rename src/Microsoft.Data.SqlClient/{netcore/src/Common/Microsoft/Win32/SafeHandles/SafeLibraryHandle.cs => src/Interop/Windows/Handles/SafeLibraryHandle.netcore.cs} (95%) 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 05b995e436..436631278b 100644 --- a/src/Microsoft.Data.SqlClient/netcore/src/Microsoft.Data.SqlClient.csproj +++ b/src/Microsoft.Data.SqlClient/netcore/src/Microsoft.Data.SqlClient.csproj @@ -620,8 +620,6 @@ - - @@ -686,6 +684,18 @@ Common\Interop\Windows\Crypt32\Interop.certificates_types.netcore.cs + + Common\Interop\Windows\Handles\DebugCriticalHandleMinusOneIsInvalid.netcore.cs + + + Common\Interop\Windows\Handles\DebugCriticalHandleZeroOrMinusOneIsInvalid.netcore.cs + + + Common\Interop\Windows\Handles\DebugSafeHandle.netcore.cs + + + Common\Interop\Windows\Handles\SafeLibraryHandle.netcore.cs + Common\Interop\Windows\Interop.Errors.cs @@ -830,11 +840,9 @@ Microsoft\Data\SqlTypes\SqlFileStream.Windows.cs - - + - diff --git a/src/Microsoft.Data.SqlClient/netcore/src/Common/System/Net/DebugCriticalHandleMinusOneIsInvalid.cs b/src/Microsoft.Data.SqlClient/src/Interop/Windows/Handles/DebugCriticalHandleMinusOneIsInvalid.netcore.cs similarity index 96% rename from src/Microsoft.Data.SqlClient/netcore/src/Common/System/Net/DebugCriticalHandleMinusOneIsInvalid.cs rename to src/Microsoft.Data.SqlClient/src/Interop/Windows/Handles/DebugCriticalHandleMinusOneIsInvalid.netcore.cs index a9d0965324..cf89c8c067 100644 --- a/src/Microsoft.Data.SqlClient/netcore/src/Common/System/Net/DebugCriticalHandleMinusOneIsInvalid.cs +++ b/src/Microsoft.Data.SqlClient/src/Interop/Windows/Handles/DebugCriticalHandleMinusOneIsInvalid.netcore.cs @@ -2,7 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#if DEBUG && !NET8_0_OR_GREATER +#if DEBUG && !NETFRAMEWORK && !NET8_0_OR_GREATER using Microsoft.Win32.SafeHandles; diff --git a/src/Microsoft.Data.SqlClient/netcore/src/Common/System/Net/DebugCriticalHandleZeroOrMinusOneIsInvalid.cs b/src/Microsoft.Data.SqlClient/src/Interop/Windows/Handles/DebugCriticalHandleZeroOrMinusOneIsInvalid.netcore.cs similarity index 96% rename from src/Microsoft.Data.SqlClient/netcore/src/Common/System/Net/DebugCriticalHandleZeroOrMinusOneIsInvalid.cs rename to src/Microsoft.Data.SqlClient/src/Interop/Windows/Handles/DebugCriticalHandleZeroOrMinusOneIsInvalid.netcore.cs index fcb485d568..2147da3b25 100644 --- a/src/Microsoft.Data.SqlClient/netcore/src/Common/System/Net/DebugCriticalHandleZeroOrMinusOneIsInvalid.cs +++ b/src/Microsoft.Data.SqlClient/src/Interop/Windows/Handles/DebugCriticalHandleZeroOrMinusOneIsInvalid.netcore.cs @@ -2,7 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#if DEBUG && !NET8_0_OR_GREATER +#if DEBUG && !NETFRAMEWORK && !NET8_0_OR_GREATER using Microsoft.Win32.SafeHandles; diff --git a/src/Microsoft.Data.SqlClient/netcore/src/Common/System/Net/DebugSafeHandle.cs b/src/Microsoft.Data.SqlClient/src/Interop/Windows/Handles/DebugSafeHandle.netcore.cs similarity index 96% rename from src/Microsoft.Data.SqlClient/netcore/src/Common/System/Net/DebugSafeHandle.cs rename to src/Microsoft.Data.SqlClient/src/Interop/Windows/Handles/DebugSafeHandle.netcore.cs index 55d5bd8a6f..d6320c1303 100644 --- a/src/Microsoft.Data.SqlClient/netcore/src/Common/System/Net/DebugSafeHandle.cs +++ b/src/Microsoft.Data.SqlClient/src/Interop/Windows/Handles/DebugSafeHandle.netcore.cs @@ -2,7 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#if DEBUG && !NET8_0_OR_GREATER +#if DEBUG && !NETFRAMEWORK && !NET8_0_OR_GREATER using System.Net.NetworkInformation; using System.Net.Sockets; diff --git a/src/Microsoft.Data.SqlClient/netcore/src/Common/Microsoft/Win32/SafeHandles/SafeLibraryHandle.cs b/src/Microsoft.Data.SqlClient/src/Interop/Windows/Handles/SafeLibraryHandle.netcore.cs similarity index 95% rename from src/Microsoft.Data.SqlClient/netcore/src/Common/Microsoft/Win32/SafeHandles/SafeLibraryHandle.cs rename to src/Microsoft.Data.SqlClient/src/Interop/Windows/Handles/SafeLibraryHandle.netcore.cs index 3be2e354ab..0d2e38de06 100644 --- a/src/Microsoft.Data.SqlClient/netcore/src/Common/Microsoft/Win32/SafeHandles/SafeLibraryHandle.cs +++ b/src/Microsoft.Data.SqlClient/src/Interop/Windows/Handles/SafeLibraryHandle.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 !NETFRAMEWORK + namespace Microsoft.Win32.SafeHandles { sealed internal class SafeLibraryHandle : SafeHandleZeroOrMinusOneIsInvalid @@ -14,3 +16,5 @@ override protected bool ReleaseHandle() } } } + +#endif diff --git a/src/Microsoft.Data.SqlClient/src/Microsoft.Data.SqlClient.csproj b/src/Microsoft.Data.SqlClient/src/Microsoft.Data.SqlClient.csproj index 2288e74880..7b343645ff 100644 --- a/src/Microsoft.Data.SqlClient/src/Microsoft.Data.SqlClient.csproj +++ b/src/Microsoft.Data.SqlClient/src/Microsoft.Data.SqlClient.csproj @@ -12,6 +12,7 @@ + From 090b7516f3a3285a221318de6ed1d7d2c5b40640 Mon Sep 17 00:00:00 2001 From: Ben Russell Date: Tue, 29 Oct 2024 16:43:00 -0500 Subject: [PATCH 07/10] Move debug handles back out to common folder --- .../src/Microsoft.Data.SqlClient.csproj | 18 +++++++++--------- ...gCriticalHandleMinusOneIsInvalid.netcore.cs | 0 ...calHandleZeroOrMinusOneIsInvalid.netcore.cs | 0 .../Handles/DebugSafeHandle.netcore.cs | 0 4 files changed, 9 insertions(+), 9 deletions(-) rename src/Microsoft.Data.SqlClient/src/Interop/{Windows => Common}/Handles/DebugCriticalHandleMinusOneIsInvalid.netcore.cs (100%) rename src/Microsoft.Data.SqlClient/src/Interop/{Windows => Common}/Handles/DebugCriticalHandleZeroOrMinusOneIsInvalid.netcore.cs (100%) rename src/Microsoft.Data.SqlClient/src/Interop/{Windows => Common}/Handles/DebugSafeHandle.netcore.cs (100%) 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 436631278b..3adbf7ef44 100644 --- a/src/Microsoft.Data.SqlClient/netcore/src/Microsoft.Data.SqlClient.csproj +++ b/src/Microsoft.Data.SqlClient/netcore/src/Microsoft.Data.SqlClient.csproj @@ -38,6 +38,15 @@ + + Common\Interop\Common\Handles\DebugCriticalHandleMinusOneIsInvalid.netcore.cs + + + Common\Interop\Common\Handles\DebugCriticalHandleZeroOrMinusOneIsInvalid.netcore.cs + + + Common\Interop\Common\Handles\DebugSafeHandle.netcore.cs + Microsoft\Data\Common\ActivityCorrelator.cs @@ -684,15 +693,6 @@ Common\Interop\Windows\Crypt32\Interop.certificates_types.netcore.cs - - Common\Interop\Windows\Handles\DebugCriticalHandleMinusOneIsInvalid.netcore.cs - - - Common\Interop\Windows\Handles\DebugCriticalHandleZeroOrMinusOneIsInvalid.netcore.cs - - - Common\Interop\Windows\Handles\DebugSafeHandle.netcore.cs - Common\Interop\Windows\Handles\SafeLibraryHandle.netcore.cs diff --git a/src/Microsoft.Data.SqlClient/src/Interop/Windows/Handles/DebugCriticalHandleMinusOneIsInvalid.netcore.cs b/src/Microsoft.Data.SqlClient/src/Interop/Common/Handles/DebugCriticalHandleMinusOneIsInvalid.netcore.cs similarity index 100% rename from src/Microsoft.Data.SqlClient/src/Interop/Windows/Handles/DebugCriticalHandleMinusOneIsInvalid.netcore.cs rename to src/Microsoft.Data.SqlClient/src/Interop/Common/Handles/DebugCriticalHandleMinusOneIsInvalid.netcore.cs diff --git a/src/Microsoft.Data.SqlClient/src/Interop/Windows/Handles/DebugCriticalHandleZeroOrMinusOneIsInvalid.netcore.cs b/src/Microsoft.Data.SqlClient/src/Interop/Common/Handles/DebugCriticalHandleZeroOrMinusOneIsInvalid.netcore.cs similarity index 100% rename from src/Microsoft.Data.SqlClient/src/Interop/Windows/Handles/DebugCriticalHandleZeroOrMinusOneIsInvalid.netcore.cs rename to src/Microsoft.Data.SqlClient/src/Interop/Common/Handles/DebugCriticalHandleZeroOrMinusOneIsInvalid.netcore.cs diff --git a/src/Microsoft.Data.SqlClient/src/Interop/Windows/Handles/DebugSafeHandle.netcore.cs b/src/Microsoft.Data.SqlClient/src/Interop/Common/Handles/DebugSafeHandle.netcore.cs similarity index 100% rename from src/Microsoft.Data.SqlClient/src/Interop/Windows/Handles/DebugSafeHandle.netcore.cs rename to src/Microsoft.Data.SqlClient/src/Interop/Common/Handles/DebugSafeHandle.netcore.cs From 066fd7bdfe154d8f9e25f577fdd6082e7cb771e9 Mon Sep 17 00:00:00 2001 From: Ben Russell Date: Tue, 29 Oct 2024 17:02:01 -0500 Subject: [PATCH 08/10] Moving Unix handles to common project --- .../src/Microsoft.Data.SqlClient.csproj | 22 ++++++++++++++----- .../Unix/Handles/GssSafeHandles.netcore.cs} | 2 +- .../Handles/SafeDeleteContext.netcore.cs} | 2 +- .../Handles/SafeDeleteNegoContext.netcore.cs} | 2 +- .../Handles/SafeFreeCredentials.netcore.cs} | 2 +- .../SafeFreeNegoCredentials.netcore.cs} | 2 +- .../src/Microsoft.Data.SqlClient.csproj | 4 ---- 7 files changed, 21 insertions(+), 15 deletions(-) rename src/Microsoft.Data.SqlClient/{netcore/src/Common/Microsoft/Win32/SafeHandles/GssSafeHandles.cs => src/Interop/Unix/Handles/GssSafeHandles.netcore.cs} (99%) rename src/Microsoft.Data.SqlClient/{netcore/src/Common/System/Net/Security/Unix/SafeDeleteContext.cs => src/Interop/Unix/Handles/SafeDeleteContext.netcore.cs} (97%) rename src/Microsoft.Data.SqlClient/{netcore/src/Common/System/Net/Security/Unix/SafeDeleteNegoContext.cs => src/Interop/Unix/Handles/SafeDeleteNegoContext.netcore.cs} (98%) rename src/Microsoft.Data.SqlClient/{netcore/src/Common/System/Net/Security/Unix/SafeFreeCredentials.cs => src/Interop/Unix/Handles/SafeFreeCredentials.netcore.cs} (98%) rename src/Microsoft.Data.SqlClient/{netcore/src/Common/System/Net/Security/Unix/SafeFreeNegoCredentials.cs => src/Interop/Unix/Handles/SafeFreeNegoCredentials.netcore.cs} (98%) 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 3adbf7ef44..f89c011599 100644 --- a/src/Microsoft.Data.SqlClient/netcore/src/Microsoft.Data.SqlClient.csproj +++ b/src/Microsoft.Data.SqlClient/netcore/src/Microsoft.Data.SqlClient.csproj @@ -861,6 +861,21 @@ + + Common\Microsoft\Win32\SafeHandles\GssSafeHandles.netcore.cs + + + Common\System\Net\Security\Unix\SafeDeleteContext.netcore.cs + + + Common\System\Net\Security\Unix\SafeDeleteNegoContext.netcore.cs + + + Common\System\Net\Security\Unix\SafeFreeCrednetials.netcore.cs + + + Common\System\Net\Security\Unix\SafeFreeNegoCredentials.netcore.cs + Common\Interop\Unix\Interop.Libraries.netcore.cs @@ -879,13 +894,8 @@ Microsoft\Data\ProviderBase\DbConnectionPoolIdentity.Unix.cs - - + - - - - diff --git a/src/Microsoft.Data.SqlClient/netcore/src/Common/Microsoft/Win32/SafeHandles/GssSafeHandles.cs b/src/Microsoft.Data.SqlClient/src/Interop/Unix/Handles/GssSafeHandles.netcore.cs similarity index 99% rename from src/Microsoft.Data.SqlClient/netcore/src/Common/Microsoft/Win32/SafeHandles/GssSafeHandles.cs rename to src/Microsoft.Data.SqlClient/src/Interop/Unix/Handles/GssSafeHandles.netcore.cs index 6a5a8b17c8..ecafbba878 100644 --- a/src/Microsoft.Data.SqlClient/netcore/src/Common/Microsoft/Win32/SafeHandles/GssSafeHandles.cs +++ b/src/Microsoft.Data.SqlClient/src/Interop/Unix/Handles/GssSafeHandles.netcore.cs @@ -2,7 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#if !NET8_0_OR_GREATER +#if !NETFRAMEWORK && !NET8_0_OR_GREATER using System; using System.Diagnostics; diff --git a/src/Microsoft.Data.SqlClient/netcore/src/Common/System/Net/Security/Unix/SafeDeleteContext.cs b/src/Microsoft.Data.SqlClient/src/Interop/Unix/Handles/SafeDeleteContext.netcore.cs similarity index 97% rename from src/Microsoft.Data.SqlClient/netcore/src/Common/System/Net/Security/Unix/SafeDeleteContext.cs rename to src/Microsoft.Data.SqlClient/src/Interop/Unix/Handles/SafeDeleteContext.netcore.cs index 16636afd29..070026b462 100644 --- a/src/Microsoft.Data.SqlClient/netcore/src/Common/System/Net/Security/Unix/SafeDeleteContext.cs +++ b/src/Microsoft.Data.SqlClient/src/Interop/Unix/Handles/SafeDeleteContext.netcore.cs @@ -2,7 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#if !NET8_0_OR_GREATER +#if !NETFRAMEWORK && !NET8_0_OR_GREATER using System.Diagnostics; using System.Runtime.InteropServices; diff --git a/src/Microsoft.Data.SqlClient/netcore/src/Common/System/Net/Security/Unix/SafeDeleteNegoContext.cs b/src/Microsoft.Data.SqlClient/src/Interop/Unix/Handles/SafeDeleteNegoContext.netcore.cs similarity index 98% rename from src/Microsoft.Data.SqlClient/netcore/src/Common/System/Net/Security/Unix/SafeDeleteNegoContext.cs rename to src/Microsoft.Data.SqlClient/src/Interop/Unix/Handles/SafeDeleteNegoContext.netcore.cs index 53fe8e5ad9..c8a191b06a 100644 --- a/src/Microsoft.Data.SqlClient/netcore/src/Common/System/Net/Security/Unix/SafeDeleteNegoContext.cs +++ b/src/Microsoft.Data.SqlClient/src/Interop/Unix/Handles/SafeDeleteNegoContext.netcore.cs @@ -2,7 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#if !NET8_0_OR_GREATER +#if !NETFRAMEWORK && !NET8_0_OR_GREATER using System.Diagnostics; using Microsoft.Win32.SafeHandles; diff --git a/src/Microsoft.Data.SqlClient/netcore/src/Common/System/Net/Security/Unix/SafeFreeCredentials.cs b/src/Microsoft.Data.SqlClient/src/Interop/Unix/Handles/SafeFreeCredentials.netcore.cs similarity index 98% rename from src/Microsoft.Data.SqlClient/netcore/src/Common/System/Net/Security/Unix/SafeFreeCredentials.cs rename to src/Microsoft.Data.SqlClient/src/Interop/Unix/Handles/SafeFreeCredentials.netcore.cs index 254d9d127a..03011bce4e 100644 --- a/src/Microsoft.Data.SqlClient/netcore/src/Common/System/Net/Security/Unix/SafeFreeCredentials.cs +++ b/src/Microsoft.Data.SqlClient/src/Interop/Unix/Handles/SafeFreeCredentials.netcore.cs @@ -2,7 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#if !NET8_0_OR_GREATER +#if !NETFRAMEWORK && !NET8_0_OR_GREATER using System.Runtime.InteropServices; using Microsoft.Win32.SafeHandles; diff --git a/src/Microsoft.Data.SqlClient/netcore/src/Common/System/Net/Security/Unix/SafeFreeNegoCredentials.cs b/src/Microsoft.Data.SqlClient/src/Interop/Unix/Handles/SafeFreeNegoCredentials.netcore.cs similarity index 98% rename from src/Microsoft.Data.SqlClient/netcore/src/Common/System/Net/Security/Unix/SafeFreeNegoCredentials.cs rename to src/Microsoft.Data.SqlClient/src/Interop/Unix/Handles/SafeFreeNegoCredentials.netcore.cs index 19ad2e2451..1750365dd6 100644 --- a/src/Microsoft.Data.SqlClient/netcore/src/Common/System/Net/Security/Unix/SafeFreeNegoCredentials.cs +++ b/src/Microsoft.Data.SqlClient/src/Interop/Unix/Handles/SafeFreeNegoCredentials.netcore.cs @@ -2,7 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#if !NET8_0_OR_GREATER +#if !NETFRAMEWORK && !NET8_0_OR_GREATER using System.Diagnostics; using Microsoft.Win32.SafeHandles; diff --git a/src/Microsoft.Data.SqlClient/src/Microsoft.Data.SqlClient.csproj b/src/Microsoft.Data.SqlClient/src/Microsoft.Data.SqlClient.csproj index 7b343645ff..344f86ff89 100644 --- a/src/Microsoft.Data.SqlClient/src/Microsoft.Data.SqlClient.csproj +++ b/src/Microsoft.Data.SqlClient/src/Microsoft.Data.SqlClient.csproj @@ -11,9 +11,5 @@ - - - - From a973190f4ddb32166b34fdb7eda99ae0d9e64513 Mon Sep 17 00:00:00 2001 From: Ben Russell Date: Tue, 29 Oct 2024 17:07:45 -0500 Subject: [PATCH 09/10] Sweep of `!NETFRAMEWORK` to `NET` --- .../Handles/DebugCriticalHandleMinusOneIsInvalid.netcore.cs | 2 +- .../DebugCriticalHandleZeroOrMinusOneIsInvalid.netcore.cs | 2 +- .../src/Interop/Common/Handles/DebugSafeHandle.netcore.cs | 2 +- .../src/Interop/Unix/Handles/GssSafeHandles.netcore.cs | 2 +- .../src/Interop/Unix/Handles/SafeDeleteContext.netcore.cs | 2 +- .../src/Interop/Unix/Handles/SafeDeleteNegoContext.netcore.cs | 2 +- .../src/Interop/Unix/Handles/SafeFreeCredentials.netcore.cs | 2 +- .../src/Interop/Unix/Handles/SafeFreeNegoCredentials.netcore.cs | 2 +- .../Interop.GssApiException.netcore.cs | 2 +- .../System.Net.Security.Native/Interop.GssBuffer.netcore.cs | 2 +- .../Interop.NetSecurityNative.netcore.cs | 2 +- .../src/Interop/Windows/Crypt32/Interop.certificates.netcore.cs | 2 +- .../Windows/Crypt32/Interop.certificates_types.netcore.cs | 2 +- .../src/Interop/Windows/Handles/SafeLibraryHandle.netcore.cs | 2 +- .../src/Interop/Windows/Kernel32/Interop.CloseHandle.netcore.cs | 2 +- .../Interop/Windows/Kernel32/Interop.GetProcAddress.netcore.cs | 2 +- .../Interop/Windows/Kernel32/Interop.LoadLibraryEx.netcore.cs | 2 +- .../Interop/Windows/SChannel/Interop.SECURITY_STATUS.netcore.cs | 2 +- .../Interop.SecPkgContext_ApplicationProtocol.netcore.cs | 2 +- .../Windows/SChannel/SecPkgContext_ConnectionInfo.netcore.cs | 2 +- .../src/Interop/Windows/SspiCli/GlobalSSPI.netcore.cs | 2 +- .../src/Interop/Windows/SspiCli/Interop.SSPI.netcore.cs | 2 +- .../src/Interop/Windows/SspiCli/NegotiationInfoClass.netcore.cs | 2 +- .../src/Interop/Windows/SspiCli/SSPIAuthType.netcore.cs | 2 +- .../src/Interop/Windows/SspiCli/SSPIInterface.netcore.cs | 2 +- .../Interop/Windows/SspiCli/SSPISecureChannelType.netcore.cs | 2 +- .../src/Interop/Windows/SspiCli/SSPIWrapper.netcore.cs | 2 +- .../src/Interop/Windows/SspiCli/SafeDeleteContext.netcore.cs | 2 +- .../Interop/Windows/SspiCli/SecPkgContext_Bindings.netcore.cs | 2 +- .../Windows/SspiCli/SecPkgContext_NegotiationInfoW.netcore.cs | 2 +- .../src/Interop/Windows/SspiCli/SecPkgContext_Sizes.netcore.cs | 2 +- .../Windows/SspiCli/SecPkgContext_StreamSizes.netcore.cs | 2 +- .../src/Interop/Windows/SspiCli/SecurityPackageInfo.netcore.cs | 2 +- .../Interop/Windows/SspiCli/SecurityPackageInfoClass.netcore.cs | 2 +- .../src/Interop/Windows/SspiCli/SecuritySafeHandles.netcore.cs | 2 +- 35 files changed, 35 insertions(+), 35 deletions(-) diff --git a/src/Microsoft.Data.SqlClient/src/Interop/Common/Handles/DebugCriticalHandleMinusOneIsInvalid.netcore.cs b/src/Microsoft.Data.SqlClient/src/Interop/Common/Handles/DebugCriticalHandleMinusOneIsInvalid.netcore.cs index cf89c8c067..0f76ea5b8e 100644 --- a/src/Microsoft.Data.SqlClient/src/Interop/Common/Handles/DebugCriticalHandleMinusOneIsInvalid.netcore.cs +++ b/src/Microsoft.Data.SqlClient/src/Interop/Common/Handles/DebugCriticalHandleMinusOneIsInvalid.netcore.cs @@ -2,7 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#if DEBUG && !NETFRAMEWORK && !NET8_0_OR_GREATER +#if NET && !NET8_0_OR_GREATER && DEBUG using Microsoft.Win32.SafeHandles; diff --git a/src/Microsoft.Data.SqlClient/src/Interop/Common/Handles/DebugCriticalHandleZeroOrMinusOneIsInvalid.netcore.cs b/src/Microsoft.Data.SqlClient/src/Interop/Common/Handles/DebugCriticalHandleZeroOrMinusOneIsInvalid.netcore.cs index 2147da3b25..ec7ace6f47 100644 --- a/src/Microsoft.Data.SqlClient/src/Interop/Common/Handles/DebugCriticalHandleZeroOrMinusOneIsInvalid.netcore.cs +++ b/src/Microsoft.Data.SqlClient/src/Interop/Common/Handles/DebugCriticalHandleZeroOrMinusOneIsInvalid.netcore.cs @@ -2,7 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#if DEBUG && !NETFRAMEWORK && !NET8_0_OR_GREATER +#if NET && !NET8_0_OR_GREATER && DEBUG using Microsoft.Win32.SafeHandles; diff --git a/src/Microsoft.Data.SqlClient/src/Interop/Common/Handles/DebugSafeHandle.netcore.cs b/src/Microsoft.Data.SqlClient/src/Interop/Common/Handles/DebugSafeHandle.netcore.cs index d6320c1303..b2e96c0cca 100644 --- a/src/Microsoft.Data.SqlClient/src/Interop/Common/Handles/DebugSafeHandle.netcore.cs +++ b/src/Microsoft.Data.SqlClient/src/Interop/Common/Handles/DebugSafeHandle.netcore.cs @@ -2,7 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#if DEBUG && !NETFRAMEWORK && !NET8_0_OR_GREATER +#if NET && !NET8_0_OR_GREATER && DEBUG using System.Net.NetworkInformation; using System.Net.Sockets; diff --git a/src/Microsoft.Data.SqlClient/src/Interop/Unix/Handles/GssSafeHandles.netcore.cs b/src/Microsoft.Data.SqlClient/src/Interop/Unix/Handles/GssSafeHandles.netcore.cs index ecafbba878..4e7392ee18 100644 --- a/src/Microsoft.Data.SqlClient/src/Interop/Unix/Handles/GssSafeHandles.netcore.cs +++ b/src/Microsoft.Data.SqlClient/src/Interop/Unix/Handles/GssSafeHandles.netcore.cs @@ -2,7 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#if !NETFRAMEWORK && !NET8_0_OR_GREATER +#if NET && !NET8_0_OR_GREATER using System; using System.Diagnostics; diff --git a/src/Microsoft.Data.SqlClient/src/Interop/Unix/Handles/SafeDeleteContext.netcore.cs b/src/Microsoft.Data.SqlClient/src/Interop/Unix/Handles/SafeDeleteContext.netcore.cs index 070026b462..5caecd50b1 100644 --- a/src/Microsoft.Data.SqlClient/src/Interop/Unix/Handles/SafeDeleteContext.netcore.cs +++ b/src/Microsoft.Data.SqlClient/src/Interop/Unix/Handles/SafeDeleteContext.netcore.cs @@ -2,7 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#if !NETFRAMEWORK && !NET8_0_OR_GREATER +#if NET && !NET8_0_OR_GREATER using System.Diagnostics; using System.Runtime.InteropServices; diff --git a/src/Microsoft.Data.SqlClient/src/Interop/Unix/Handles/SafeDeleteNegoContext.netcore.cs b/src/Microsoft.Data.SqlClient/src/Interop/Unix/Handles/SafeDeleteNegoContext.netcore.cs index c8a191b06a..6b878a1db9 100644 --- a/src/Microsoft.Data.SqlClient/src/Interop/Unix/Handles/SafeDeleteNegoContext.netcore.cs +++ b/src/Microsoft.Data.SqlClient/src/Interop/Unix/Handles/SafeDeleteNegoContext.netcore.cs @@ -2,7 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#if !NETFRAMEWORK && !NET8_0_OR_GREATER +#if NET && !NET8_0_OR_GREATER using System.Diagnostics; using Microsoft.Win32.SafeHandles; diff --git a/src/Microsoft.Data.SqlClient/src/Interop/Unix/Handles/SafeFreeCredentials.netcore.cs b/src/Microsoft.Data.SqlClient/src/Interop/Unix/Handles/SafeFreeCredentials.netcore.cs index 03011bce4e..7db3137ddc 100644 --- a/src/Microsoft.Data.SqlClient/src/Interop/Unix/Handles/SafeFreeCredentials.netcore.cs +++ b/src/Microsoft.Data.SqlClient/src/Interop/Unix/Handles/SafeFreeCredentials.netcore.cs @@ -2,7 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#if !NETFRAMEWORK && !NET8_0_OR_GREATER +#if NET && !NET8_0_OR_GREATER using System.Runtime.InteropServices; using Microsoft.Win32.SafeHandles; diff --git a/src/Microsoft.Data.SqlClient/src/Interop/Unix/Handles/SafeFreeNegoCredentials.netcore.cs b/src/Microsoft.Data.SqlClient/src/Interop/Unix/Handles/SafeFreeNegoCredentials.netcore.cs index 1750365dd6..cba31fc6fa 100644 --- a/src/Microsoft.Data.SqlClient/src/Interop/Unix/Handles/SafeFreeNegoCredentials.netcore.cs +++ b/src/Microsoft.Data.SqlClient/src/Interop/Unix/Handles/SafeFreeNegoCredentials.netcore.cs @@ -2,7 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#if !NETFRAMEWORK && !NET8_0_OR_GREATER +#if NET && !NET8_0_OR_GREATER using System.Diagnostics; using Microsoft.Win32.SafeHandles; diff --git a/src/Microsoft.Data.SqlClient/src/Interop/Unix/System.Net.Security.Native/Interop.GssApiException.netcore.cs b/src/Microsoft.Data.SqlClient/src/Interop/Unix/System.Net.Security.Native/Interop.GssApiException.netcore.cs index 87c9dc9e62..6b3e828296 100644 --- a/src/Microsoft.Data.SqlClient/src/Interop/Unix/System.Net.Security.Native/Interop.GssApiException.netcore.cs +++ b/src/Microsoft.Data.SqlClient/src/Interop/Unix/System.Net.Security.Native/Interop.GssApiException.netcore.cs @@ -2,7 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#if !NETFRAMEWORK && !NET8_0_OR_GREATER +#if NET && !NET8_0_OR_GREATER using System; using System.Runtime.InteropServices; diff --git a/src/Microsoft.Data.SqlClient/src/Interop/Unix/System.Net.Security.Native/Interop.GssBuffer.netcore.cs b/src/Microsoft.Data.SqlClient/src/Interop/Unix/System.Net.Security.Native/Interop.GssBuffer.netcore.cs index 22f2852416..3a847f07ee 100644 --- a/src/Microsoft.Data.SqlClient/src/Interop/Unix/System.Net.Security.Native/Interop.GssBuffer.netcore.cs +++ b/src/Microsoft.Data.SqlClient/src/Interop/Unix/System.Net.Security.Native/Interop.GssBuffer.netcore.cs @@ -2,7 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#if !NETFRAMEWORK && !NET8_0_OR_GREATER +#if NET && !NET8_0_OR_GREATER using System; using System.Diagnostics; diff --git a/src/Microsoft.Data.SqlClient/src/Interop/Unix/System.Net.Security.Native/Interop.NetSecurityNative.netcore.cs b/src/Microsoft.Data.SqlClient/src/Interop/Unix/System.Net.Security.Native/Interop.NetSecurityNative.netcore.cs index 06a805a7e2..93ba5443b3 100644 --- a/src/Microsoft.Data.SqlClient/src/Interop/Unix/System.Net.Security.Native/Interop.NetSecurityNative.netcore.cs +++ b/src/Microsoft.Data.SqlClient/src/Interop/Unix/System.Net.Security.Native/Interop.NetSecurityNative.netcore.cs @@ -2,7 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#if !NETFRAMEWORK && !NET8_0_OR_GREATER +#if NET && !NET8_0_OR_GREATER using System; using System.Runtime.InteropServices; diff --git a/src/Microsoft.Data.SqlClient/src/Interop/Windows/Crypt32/Interop.certificates.netcore.cs b/src/Microsoft.Data.SqlClient/src/Interop/Windows/Crypt32/Interop.certificates.netcore.cs index 4610352a46..41529cfe4c 100644 --- a/src/Microsoft.Data.SqlClient/src/Interop/Windows/Crypt32/Interop.certificates.netcore.cs +++ b/src/Microsoft.Data.SqlClient/src/Interop/Windows/Crypt32/Interop.certificates.netcore.cs @@ -2,7 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#if !NETFRAMEWORK && !NET8_0_OR_GREATER +#if NET && !NET8_0_OR_GREATER using System; using System.Runtime.InteropServices; diff --git a/src/Microsoft.Data.SqlClient/src/Interop/Windows/Crypt32/Interop.certificates_types.netcore.cs b/src/Microsoft.Data.SqlClient/src/Interop/Windows/Crypt32/Interop.certificates_types.netcore.cs index efe37caf5f..cbc0e4d595 100644 --- a/src/Microsoft.Data.SqlClient/src/Interop/Windows/Crypt32/Interop.certificates_types.netcore.cs +++ b/src/Microsoft.Data.SqlClient/src/Interop/Windows/Crypt32/Interop.certificates_types.netcore.cs @@ -2,7 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#if !NETFRAMEWORK && !NET8_0_OR_GREATER +#if NET && !NET8_0_OR_GREATER using System; using System.Runtime.InteropServices; diff --git a/src/Microsoft.Data.SqlClient/src/Interop/Windows/Handles/SafeLibraryHandle.netcore.cs b/src/Microsoft.Data.SqlClient/src/Interop/Windows/Handles/SafeLibraryHandle.netcore.cs index 0d2e38de06..1ab22bee46 100644 --- a/src/Microsoft.Data.SqlClient/src/Interop/Windows/Handles/SafeLibraryHandle.netcore.cs +++ b/src/Microsoft.Data.SqlClient/src/Interop/Windows/Handles/SafeLibraryHandle.netcore.cs @@ -2,7 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#if !NETFRAMEWORK +#if NET namespace Microsoft.Win32.SafeHandles { diff --git a/src/Microsoft.Data.SqlClient/src/Interop/Windows/Kernel32/Interop.CloseHandle.netcore.cs b/src/Microsoft.Data.SqlClient/src/Interop/Windows/Kernel32/Interop.CloseHandle.netcore.cs index 1602e7251c..f4de13d0fc 100644 --- a/src/Microsoft.Data.SqlClient/src/Interop/Windows/Kernel32/Interop.CloseHandle.netcore.cs +++ b/src/Microsoft.Data.SqlClient/src/Interop/Windows/Kernel32/Interop.CloseHandle.netcore.cs @@ -2,7 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#if !NETFRAMEWORK && !NET8_0_OR_GREATER +#if NET && !NET8_0_OR_GREATER using System; using System.Runtime.InteropServices; diff --git a/src/Microsoft.Data.SqlClient/src/Interop/Windows/Kernel32/Interop.GetProcAddress.netcore.cs b/src/Microsoft.Data.SqlClient/src/Interop/Windows/Kernel32/Interop.GetProcAddress.netcore.cs index 393bbd2846..4bcd036e5a 100644 --- a/src/Microsoft.Data.SqlClient/src/Interop/Windows/Kernel32/Interop.GetProcAddress.netcore.cs +++ b/src/Microsoft.Data.SqlClient/src/Interop/Windows/Kernel32/Interop.GetProcAddress.netcore.cs @@ -2,7 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#if !NETFRAMEWORK +#if NET using System; using System.Runtime.InteropServices; diff --git a/src/Microsoft.Data.SqlClient/src/Interop/Windows/Kernel32/Interop.LoadLibraryEx.netcore.cs b/src/Microsoft.Data.SqlClient/src/Interop/Windows/Kernel32/Interop.LoadLibraryEx.netcore.cs index 2082659b2f..2f54bebd8f 100644 --- a/src/Microsoft.Data.SqlClient/src/Interop/Windows/Kernel32/Interop.LoadLibraryEx.netcore.cs +++ b/src/Microsoft.Data.SqlClient/src/Interop/Windows/Kernel32/Interop.LoadLibraryEx.netcore.cs @@ -2,7 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#if !NETFRAMEWORK +#if NET using System; using System.Runtime.InteropServices; diff --git a/src/Microsoft.Data.SqlClient/src/Interop/Windows/SChannel/Interop.SECURITY_STATUS.netcore.cs b/src/Microsoft.Data.SqlClient/src/Interop/Windows/SChannel/Interop.SECURITY_STATUS.netcore.cs index a5223dc6ea..abdaca1acc 100644 --- a/src/Microsoft.Data.SqlClient/src/Interop/Windows/SChannel/Interop.SECURITY_STATUS.netcore.cs +++ b/src/Microsoft.Data.SqlClient/src/Interop/Windows/SChannel/Interop.SECURITY_STATUS.netcore.cs @@ -2,7 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#if !NETFRAMEWORK && !NET8_0_OR_GREATER +#if NET && !NET8_0_OR_GREATER internal static partial class Interop { diff --git a/src/Microsoft.Data.SqlClient/src/Interop/Windows/SChannel/Interop.SecPkgContext_ApplicationProtocol.netcore.cs b/src/Microsoft.Data.SqlClient/src/Interop/Windows/SChannel/Interop.SecPkgContext_ApplicationProtocol.netcore.cs index acfae06fe1..8c7537ac78 100644 --- a/src/Microsoft.Data.SqlClient/src/Interop/Windows/SChannel/Interop.SecPkgContext_ApplicationProtocol.netcore.cs +++ b/src/Microsoft.Data.SqlClient/src/Interop/Windows/SChannel/Interop.SecPkgContext_ApplicationProtocol.netcore.cs @@ -2,7 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#if !NETFRAMEWORK +#if NET using System; using System.Runtime.InteropServices; diff --git a/src/Microsoft.Data.SqlClient/src/Interop/Windows/SChannel/SecPkgContext_ConnectionInfo.netcore.cs b/src/Microsoft.Data.SqlClient/src/Interop/Windows/SChannel/SecPkgContext_ConnectionInfo.netcore.cs index 61854ea250..1c2641738b 100644 --- a/src/Microsoft.Data.SqlClient/src/Interop/Windows/SChannel/SecPkgContext_ConnectionInfo.netcore.cs +++ b/src/Microsoft.Data.SqlClient/src/Interop/Windows/SChannel/SecPkgContext_ConnectionInfo.netcore.cs @@ -2,7 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#if !NETFRAMEWORK && !NET8_0_OR_GREATER +#if NET && !NET8_0_OR_GREATER using System.Runtime.InteropServices; diff --git a/src/Microsoft.Data.SqlClient/src/Interop/Windows/SspiCli/GlobalSSPI.netcore.cs b/src/Microsoft.Data.SqlClient/src/Interop/Windows/SspiCli/GlobalSSPI.netcore.cs index e4414084d8..7ac5ddff98 100644 --- a/src/Microsoft.Data.SqlClient/src/Interop/Windows/SspiCli/GlobalSSPI.netcore.cs +++ b/src/Microsoft.Data.SqlClient/src/Interop/Windows/SspiCli/GlobalSSPI.netcore.cs @@ -2,7 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#if !NETFRAMEWORK && !NET8_0_OR_GREATER +#if NET && !NET8_0_OR_GREATER namespace System.Net { diff --git a/src/Microsoft.Data.SqlClient/src/Interop/Windows/SspiCli/Interop.SSPI.netcore.cs b/src/Microsoft.Data.SqlClient/src/Interop/Windows/SspiCli/Interop.SSPI.netcore.cs index b6534c0f0e..77ae9c2ab7 100644 --- a/src/Microsoft.Data.SqlClient/src/Interop/Windows/SspiCli/Interop.SSPI.netcore.cs +++ b/src/Microsoft.Data.SqlClient/src/Interop/Windows/SspiCli/Interop.SSPI.netcore.cs @@ -2,7 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#if !NETFRAMEWORK && !NET8_0_OR_GREATER +#if NET && !NET8_0_OR_GREATER using System; using System.Net.Security; diff --git a/src/Microsoft.Data.SqlClient/src/Interop/Windows/SspiCli/NegotiationInfoClass.netcore.cs b/src/Microsoft.Data.SqlClient/src/Interop/Windows/SspiCli/NegotiationInfoClass.netcore.cs index 1df19c8408..db84d285a0 100644 --- a/src/Microsoft.Data.SqlClient/src/Interop/Windows/SspiCli/NegotiationInfoClass.netcore.cs +++ b/src/Microsoft.Data.SqlClient/src/Interop/Windows/SspiCli/NegotiationInfoClass.netcore.cs @@ -2,7 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#if !NETFRAMEWORK && !NET8_0_OR_GREATER +#if NET && !NET8_0_OR_GREATER using System.Runtime.InteropServices; diff --git a/src/Microsoft.Data.SqlClient/src/Interop/Windows/SspiCli/SSPIAuthType.netcore.cs b/src/Microsoft.Data.SqlClient/src/Interop/Windows/SspiCli/SSPIAuthType.netcore.cs index 0bbc80dae9..93957d3cb3 100644 --- a/src/Microsoft.Data.SqlClient/src/Interop/Windows/SspiCli/SSPIAuthType.netcore.cs +++ b/src/Microsoft.Data.SqlClient/src/Interop/Windows/SspiCli/SSPIAuthType.netcore.cs @@ -2,7 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#if !NETFRAMEWORK && !NET8_0_OR_GREATER +#if NET && !NET8_0_OR_GREATER using System.Net.Security; using System.Runtime.InteropServices; diff --git a/src/Microsoft.Data.SqlClient/src/Interop/Windows/SspiCli/SSPIInterface.netcore.cs b/src/Microsoft.Data.SqlClient/src/Interop/Windows/SspiCli/SSPIInterface.netcore.cs index 401cc372f7..e13f3cb087 100644 --- a/src/Microsoft.Data.SqlClient/src/Interop/Windows/SspiCli/SSPIInterface.netcore.cs +++ b/src/Microsoft.Data.SqlClient/src/Interop/Windows/SspiCli/SSPIInterface.netcore.cs @@ -2,7 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#if !NETFRAMEWORK && !NET8_0_OR_GREATER +#if NET && !NET8_0_OR_GREATER using System.Net.Security; using System.Runtime.InteropServices; diff --git a/src/Microsoft.Data.SqlClient/src/Interop/Windows/SspiCli/SSPISecureChannelType.netcore.cs b/src/Microsoft.Data.SqlClient/src/Interop/Windows/SspiCli/SSPISecureChannelType.netcore.cs index 01a82f8cb0..10f1ffd456 100644 --- a/src/Microsoft.Data.SqlClient/src/Interop/Windows/SspiCli/SSPISecureChannelType.netcore.cs +++ b/src/Microsoft.Data.SqlClient/src/Interop/Windows/SspiCli/SSPISecureChannelType.netcore.cs @@ -2,7 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#if !NETFRAMEWORK && !NET8_0_OR_GREATER +#if NET && !NET8_0_OR_GREATER using System.Net.Security; using System.Runtime.InteropServices; diff --git a/src/Microsoft.Data.SqlClient/src/Interop/Windows/SspiCli/SSPIWrapper.netcore.cs b/src/Microsoft.Data.SqlClient/src/Interop/Windows/SspiCli/SSPIWrapper.netcore.cs index 3043179665..0b45ae2f70 100644 --- a/src/Microsoft.Data.SqlClient/src/Interop/Windows/SspiCli/SSPIWrapper.netcore.cs +++ b/src/Microsoft.Data.SqlClient/src/Interop/Windows/SspiCli/SSPIWrapper.netcore.cs @@ -2,7 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#if !NETFRAMEWORK && !NET8_0_OR_GREATER +#if NET && !NET8_0_OR_GREATER using System.ComponentModel; using System.Globalization; diff --git a/src/Microsoft.Data.SqlClient/src/Interop/Windows/SspiCli/SafeDeleteContext.netcore.cs b/src/Microsoft.Data.SqlClient/src/Interop/Windows/SspiCli/SafeDeleteContext.netcore.cs index f11169222a..bae4027fe0 100644 --- a/src/Microsoft.Data.SqlClient/src/Interop/Windows/SspiCli/SafeDeleteContext.netcore.cs +++ b/src/Microsoft.Data.SqlClient/src/Interop/Windows/SspiCli/SafeDeleteContext.netcore.cs @@ -2,7 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#if !NETFRAMEWORK && !NET8_0_OR_GREATER +#if NET && !NET8_0_OR_GREATER using System.Runtime.InteropServices; diff --git a/src/Microsoft.Data.SqlClient/src/Interop/Windows/SspiCli/SecPkgContext_Bindings.netcore.cs b/src/Microsoft.Data.SqlClient/src/Interop/Windows/SspiCli/SecPkgContext_Bindings.netcore.cs index 3a849ad0f8..44f6022fd6 100644 --- a/src/Microsoft.Data.SqlClient/src/Interop/Windows/SspiCli/SecPkgContext_Bindings.netcore.cs +++ b/src/Microsoft.Data.SqlClient/src/Interop/Windows/SspiCli/SecPkgContext_Bindings.netcore.cs @@ -2,7 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#if !NETFRAMEWORK && !NET8_0_OR_GREATER +#if NET && !NET8_0_OR_GREATER using System.Runtime.InteropServices; diff --git a/src/Microsoft.Data.SqlClient/src/Interop/Windows/SspiCli/SecPkgContext_NegotiationInfoW.netcore.cs b/src/Microsoft.Data.SqlClient/src/Interop/Windows/SspiCli/SecPkgContext_NegotiationInfoW.netcore.cs index cbbe5cf257..dea4eefd2b 100644 --- a/src/Microsoft.Data.SqlClient/src/Interop/Windows/SspiCli/SecPkgContext_NegotiationInfoW.netcore.cs +++ b/src/Microsoft.Data.SqlClient/src/Interop/Windows/SspiCli/SecPkgContext_NegotiationInfoW.netcore.cs @@ -2,7 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#if !NETFRAMEWORK && !NET8_0_OR_GREATER +#if NET && !NET8_0_OR_GREATER using System.Runtime.InteropServices; diff --git a/src/Microsoft.Data.SqlClient/src/Interop/Windows/SspiCli/SecPkgContext_Sizes.netcore.cs b/src/Microsoft.Data.SqlClient/src/Interop/Windows/SspiCli/SecPkgContext_Sizes.netcore.cs index 2f0949475c..57a74e53c2 100644 --- a/src/Microsoft.Data.SqlClient/src/Interop/Windows/SspiCli/SecPkgContext_Sizes.netcore.cs +++ b/src/Microsoft.Data.SqlClient/src/Interop/Windows/SspiCli/SecPkgContext_Sizes.netcore.cs @@ -2,7 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#if !NETFRAMEWORK && !NET8_0_OR_GREATER +#if NET && !NET8_0_OR_GREATER using System.Runtime.InteropServices; diff --git a/src/Microsoft.Data.SqlClient/src/Interop/Windows/SspiCli/SecPkgContext_StreamSizes.netcore.cs b/src/Microsoft.Data.SqlClient/src/Interop/Windows/SspiCli/SecPkgContext_StreamSizes.netcore.cs index ef8aa1ae96..ce01c6c9d5 100644 --- a/src/Microsoft.Data.SqlClient/src/Interop/Windows/SspiCli/SecPkgContext_StreamSizes.netcore.cs +++ b/src/Microsoft.Data.SqlClient/src/Interop/Windows/SspiCli/SecPkgContext_StreamSizes.netcore.cs @@ -2,7 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#if !NETFRAMEWORK && !NET8_0_OR_GREATER +#if NET && !NET8_0_OR_GREATER using System.Runtime.InteropServices; diff --git a/src/Microsoft.Data.SqlClient/src/Interop/Windows/SspiCli/SecurityPackageInfo.netcore.cs b/src/Microsoft.Data.SqlClient/src/Interop/Windows/SspiCli/SecurityPackageInfo.netcore.cs index c291fa673f..de42177887 100644 --- a/src/Microsoft.Data.SqlClient/src/Interop/Windows/SspiCli/SecurityPackageInfo.netcore.cs +++ b/src/Microsoft.Data.SqlClient/src/Interop/Windows/SspiCli/SecurityPackageInfo.netcore.cs @@ -2,7 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#if !NETFRAMEWORK && !NET8_0_OR_GREATER +#if NET && !NET8_0_OR_GREATER using System.Runtime.InteropServices; diff --git a/src/Microsoft.Data.SqlClient/src/Interop/Windows/SspiCli/SecurityPackageInfoClass.netcore.cs b/src/Microsoft.Data.SqlClient/src/Interop/Windows/SspiCli/SecurityPackageInfoClass.netcore.cs index 5a84b0f8b2..5de48a218d 100644 --- a/src/Microsoft.Data.SqlClient/src/Interop/Windows/SspiCli/SecurityPackageInfoClass.netcore.cs +++ b/src/Microsoft.Data.SqlClient/src/Interop/Windows/SspiCli/SecurityPackageInfoClass.netcore.cs @@ -2,7 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#if !NETFRAMEWORK && !NET8_0_OR_GREATER +#if NET && !NET8_0_OR_GREATER using System.Globalization; using System.Runtime.InteropServices; diff --git a/src/Microsoft.Data.SqlClient/src/Interop/Windows/SspiCli/SecuritySafeHandles.netcore.cs b/src/Microsoft.Data.SqlClient/src/Interop/Windows/SspiCli/SecuritySafeHandles.netcore.cs index 9303aea1fb..46a7a57d3f 100644 --- a/src/Microsoft.Data.SqlClient/src/Interop/Windows/SspiCli/SecuritySafeHandles.netcore.cs +++ b/src/Microsoft.Data.SqlClient/src/Interop/Windows/SspiCli/SecuritySafeHandles.netcore.cs @@ -2,7 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#if !NETFRAMEWORK && !NET8_0_OR_GREATER +#if NET && !NET8_0_OR_GREATER using System.Diagnostics; using System.Globalization; From 5ebd72807966910766f16672e6f89f9bce6911e9 Mon Sep 17 00:00:00 2001 From: Ben Russell Date: Tue, 29 Oct 2024 17:14:36 -0500 Subject: [PATCH 10/10] Moving the logical location of the interop files in netcore project to the same as their physical location ... mostly so I don't lose my mind --- .../src/Microsoft.Data.SqlClient.csproj | 106 +++++++++--------- 1 file changed, 53 insertions(+), 53 deletions(-) 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 f89c011599..6d6fb2698b 100644 --- a/src/Microsoft.Data.SqlClient/netcore/src/Microsoft.Data.SqlClient.csproj +++ b/src/Microsoft.Data.SqlClient/netcore/src/Microsoft.Data.SqlClient.csproj @@ -39,13 +39,13 @@ - Common\Interop\Common\Handles\DebugCriticalHandleMinusOneIsInvalid.netcore.cs + Interop\Common\Handles\DebugCriticalHandleMinusOneIsInvalid.netcore.cs - Common\Interop\Common\Handles\DebugCriticalHandleZeroOrMinusOneIsInvalid.netcore.cs + Interop\Common\Handles\DebugCriticalHandleZeroOrMinusOneIsInvalid.netcore.cs - Common\Interop\Common\Handles\DebugSafeHandle.netcore.cs + Interop\Common\Handles\DebugSafeHandle.netcore.cs Microsoft\Data\Common\ActivityCorrelator.cs @@ -688,127 +688,127 @@ - Common\Interop\Windows\Crypt32\Interop.certificates.netcore.cs + Interop\Windows\Crypt32\Interop.certificates.netcore.cs - Common\Interop\Windows\Crypt32\Interop.certificates_types.netcore.cs + Interop\Windows\Crypt32\Interop.certificates_types.netcore.cs - Common\Interop\Windows\Handles\SafeLibraryHandle.netcore.cs + Interop\Windows\Handles\SafeLibraryHandle.netcore.cs - Common\Interop\Windows\Interop.Errors.cs + Interop\Windows\Interop.Errors.cs - Common\Interop\Windows\Interop.Libraries.cs + Interop\Windows\Interop.Libraries.cs - Common\Interop\Windows\Interop.UNICODE_STRING.cs + Interop\Windows\Interop.UNICODE_STRING.cs - Common\Interop\Windows\Kernel32\Interop.GetProcAddress.netcore.cs + Interop\Windows\Kernel32\Interop.GetProcAddress.netcore.cs - Common\Interop\Windows\Kernel32\Interop.CloseHandle.netcore.cs + Interop\Windows\Kernel32\Interop.CloseHandle.netcore.cs - Common\Interop\Windows\Kernel32\Interop.CTL_CODE.cs + Interop\Windows\Kernel32\Interop.CTL_CODE.cs - Common\Interop\Windows\Kernel32\Interop.DeviceIoControl.cs + Interop\Windows\Kernel32\Interop.DeviceIoControl.cs - Common\Interop\Windows\Kernel32\Interop.FileTypes.cs + Interop\Windows\Kernel32\Interop.FileTypes.cs - Common\Interop\Windows\Kernel32\Interop.FreeLibrary.netcore.cs + Interop\Windows\Kernel32\Interop.FreeLibrary.netcore.cs - Common\Interop\Windows\Kernel32\Interop.GetFileType_SafeHandle.cs + Interop\Windows\Kernel32\Interop.GetFileType_SafeHandle.cs - Common\Interop\Windows\Kernel32\Interop.GetFullPathName.cs + Interop\Windows\Kernel32\Interop.GetFullPathName.cs - Common\Interop\Windows\Kernel32\Interop.IoControlCodeAccess.cs + Interop\Windows\Kernel32\Interop.IoControlCodeAccess.cs - Common\Interop\Windows\Kernel32\Interop.IoControlTransferType.cs + Interop\Windows\Kernel32\Interop.IoControlTransferType.cs - Common\Interop\Windows\Kernel32\Interop.LoadLibraryEx.netcore.cs + Interop\Windows\Kernel32\Interop.LoadLibraryEx.netcore.cs - Common\Interop\Windows\Kernel32\Interop.SetThreadErrorMode.cs + Interop\Windows\Kernel32\Interop.SetThreadErrorMode.cs - Common\Interop\Windows\NtDll\Interop.FILE_FULL_EA_INFORMATION.cs + Interop\Windows\NtDll\Interop.FILE_FULL_EA_INFORMATION.cs - Common\Interop\Windows\NtDll\Interop.IO_STATUS_BLOCK.cs + Interop\Windows\NtDll\Interop.IO_STATUS_BLOCK.cs - Common\Interop\Windows\NtDll\Interop.NtCreateFile.cs + Interop\Windows\NtDll\Interop.NtCreateFile.cs - Common\Interop\Windows\NtDll\Interop.RtlNtStatusToDosError.cs + Interop\Windows\NtDll\Interop.RtlNtStatusToDosError.cs - Common\Interop\Windows\NtDll\Interop.SecurityQualityOfService.cs + Interop\Windows\NtDll\Interop.SecurityQualityOfService.cs - Common\Interop\Windows\SChannel\Interop.SecPkgContext_ApplicationProtocol.netcore.cs + Interop\Windows\SChannel\Interop.SecPkgContext_ApplicationProtocol.netcore.cs - Common\Interop\Windows\SChannel\SecPkgContext_ConnectionInfo.netcore.cs + Interop\Windows\SChannel\SecPkgContext_ConnectionInfo.netcore.cs - Common\Interop\Windows\SChannel\Interop.SECURITY_STATUS.netcore.cs + Interop\Windows\SChannel\Interop.SECURITY_STATUS.netcore.cs - Common\Interop\Windows\SspiCli\GlobalSSPI.netcore.cs + Interop\Windows\SspiCli\GlobalSSPI.netcore.cs - Common\Interop\Windows\SspiCli\Interop.SSPI.netcore.cs + Interop\Windows\SspiCli\Interop.SSPI.netcore.cs - Common\Interop\Windows\SspiCli\NegotiationInfoClass.netcore.cs + Interop\Windows\SspiCli\NegotiationInfoClass.netcore.cs - Common\Interop\Windows\SspiCli\SafeDeleteContext.netcore.cs + Interop\Windows\SspiCli\SafeDeleteContext.netcore.cs - Common\Interop\Windows\SspiCli\SecPkgContext_Bindings.netcore.cs + Interop\Windows\SspiCli\SecPkgContext_Bindings.netcore.cs - Common\Interop\Windows\SspiCli\SecPkgContext_NegotiationInfoW.netcore.cs + Interop\Windows\SspiCli\SecPkgContext_NegotiationInfoW.netcore.cs - Common\Interop\Windows\SspiCli\SecPkgContext_Sizes.netcore.cs + Interop\Windows\SspiCli\SecPkgContext_Sizes.netcore.cs - Common\Interop\Windows\SspiCli\SecPkgContext_StreamSizes.netcore.cs + Interop\Windows\SspiCli\SecPkgContext_StreamSizes.netcore.cs - Common\Interop\Windows\SspiCli\SecurityPackageInfo.netcore.cs + Interop\Windows\SspiCli\SecurityPackageInfo.netcore.cs - Common\Interop\Windows\SspiCli\SecurityPackageInfoClass.netcore.cs + Interop\Windows\SspiCli\SecurityPackageInfoClass.netcore.cs - Common\Interop\Windows\SspiCli\SecuritySafeHandles.netcore.cs + Interop\Windows\SspiCli\SecuritySafeHandles.netcore.cs - Common\Interop\Windows\SspiCli\SSPIAuthType.netcore.cs + Interop\Windows\SspiCli\SSPIAuthType.netcore.cs - Common\Interop\Windows\SspiCli\SSPIInterface.netcore.cs + Interop\Windows\SspiCli\SSPIInterface.netcore.cs - Common\Interop\Windows\SspiCli\SSPISecureChannelType.netcore.cs + Interop\Windows\SspiCli\SSPISecureChannelType.netcore.cs - Common\Interop\Windows\SspiCli\SSPIWrapper.netcore.cs + Interop\Windows\SspiCli\SSPIWrapper.netcore.cs Microsoft\Data\Common\AdapterUtil.Windows.cs @@ -862,31 +862,31 @@ - Common\Microsoft\Win32\SafeHandles\GssSafeHandles.netcore.cs + Interop\Unix\Handles\GssSafeHandles.netcore.cs - Common\System\Net\Security\Unix\SafeDeleteContext.netcore.cs + Interop\Unix\Handles\SafeDeleteContext.netcore.cs - Common\System\Net\Security\Unix\SafeDeleteNegoContext.netcore.cs + Interop\Unix\Handles\SafeDeleteNegoContext.netcore.cs - Common\System\Net\Security\Unix\SafeFreeCrednetials.netcore.cs + Interop\Unix\Handles\SafeFreeCrednetials.netcore.cs - Common\System\Net\Security\Unix\SafeFreeNegoCredentials.netcore.cs + Interop\Unix\Handles\SafeFreeNegoCredentials.netcore.cs - Common\Interop\Unix\Interop.Libraries.netcore.cs + Interop\Unix\Interop.Libraries.netcore.cs - Common\Interop\Unix\System.Net.Security.Native\Interop.GssApiException.netcore.cs + Interop\Unix\System.Net.Security.Native\Interop.GssApiException.netcore.cs - Common\Interop\Unix\System.Net.Security.Native\Interop.Interop.GssBuffer.netcore.cs + Interop\Unix\System.Net.Security.Native\Interop.Interop.GssBuffer.netcore.cs - Common\Interop\Unix\System.Net.Security.Native\Interop.NetSecurityNative.netcore.cs + Interop\Unix\System.Net.Security.Native\Interop.NetSecurityNative.netcore.cs Microsoft\Data\Common\AdapterUtil.Unix.cs