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 306d9eacdf..d90c60499a 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 @@ + + Interop\Common\Handles\DebugCriticalHandleMinusOneIsInvalid.netcore.cs + + + Interop\Common\Handles\DebugCriticalHandleZeroOrMinusOneIsInvalid.netcore.cs + + + Interop\Common\Handles\DebugSafeHandle.netcore.cs + Microsoft\Data\Common\ActivityCorrelator.cs @@ -620,8 +629,6 @@ - - @@ -680,53 +687,128 @@ - - Common\Interop\Windows\Kernel32\Interop.GetFileType_SafeHandle.cs + + Interop\Windows\Crypt32\Interop.certificates.netcore.cs + + + Interop\Windows\Crypt32\Interop.certificates_types.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 + + + Interop\Windows\Kernel32\Interop.GetProcAddress.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 + + + Interop\Windows\Kernel32\Interop.FreeLibrary.netcore.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 + + + 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 + + + Interop\Windows\SChannel\Interop.SecPkgContext_ApplicationProtocol.netcore.cs + + + Interop\Windows\SChannel\SecPkgContext_ConnectionInfo.netcore.cs + + + Interop\Windows\SChannel\Interop.SECURITY_STATUS.netcore.cs + + + Interop\Windows\SspiCli\GlobalSSPI.netcore.cs + + + Interop\Windows\SspiCli\Interop.SSPI.netcore.cs + + + Interop\Windows\SspiCli\NegotiationInfoClass.netcore.cs + + + Interop\Windows\SspiCli\SafeDeleteContext.netcore.cs + + + Interop\Windows\SspiCli\SecPkgContext_Bindings.netcore.cs + + + Interop\Windows\SspiCli\SecPkgContext_NegotiationInfoW.netcore.cs + + + Interop\Windows\SspiCli\SecPkgContext_Sizes.netcore.cs + + + Interop\Windows\SspiCli\SecPkgContext_StreamSizes.netcore.cs + + + Interop\Windows\SspiCli\SecurityPackageInfo.netcore.cs + + + Interop\Windows\SspiCli\SecurityPackageInfoClass.netcore.cs + + + Interop\Windows\SspiCli\SecuritySafeHandles.netcore.cs + + + Interop\Windows\SspiCli\SSPIAuthType.netcore.cs + + + Interop\Windows\SspiCli\SSPIInterface.netcore.cs + + + Interop\Windows\SspiCli\SSPISecureChannelType.netcore.cs + + + Interop\Windows\SspiCli\SSPIWrapper.netcore.cs Microsoft\Data\Common\AdapterUtil.Windows.cs @@ -758,35 +840,9 @@ Microsoft\Data\SqlTypes\SqlFileStream.Windows.cs - - - - - - - - - - - - - - - - - - - - - - - - - - + - @@ -805,23 +861,41 @@ + + Interop\Unix\Handles\GssSafeHandles.netcore.cs + + + Interop\Unix\Handles\SafeDeleteContext.netcore.cs + + + Interop\Unix\Handles\SafeDeleteNegoContext.netcore.cs + + + Interop\Unix\Handles\SafeFreeCrednetials.netcore.cs + + + Interop\Unix\Handles\SafeFreeNegoCredentials.netcore.cs + + + Interop\Unix\Interop.Libraries.netcore.cs + + + Interop\Unix\System.Net.Security.Native\Interop.GssApiException.netcore.cs + + + Interop\Unix\System.Net.Security.Native\Interop.Interop.GssBuffer.netcore.cs + + + Interop\Unix\System.Net.Security.Native\Interop.NetSecurityNative.netcore.cs + Microsoft\Data\Common\AdapterUtil.Unix.cs Microsoft\Data\ProviderBase\DbConnectionPoolIdentity.Unix.cs - - - - - - + - - - - diff --git a/src/Microsoft.Data.SqlClient/netcore/src/Common/System/Net/DebugCriticalHandleMinusOneIsInvalid.cs b/src/Microsoft.Data.SqlClient/src/Interop/Common/Handles/DebugCriticalHandleMinusOneIsInvalid.netcore.cs similarity index 97% rename from src/Microsoft.Data.SqlClient/netcore/src/Common/System/Net/DebugCriticalHandleMinusOneIsInvalid.cs rename to src/Microsoft.Data.SqlClient/src/Interop/Common/Handles/DebugCriticalHandleMinusOneIsInvalid.netcore.cs index a9d0965324..0f76ea5b8e 100644 --- a/src/Microsoft.Data.SqlClient/netcore/src/Common/System/Net/DebugCriticalHandleMinusOneIsInvalid.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 && !NET8_0_OR_GREATER +#if NET && !NET8_0_OR_GREATER && DEBUG 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/Common/Handles/DebugCriticalHandleZeroOrMinusOneIsInvalid.netcore.cs similarity index 97% rename from src/Microsoft.Data.SqlClient/netcore/src/Common/System/Net/DebugCriticalHandleZeroOrMinusOneIsInvalid.cs rename to src/Microsoft.Data.SqlClient/src/Interop/Common/Handles/DebugCriticalHandleZeroOrMinusOneIsInvalid.netcore.cs index fcb485d568..ec7ace6f47 100644 --- a/src/Microsoft.Data.SqlClient/netcore/src/Common/System/Net/DebugCriticalHandleZeroOrMinusOneIsInvalid.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 && !NET8_0_OR_GREATER +#if NET && !NET8_0_OR_GREATER && DEBUG 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/Common/Handles/DebugSafeHandle.netcore.cs similarity index 97% rename from src/Microsoft.Data.SqlClient/netcore/src/Common/System/Net/DebugSafeHandle.cs rename to src/Microsoft.Data.SqlClient/src/Interop/Common/Handles/DebugSafeHandle.netcore.cs index 55d5bd8a6f..b2e96c0cca 100644 --- a/src/Microsoft.Data.SqlClient/netcore/src/Common/System/Net/DebugSafeHandle.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 && !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/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..4e7392ee18 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 NET && !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 98% 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..5caecd50b1 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 NET && !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..6b878a1db9 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 NET && !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..7db3137ddc 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 NET && !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..cba31fc6fa 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 NET && !NET8_0_OR_GREATER using System.Diagnostics; using Microsoft.Win32.SafeHandles; 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..6b3e828296 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 NET && !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..3a847f07ee 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 NET && !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..93ba5443b3 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 NET && !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.cs b/src/Microsoft.Data.SqlClient/src/Interop/Windows/Crypt32/Interop.certificates.netcore.cs similarity index 97% 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..41529cfe4c 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 NET && !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..cbc0e4d595 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 NET && !NET8_0_OR_GREATER using System; using System.Runtime.InteropServices; 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 96% 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..1ab22bee46 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 NET + 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/netcore/src/Common/Interop/Windows/kernel32/Interop.CloseHandle.cs b/src/Microsoft.Data.SqlClient/src/Interop/Windows/Kernel32/Interop.CloseHandle.netcore.cs similarity index 94% 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..f4de13d0fc 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 NET && !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 97% 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..4bcd036e5a 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 NET + 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 97% 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..2f54bebd8f 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 NET + 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 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..abdaca1acc 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 NET && !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 98% 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..8c7537ac78 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 NET + 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 98% 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..1c2641738b 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 NET && !NET8_0_OR_GREATER using System.Runtime.InteropServices; 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 93% 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..7ac5ddff98 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 NET && !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..77ae9c2ab7 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 NET && !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..db84d285a0 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 NET && !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..93957d3cb3 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 NET && !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 99% 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..e13f3cb087 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 NET && !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..10f1ffd456 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 NET && !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..0b45ae2f70 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 NET && !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..bae4027fe0 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 NET && !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 93% 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..44f6022fd6 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 NET && !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 94% 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..dea4eefd2b 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 NET && !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 98% 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..57a74e53c2 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 NET && !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 98% 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..ce01c6c9d5 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 NET && !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 95% 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..de42177887 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 NET && !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 99% 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..5de48a218d 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 NET && !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..46a7a57d3f 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 NET && !NET8_0_OR_GREATER using System.Diagnostics; using System.Globalization;