Preview Release v7.1.0-preview2
Pre-releaseThis update brings the following changes since the 7.1.0-preview1 release.
Package version alignment: The
Microsoft.Data.SqlClientdriver and its companion packages continue the aligned versioning introduced in 7.0.2. All five packages listed below ship together as7.1.0-preview2. (Microsoft.SqlServer.Servercontinues to version independently and remains at1.0.0.) Applications that referenceMicrosoft.Data.SqlClient.Extensions.Azuremust upgrade it to7.1.0-preview2when upgradingMicrosoft.Data.SqlClient.
Compatibility guarantee: All aligned assemblies ship with
FileVersion 7.1.0.xandAssemblyVersion 7.0.0.0— unchanged from 7.0.2 — so upgrading from7.0.2to7.1.0-preview2does not require any new .NET Framework strong-name binding redirects.
Packages in this release
Microsoft.Data.SqlClient 7.1.0-preview2
Added
SqlConnection.GetSchemaAsyncoverloads withCancellationTokensupport (#3005)- SQL Graph pseudo-column aliases (
$node_id,$edge_id,$from_id,$to_id) accepted inSqlBulkCopymappings (#3677) SqlBatchCommand.CommandBehaviorandSqlBatch.ExecuteReader(CommandBehavior)are now honored (#4125)- Configurable idle connection timeout via
Connection Idle Timeout/SqlConnectionStringBuilder.IdleTimeout(opt-in viaSwitch.Microsoft.Data.SqlClient.UseLegacyIdleTimeoutBehavior=false) (#4295)
Changed
Connect Timeoutnow propagates through the pool whenSwitch.Microsoft.Data.SqlClient.UseOverallConnectTimeoutForPoolWait=trueis set (default off; introduces aMicrosoft.Bcl.TimeProviderdependency) (#4270)- SQL Server 2025
jsontype added to theDataTypescollection returned bySqlConnection.GetSchema(#3858) - Internal state-machine hardening via
Interlocked.CompareExchangeguards (#4267) - Internal cleanup of connection-options inheritance and related pool interfaces (#4237, #4261, #4235, #4415, #4334)
- LCID hardcoded mappings to avoid repeated culture lookups (#4212)
- Allocation reductions on
SqlErrorCollectionand null-return paths (#4157, #4099, #4102) - Improved
EnclaveDiffieHellmanInfo.Sizeaccuracy (#4346) SqlVector<float>serialization is now explicitly little-endian for cross-architecture consistency (#3861)- Bundled .NET 10 SDK updated to
10.0.300(#4287)
Fixed
NullReferenceExceptioninSqlCommand.Cancel()when the connection has already been torn down (#4372)- Always Encrypted CMK signature verification incorrectly reusing cached results after a prior failure (#4339)
- Missing TDS token / feature-ack length bounds checks (spoofing server could trigger unbounded allocations) (#4340)
SqlBulkCopyfailing in least-privilege environments (#4306)- Always Encrypted
CekMdVersion/EkValueCountreads aligned with the TDS specification (#4240) LoginWithFailoverparser-state validation (#4140)- SPN during login now uses the resolved port instead of instance name for
Protocol=None/Protocol=Admin(#4180) - Race in
SqlConnection.TryOpenInnerthat could surface asInvalidCastExceptionnow returns a deterministicInvalidOperationException(#4179) - Multiple
CancellationTokenSourceleaks inSqlDataReader,SqlConnection,SqlCommandreconnect paths, and sequential-stream helpers (#4009) - Docs fix for server certificate configuration (#4408)
Removed (breaking)
- SQL Server 7.0 / 2000 code paths removed;
Type System Version=SQL Server 2000now throwsArgumentExceptionat open. Applications should switch toLatest(or another supported value). No change to server-version support — 7.0 / 2000 were already rejected during login version negotiation. (#4015)
Full details: release-notes/7.1/7.1.0-preview2.md
Microsoft.Data.SqlClient.Extensions.Azure 7.1.0-preview2
Added — WAM (Windows Account Manager) broker support for Entra ID authentication (Windows only) (#4288, #4388)
- Covers
ActiveDirectoryIntegrated,ActiveDirectoryInteractive,ActiveDirectoryDeviceCodeFlow, and the deprecatedActiveDirectoryPasswordmodes. - New
ActiveDirectoryAuthenticationProviderOptionstype (UseWamBroker,ApplicationClientId,DeviceCodeFlowCallback) and a newActiveDirectoryAuthenticationProvider(ActiveDirectoryAuthenticationProviderOptions)constructor overload. - New cross-platform
SetParentActivityOrWindowFunc(Func<object>?)(supersedes the .NET-Framework-onlySetIWin32WindowFunc). - New
useWamBrokerattribute on the<SqlClientAuthenticationProviders>configuration section. - Device Code Flow now uses its own token-lifetime timeout instead of inheriting
Connect Timeout, fixing spurious "The operation was canceled." failures when users take longer to enter the code. - WAM is enabled by default when the driver's built-in client id is used; opt-in via
UseWamBroker/ the config attribute when a custom client id is supplied. Non-Windows platforms never invoke the broker. - Footprint note: WAM materially increases the on-disk footprint of
Microsoft.Data.SqlClient.Extensions.Azurebecause it pulls inMicrosoft.Identity.Client.Brokerand its native OS-broker components. Tracking: #4410. - Sample: new
AzureSqlConnectorapp under doc/apps/AzureSqlConnector.
Changed
- Dependencies: added
Microsoft.Identity.Client.Broker4.84.2; updatedMicrosoft.Identity.Clientto 4.84.2.
Full details: release-notes/Extensions/Azure/7.1/7.1.0-preview2.md
Microsoft.Data.SqlClient.AlwaysEncrypted.AzureKeyVaultProvider 7.1.0-preview2
- No functional or API changes; aligned version bump only.
Full details: release-notes/add-ons/AzureKeyVaultProvider/7.1/7.1.0-preview2.md
Microsoft.Data.SqlClient.Extensions.Abstractions 7.1.0-preview2
- No functional or API changes; aligned version bump only.
Full details: release-notes/Extensions/Abstractions/7.1/7.1.0-preview2.md
Microsoft.Data.SqlClient.Internal.Logging 7.1.0-preview2
- Internal-use-only package. No functional or API changes; aligned version bump only.
Full details: release-notes/Internal/Logging/7.1/7.1.0-preview2.md
Target Platforms
- .NET Framework 4.6.2+ (Windows x86, x64, ARM64)
- .NET 8.0+ (Windows x86, x64, ARM, ARM64; Linux; macOS)
Per-TFM dependency lists are in the linked release-notes files above.
Contributors
A huge thank you to our community contributors for this release:
- @edwardneal —
SqlConnection.GetSchemaAsync(#3005), SQL Graph column aliases (#3677), least-privilegeSqlBulkCopy(#4306), Always Encrypted TDS alignment (#4240), LCID mapping (#4212),SqlVectorlittle-endian (#3861),DataTypes+jsontype (#3858), test reliability (#4262, #4305) - @SimonCropp — SQL Server 7.0 / 2000 removal (#4015),
CancellationTokenSourcecleanup (#4009), error/warning fast path (#4157), additional code-health (#4099, #4102, #4158) - @campersau —
SqlBatchCommand.CommandBehavior(#4125) - @jnyrup —
EnclaveDiffieHellmanInfo.Size(#4346) - @shreyarao4 — Kerberos SSPI +
SequentialAccesstest fixes (#4146, #4224)