Skip to content

Commit cc6ea21

Browse files
authored
Streamline conditional compilation symbols (#2486)
1 parent 9a71c94 commit cc6ea21

File tree

48 files changed

+75
-79
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+75
-79
lines changed

src/Microsoft.Data.SqlClient/netcore/ref/Microsoft.Data.SqlClient.cs

+3-3
Original file line numberDiff line numberDiff line change
@@ -478,7 +478,7 @@ public static partial class SqlClientMetaDataCollectionNames
478478
/// <include file='../../../../doc/snippets/Microsoft.Data.SqlClient/SqlClientMetaDataCollectionNames.xml' path='docs/members[@name="SqlClientMetaDataCollectionNames"]/StructuredTypeMembers/*' />
479479
public static readonly string StructuredTypeMembers;
480480
}
481-
#if NETCOREAPP
481+
#if NET6_0_OR_GREATER
482482
/// <include file='../../../../doc/snippets/Microsoft.Data.SqlClient/SqlConnectionAttestationProtocol.xml' path='docs/members[@name="SqlConnectionAttestationProtocol"]/SqlConnectionAttestationProtocol/*' />
483483
public enum SqlConnectionAttestationProtocol
484484
{
@@ -1017,7 +1017,7 @@ public SqlConnectionStringBuilder(string connectionString) { }
10171017
[System.ComponentModel.DisplayNameAttribute("Data Source")]
10181018
[System.ComponentModel.RefreshPropertiesAttribute(System.ComponentModel.RefreshProperties.All)]
10191019
public string DataSource { get { throw null; } set { } }
1020-
#if NETCOREAPP
1020+
#if NET6_0_OR_GREATER
10211021
/// <include file='../../../../doc/snippets/Microsoft.Data.SqlClient/SqlConnectionStringBuilder.xml' path='docs/members[@name="SqlConnectionStringBuilder"]/AttestationProtocol/*' />
10221022
[System.ComponentModel.DisplayNameAttribute("Attestation Protocol")]
10231023
[System.ComponentModel.RefreshPropertiesAttribute(System.ComponentModel.RefreshProperties.All)]
@@ -1444,7 +1444,7 @@ internal SqlException() { }
14441444
public byte State { get { throw null; } }
14451445

14461446
/// <include file='../../../../doc/snippets/Microsoft.Data.SqlClient/SqlException.xml' path='docs/members[@name="SqlException"]/GetObjectData/*'/>
1447-
#if !NET6_0_OR_GREATER
1447+
#if NETFRAMEWORK
14481448
[System.Security.Permissions.SecurityPermissionAttribute(System.Security.Permissions.SecurityAction.LinkDemand, Flags = System.Security.Permissions.SecurityPermissionFlag.SerializationFormatter)]
14491449
#endif
14501450
#if NET8_0_OR_GREATER

src/Microsoft.Data.SqlClient/netcore/src/Common/src/Interop/Windows/Interop.Libraries.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ internal static partial class Libraries
99
internal const string Crypt32 = "crypt32.dll";
1010
internal const string Kernel32 = "kernel32.dll";
1111
internal const string NtDll = "ntdll.dll";
12-
#if !NET7_0_OR_GREATER
12+
#if !NET8_0_OR_GREATER
1313
internal const string SspiCli = "sspicli.dll";
1414
#endif
1515
}

src/Microsoft.Data.SqlClient/netcore/src/Common/src/System/Net/Logging/NetEventSource.Common.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
using System.Diagnostics.Tracing;
1414
using System.Runtime.CompilerServices;
1515
using System.Runtime.InteropServices;
16-
#if net462
16+
#if NETFRAMEWORK
1717
using System.Security;
1818
#endif
1919

@@ -45,7 +45,7 @@ namespace System.Net
4545
// method that takes an object and optionally provides a string representation of it, in case a particular library wants to customize further.
4646

4747
/// <summary>Provides logging facilities for System.Net libraries.</summary>
48-
#if net462
48+
#if NETFRAMEWORK
4949
[SecuritySafeCritical]
5050
#endif
5151
internal sealed partial class NetEventSource : EventSource

src/Microsoft.Data.SqlClient/netcore/src/Microsoft/Data/ProviderBase/DbConnectionPool.NetCoreApp.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// The .NET Foundation licenses this file to you under the MIT license.
33
// See the LICENSE file in the project root for more information.
44

5-
#if NETCOREAPP
5+
#if NET6_0_OR_GREATER
66

77
using System.Diagnostics;
88
using Microsoft.Data.Common;

src/Microsoft.Data.SqlClient/netcore/src/Microsoft/Data/ProviderBase/DbConnectionPool.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -776,7 +776,7 @@ private DbConnectionInternal CreateObject(DbConnection owningObject, DbConnectio
776776
throw;
777777
}
778778

779-
#if NETCOREAPP
779+
#if NET6_0_OR_GREATER
780780
if (!IsBlockingPeriodEnabled())
781781
{
782782
throw;

src/Microsoft.Data.SqlClient/netcore/src/Microsoft/Data/SqlClient/SNI/SNICommon.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ internal static bool ValidateSslServerCertificate(string targetServerName, X509C
190190

191191
if (policyErrors.HasFlag(SslPolicyErrors.RemoteCertificateNameMismatch))
192192
{
193-
#if NET7_0_OR_GREATER
193+
#if NET8_0_OR_GREATER
194194
X509Certificate2 cert2 = cert as X509Certificate2;
195195
if (!cert2.MatchesHostname(targetServerName))
196196
{
@@ -297,7 +297,7 @@ internal static bool ValidateSslServerCertificate(X509Certificate clientCert, X5
297297

298298
if (policyErrors.HasFlag(SslPolicyErrors.RemoteCertificateNameMismatch))
299299
{
300-
#if NET7_0_OR_GREATER
300+
#if NET8_0_OR_GREATER
301301
X509Certificate2 s_cert = serverCert as X509Certificate2;
302302
X509Certificate2 c_cert = clientCert as X509Certificate2;
303303

src/Microsoft.Data.SqlClient/netcore/src/Microsoft/Data/SqlClient/SNI/SNIProxy.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ internal class SNIProxy
2626
private static readonly SNIProxy s_singleton = new SNIProxy();
2727

2828
internal static SNIProxy Instance => s_singleton;
29-
#if !NET7_0_OR_GREATER
29+
#if !NET8_0_OR_GREATER
3030
/// <summary>
3131
/// Generate SSPI context
3232
/// </summary>

src/Microsoft.Data.SqlClient/netcore/src/Microsoft/Data/SqlClient/SNI/SNITcpHandle.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1008,7 +1008,7 @@ public override void KillConnection()
10081008

10091009
internal static void SetKeepAliveValues(ref Socket socket)
10101010
{
1011-
#if NETCOREAPP
1011+
#if NET6_0_OR_GREATER
10121012
socket.SetSocketOption(SocketOptionLevel.Socket, SocketOptionName.KeepAlive, true);
10131013
socket.SetSocketOption(SocketOptionLevel.Tcp, SocketOptionName.TcpKeepAliveInterval, 1);
10141014
socket.SetSocketOption(SocketOptionLevel.Tcp, SocketOptionName.TcpKeepAliveTime, 30);

src/Microsoft.Data.SqlClient/netcore/src/Microsoft/Data/SqlClient/SqlCommand.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -3994,7 +3994,7 @@ private SqlDataReader GetParameterEncryptionDataReader(out Task returnTask, Task
39943994
SqlCommand command = (SqlCommand)state;
39953995
bool processFinallyBlockAsync = true;
39963996
bool decrementAsyncCountInFinallyBlockAsync = true;
3997-
#if !NET6_0_OR_GREATER
3997+
#if NETFRAMEWORK
39983998
RuntimeHelpers.PrepareConstrainedRegions();
39993999
#endif
40004000
try
@@ -4068,7 +4068,7 @@ private SqlDataReader GetParameterEncryptionDataReaderAsync(out Task returnTask,
40684068
bool processFinallyBlockAsync = true;
40694069
bool decrementAsyncCountInFinallyBlockAsync = true;
40704070

4071-
#if !NET6_0_OR_GREATER
4071+
#if NETFRAMEWORK
40724072
RuntimeHelpers.PrepareConstrainedRegions();
40734073
#endif
40744074
try

src/Microsoft.Data.SqlClient/netcore/src/Microsoft/Data/SqlClient/SqlConnectionFactory.AssemblyLoadContext.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// The .NET Foundation licenses this file to you under the MIT license.
33
// See the LICENSE file in the project root for more information.
44

5-
#if NETCOREAPP
5+
#if NET6_0_OR_GREATER
66

77
using System;
88
using System.Reflection;

src/Microsoft.Data.SqlClient/netcore/src/Microsoft/Data/SqlClient/SqlDataReader.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1353,7 +1353,7 @@ override public string GetName(int i)
13531353
}
13541354

13551355
/// <include file='../../../../../../../doc/snippets/Microsoft.Data.SqlClient/SqlDataReader.xml' path='docs/members[@name="SqlDataReader"]/GetProviderSpecificFieldType/*' />
1356-
#if NET7_0_OR_GREATER
1356+
#if NET8_0_OR_GREATER
13571357
[return: DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicProperties | DynamicallyAccessedMemberTypes.PublicFields)]
13581358
#endif
13591359
override public Type GetProviderSpecificFieldType(int i)

src/Microsoft.Data.SqlClient/netcore/src/Microsoft/Data/SqlClient/SqlDelegatedTransaction.cs

+4-4
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ public void Initialize()
8181
SqlInternalConnection connection = _connection;
8282
SqlConnection usersConnection = connection.Connection;
8383
SqlClientEventSource.Log.TryTraceEvent("SqlDelegatedTransaction.Initialize | RES | CPOOL | Object Id {0}, Client Connection Id {1}, delegating transaction.", ObjectID, usersConnection?.ClientConnectionId);
84-
#if !NET6_0_OR_GREATER
84+
#if NETFRAMEWORK
8585
RuntimeHelpers.PrepareConstrainedRegions();
8686
#endif
8787
try
@@ -146,7 +146,7 @@ public byte[] Promote()
146146
{
147147
SqlConnection usersConnection = connection.Connection;
148148
SqlClientEventSource.Log.TryTraceEvent("SqlDelegatedTransaction.Promote | RES | CPOOL | Object Id {0}, Client Connection Id {1}, promoting transaction.", ObjectID, usersConnection?.ClientConnectionId);
149-
#if !NET6_0_OR_GREATER
149+
#if NETFRAMEWORK
150150
RuntimeHelpers.PrepareConstrainedRegions();
151151
#endif
152152
try
@@ -256,7 +256,7 @@ public void Rollback(SinglePhaseEnlistment enlistment)
256256
{
257257
SqlConnection usersConnection = connection.Connection;
258258
SqlClientEventSource.Log.TryTraceEvent("SqlDelegatedTransaction.Rollback | RES | CPOOL | Object Id {0}, Client Connection Id {1}, rolling back transaction.", ObjectID, usersConnection?.ClientConnectionId);
259-
#if !NET6_0_OR_GREATER
259+
#if NETFRAMEWORK
260260
RuntimeHelpers.PrepareConstrainedRegions();
261261
#endif
262262
try
@@ -343,7 +343,7 @@ public void SinglePhaseCommit(SinglePhaseEnlistment enlistment)
343343
{
344344
SqlConnection usersConnection = connection.Connection;
345345
SqlClientEventSource.Log.TryTraceEvent("SqlDelegatedTransaction.SinglePhaseCommit | RES | CPOOL | Object Id {0}, Client Connection Id {1}, committing transaction.", ObjectID, usersConnection?.ClientConnectionId);
346-
#if !NET6_0_OR_GREATER
346+
#if NETFRAMEWORK
347347
RuntimeHelpers.PrepareConstrainedRegions();
348348
#endif
349349
try

src/Microsoft.Data.SqlClient/netcore/src/Microsoft/Data/SqlClient/SqlInternalConnectionTds.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -2300,7 +2300,7 @@ internal bool TryGetFedAuthTokenLocked(SqlFedAuthInfo fedAuthInfo, DbConnectionP
23002300
bool authenticationContextLocked = false;
23012301

23022302
// Prepare CER to ensure the lock on authentication context is released.
2303-
#if !NET6_0_OR_GREATER
2303+
#if NETFRAMEWORK
23042304
RuntimeHelpers.PrepareConstrainedRegions();
23052305
#endif
23062306
try

src/Microsoft.Data.SqlClient/netcore/src/Microsoft/Data/SqlClient/TdsParser.cs

+5-5
Original file line numberDiff line numberDiff line change
@@ -1774,7 +1774,7 @@ internal void WriteInt(int v, TdsParserStateObject stateObj)
17741774

17751775
internal static void WriteInt(Span<byte> buffer, int value)
17761776
{
1777-
#if NETCOREAPP
1777+
#if NET6_0_OR_GREATER
17781778
BinaryPrimitives.TryWriteInt32LittleEndian(buffer, value);
17791779
#else
17801780
buffer[0] = (byte)(value & 0xff);
@@ -6144,7 +6144,7 @@ internal bool TryReadSqlValue(SqlBuffer value, SqlMetaDataPriv md, int length, T
61446144
}
61456145
else
61466146
{
6147-
#if NET7_0_OR_GREATER
6147+
#if NET8_0_OR_GREATER
61486148
value.SqlBinary = SqlBinary.WrapBytes(b);
61496149
#else
61506150
value.SqlBinary = SqlTypeWorkarounds.SqlBinaryCtor(b, true); // doesn't copy the byte array
@@ -6441,7 +6441,7 @@ internal bool TryReadSqlValueInternal(SqlBuffer value, byte tdsType, int length,
64416441
{
64426442
return false;
64436443
}
6444-
#if NET7_0_OR_GREATER
6444+
#if NET8_0_OR_GREATER
64456445
value.SqlBinary = SqlBinary.WrapBytes(b);
64466446
#else
64476447
value.SqlBinary = SqlTypeWorkarounds.SqlBinaryCtor(b, true);
@@ -7313,7 +7313,7 @@ internal byte[] SerializeSqlDecimal(SqlDecimal d, TdsParserStateObject stateObj)
73137313

73147314

73157315
Span<uint> data = stackalloc uint[4];
7316-
#if NET7_0_OR_GREATER
7316+
#if NET8_0_OR_GREATER
73177317
d.WriteTdsValue(data);
73187318
#else
73197319
SqlTypeWorkarounds.SqlDecimalExtractData(d, out data[0], out data[1], out data[2], out data[3]);
@@ -7342,7 +7342,7 @@ internal void WriteSqlDecimal(SqlDecimal d, TdsParserStateObject stateObj)
73427342
stateObj.WriteByte(0);
73437343

73447344
Span<uint> data = stackalloc uint[4];
7345-
#if NET7_0_OR_GREATER
7345+
#if NET8_0_OR_GREATER
73467346
d.WriteTdsValue(data);
73477347
#else
73487348
SqlTypeWorkarounds.SqlDecimalExtractData(d, out data[0], out data[1], out data[2], out data[3]);

src/Microsoft.Data.SqlClient/netcore/src/Microsoft/Data/SqlClient/TdsParserStateObjectManaged.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -408,7 +408,7 @@ private SNIHandle GetSessionSNIHandleHandleOrThrow()
408408
private void ThrowClosedConnection() => throw ADP.ClosedConnectionError();
409409

410410
internal override SSPIContextProvider CreateSSPIContextProvider()
411-
#if NET7_0_OR_GREATER
411+
#if NET8_0_OR_GREATER
412412
=> new NegotiateSSPIContextProvider();
413413
#else
414414
=> new ManagedSSPIContextProvider();

src/Microsoft.Data.SqlClient/netcore/src/Microsoft/Data/SqlClient/TdsParserStateObjectNative.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -409,7 +409,7 @@ internal override uint WaitForSSLHandShakeToComplete(out int protocolVersion)
409409
{
410410
protocolVersion = (int)SslProtocols.Tls12;
411411
}
412-
#if NETCOREAPP
412+
#if NET6_0_OR_GREATER
413413
else if (nativeProtocol.HasFlag(NativeProtocols.SP_PROT_TLS1_3_CLIENT) || nativeProtocol.HasFlag(NativeProtocols.SP_PROT_TLS1_3_SERVER))
414414
{
415415
/* The SslProtocols.Tls13 is supported by netcoreapp3.1 and later */

src/Microsoft.Data.SqlClient/netcore/src/Microsoft/Data/SqlTypes/SqlFileStream.Windows.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -297,7 +297,7 @@ public override void Flush()
297297
}
298298

299299
/// <include file='../../../../../../../doc/snippets/Microsoft.Data.SqlTypes/SqlFileStream.xml' path='docs/members[@name="SqlFileStream"]/BeginRead/*' />
300-
#if !NET6_0_OR_GREATER
300+
#if NETFRAMEWORK
301301
[HostProtection(ExternalThreading = true)]
302302
#endif
303303
public override IAsyncResult BeginRead(byte[] buffer, int offset, int count, AsyncCallback callback, object state)
@@ -318,7 +318,7 @@ public override int EndRead(IAsyncResult asyncResult)
318318
}
319319

320320
/// <include file='../../../../../../../doc/snippets/Microsoft.Data.SqlTypes/SqlFileStream.xml' path='docs/members[@name="SqlFileStream"]/BeginWrite/*' />
321-
#if !NET6_0_OR_GREATER
321+
#if NETFRAMEWORK
322322
[HostProtection(ExternalThreading = true)]
323323
#endif
324324
public override IAsyncResult BeginWrite(byte[] buffer, int offset, int count, AsyncCallback callback, object state)

src/Microsoft.Data.SqlClient/src/Microsoft/Data/Common/AdapterUtil.Windows.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ internal static partial class ADP
2626
[ResourceConsumption(ResourceScope.Machine)]
2727
internal static object LocalMachineRegistryValue(string subkey, string queryvalue)
2828
{ // MDAC 77697
29-
#if !NET6_0_OR_GREATER
29+
#if NETFRAMEWORK
3030
(new RegistryPermission(RegistryPermissionAccess.Read, "HKEY_LOCAL_MACHINE\\" + subkey)).Assert(); // MDAC 62028
3131
#endif
3232
try
@@ -43,7 +43,7 @@ internal static object LocalMachineRegistryValue(string subkey, string queryvalu
4343
ADP.TraceExceptionWithoutRethrow(e);
4444
return null;
4545
}
46-
#if !NET6_0_OR_GREATER
46+
#if NETFRAMEWORK
4747
finally
4848
{
4949
RegistryPermission.RevertAssert();

src/Microsoft.Data.SqlClient/src/Microsoft/Data/Common/AdapterUtil.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -668,7 +668,7 @@ private static long TimerToSeconds(long timerValue)
668668
/// Note: In Longhorn you'll be able to rename a machine without
669669
/// rebooting. Therefore, don't cache this machine name.
670670
/// </summary>
671-
#if !NET6_0_OR_GREATER
671+
#if NETFRAMEWORK
672672
[EnvironmentPermission(SecurityAction.Assert, Read = "COMPUTERNAME")]
673673
#endif
674674
internal static string MachineName() => Environment.MachineName;

src/Microsoft.Data.SqlClient/src/Microsoft/Data/ProviderBase/DbConnectionPoolAuthenticationContext.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ internal bool LockToUpdate()
102102
/// <summary>
103103
/// Release the lock which was obtained through LockToUpdate.
104104
/// </summary>
105-
#if !NET6_0_OR_GREATER
105+
#if NETFRAMEWORK
106106
[ReliabilityContract(Consistency.WillNotCorruptState, Cer.Success)]
107107
#endif
108108
internal void ReleaseLockToUpdate()

src/Microsoft.Data.SqlClient/src/Microsoft/Data/Sql/SqlDataSourceEnumeratorNativeHelper.cs

+3-3
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ internal static class SqlDataSourceEnumeratorNativeHelper
2525
/// <returns></returns>
2626
internal static DataTable GetDataSources()
2727
{
28-
#if !NET6_0_OR_GREATER
28+
#if NETFRAMEWORK
2929
(new NamedPermissionSet("FullTrust")).Demand(); // SQLBUDT 244304
3030
#endif
3131
char[] buffer = null;
@@ -37,13 +37,13 @@ internal static DataTable GetDataSources()
3737
bool more = true;
3838
bool failure = false;
3939
IntPtr handle = ADP.s_ptrZero;
40-
#if !NET6_0_OR_GREATER
40+
#if NETFRAMEWORK
4141
RuntimeHelpers.PrepareConstrainedRegions();
4242
#endif
4343
try
4444
{
4545
long s_timeoutTime = TdsParserStaticMethods.GetTimeoutSeconds(ADP.DefaultCommandTimeout);
46-
#if !NET6_0_OR_GREATER
46+
#if NETFRAMEWORK
4747
RuntimeHelpers.PrepareConstrainedRegions();
4848
#endif
4949
try

src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/ActiveDirectoryAuthenticationProvider.cs

+2-4
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ public override async Task<SqlAuthenticationToken> AcquireTokenAsync(SqlAuthenti
207207
*/
208208
string redirectUri = s_nativeClientRedirectUri;
209209

210-
#if NETCOREAPP
210+
#if NET6_0_OR_GREATER
211211
if (parameters.AuthenticationMethod != SqlAuthenticationMethod.ActiveDirectoryDeviceCodeFlow)
212212
{
213213
redirectUri = "http://localhost";
@@ -361,7 +361,7 @@ private static async Task<AuthenticationResult> AcquireTokenInteractiveDeviceFlo
361361
if (authenticationMethod == SqlAuthenticationMethod.ActiveDirectoryInteractive)
362362
{
363363
CancellationTokenSource ctsInteractive = new CancellationTokenSource();
364-
#if NETCOREAPP
364+
#if NET6_0_OR_GREATER
365365
/*
366366
* On .NET Core, MSAL will start the system browser as a separate process. MSAL does not have control over this browser,
367367
* but once the user finishes authentication, the web page is redirected in such a way that MSAL can intercept the Uri.
@@ -492,8 +492,6 @@ private IPublicClientApplication CreateClientAppInstance(PublicClientAppKey publ
492492
.WithParentActivityOrWindow(_iWin32WindowFunc)
493493
.Build();
494494
}
495-
#endif
496-
#if !NETCOREAPP
497495
else
498496
#endif
499497
{

src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/LocalAppContextSwitches.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ private enum Tristate : byte
2626
private static Tristate s_makeReadAsyncBlocking;
2727
private static Tristate s_useMinimumLoginTimeout;
2828

29-
#if !NETFRAMEWORK
29+
#if NET6_0_OR_GREATER
3030
static LocalAppContextSwitches()
3131
{
3232
IAppContextSwitchOverridesSection appContextSwitch = AppConfigManager.FetchConfigurationSection<AppContextSwitchOverridesSection>(AppContextSwitchOverridesSection.Name);

src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/Reliability/SqlConfigurableRetryLogicLoader.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ public SqlConfigurableRetryLogicLoader(ISqlConfigurableRetryConnectionSection co
4343
string cnnSectionName = SqlConfigurableRetryConnectionSection.Name,
4444
string cmdSectionName = SqlConfigurableRetryCommandSection.Name)
4545
{
46-
#if !NETFRAMEWORK
46+
#if NET6_0_OR_GREATER
4747
// Just only one subscription to this event is required.
4848
// This class isn't supposed to be called more than one time;
4949
// SqlConfigurableRetryLogicManager manages a single instance of this class.

src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/SSPI/ManagedSSPIContextProvider.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#if !NETFRAMEWORK && !NET7_0_OR_GREATER
1+
#if NET6_0
22

33
using System;
44
using Microsoft.Data.SqlClient.SNI;

src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/SSPI/NegotiateSSPIContextProvider.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#if NET7_0_OR_GREATER
1+
#if NET8_0_OR_GREATER
22

33
using System;
44
using System.Text;

0 commit comments

Comments
 (0)