Repository navigation
Preview Release v8.0.0-preview1
Pre-releaseThis first 8.0 preview includes changes since the release/7.1 branch point, 92f220956b07328054701a869f452cade51830c1 (2026-09-15), through b87ca6e7643611ddc3273324de346d09e8ff2c43. Changes already shipped in 7.1.1 are identified below because the branch-cut baseline predates that release.
The driver and its four companion packages use package version 8.0.0-preview1. The family AssemblyVersion changes from 7.0.0.0 to 8.0.0.0; .NET Framework applications should review strong-name binding redirects when upgrading. Native SNI and Microsoft.SqlServer.Server remain independently versioned.
Companion package release notes
- Microsoft.Data.SqlClient.AlwaysEncrypted.AzureKeyVaultProvider 8.0.0-preview1
- Microsoft.Data.SqlClient.Extensions.Azure 8.0.0-preview1
- Microsoft.Data.SqlClient.Extensions.Abstractions 8.0.0-preview1
- Microsoft.Data.SqlClient.Internal.Logging 8.0.0-preview1
Added
Vector float16 support and per-connection version negotiation
What Changed:
- Added support for SQL Server
vector(N, float16), including reader values, parameters, output parameters, column schema, and bulk copy. On modern .NET, useSqlVector<Half>; the existingSqlVector<float>API remains supported. (#4501) - Added the
Vector Type Supportconnection-string keyword andSqlConnectionStringBuilder.VectorTypeSupport, of typeSqlVectorTypeSupport. Values areOff,V1, andV2; the default isV2.
Who Benefits:
- Applications storing embeddings can use float16 vectors with smaller element payloads, while choosing the result-type contract independently for each connection.
Impact:
- Result-type change: when the server negotiates V2, modern .NET returns native
SqlVector<Half>values for float16 columns instead of JSON strings. SetVector Type Support=v1to preserve float16 JSON-string results, oroffto receive all vector columns as text. Different settings use separate connection pools. - .NET Framework has no
System.Half. Float16 columns remain available as JSON strings or throughGetSqlVector<float>, which widens their elements exactly. Prefer the latter when reading many values, to avoid the additional JSON serialization. GetColumnSchema()exposesVectorBaseTypeandVectorDimensionsthrough the column indexer when native vector metadata is negotiated.- SQL Server performs cross-base conversion for native vector parameters and bulk-copy inputs. Typed vectors are not automatically serialized for text destinations; supply JSON strings or an explicit SQL cast instead. Vector TVPs are not added by this change.
- Float16 requires a server that supports it; enable
PREVIEW_FEATURESwhile the server feature is in preview. See the float16 sample.
var builder = new SqlConnectionStringBuilder(connectionString)
{
VectorTypeSupport = SqlVectorTypeSupport.V1
};Opt-in reset of pooled transaction isolation levels
What Changed:
- Added
Switch.Microsoft.Data.SqlClient.EnableTransactionIsolationLevelReset, defaultfalse. When enabled, a SqlClient-tracked isolation-level change is reset toREAD COMMITTEDbefore pooled reuse when no existing enlistment or active delegated transaction root remains. (#96, #4330)
Who Benefits:
- Applications that otherwise inherit an isolation level left by a previous user of a pooled connection.
Impact:
- Enable the switch before opening connections. A necessary reset adds a round trip and uses the remaining open-timeout budget. Known Azure Synapse dedicated SQL pool endpoints are excluded; the default preserves existing behavior.
- A user-issued
SET TRANSACTION ISOLATION LEVELalone does not mark the connection for this reset. The switch is not general cleanup for arbitrary T-SQL session changes.
Additional TimeOnly write paths (net10.0 only)
What Changed:
- Added
TimeOnlysupport forSqlBulkCopyDataRow/DataTable sources andSqlParametervalues withSqlDbType.Variant, writing SQLtimevalues. (#4604)
Who Benefits:
- Applications using modern .NET time-only values in bulk-copy and variant workflows.
Impact:
- These paths no longer require conversion to
TimeSpan. This does not addTimeOnlyto .NET Framework.
Authentication diagnostics
What Changed:
- The Azure extension forwards MSAL, allowlisted Azure.Identity, and SqlClient token acquisition events to
Microsoft.Data.SqlClient.EventSourceusing the newAuthenticationTracekeyword (0x2000). (#1846, #4872)
Who Benefits:
- Support teams can diagnose built-in Entra ID authentication without implementing a custom provider or logging callback.
Impact:
-
Collect authentication events with
0x2000, or authentication plus ordinary trace with0x2002. On modern .NET:dotnet-trace collect --process-id <pid> --providers Microsoft.Data.SqlClient.EventSource:0x2000:5 --rundown false -
On .NET Framework, use ETW or an in-process
EventListener. PII logging remains disabled for extension-owned requests. Correlation is best effort; some Azure.Identity events have an empty connection ID and can originate from application-owned credentials. Treat captures as sensitive operational data. -
See the Azure extension notes for limitations and the logging sample.
Changed
Breaking change: minimum modern runtime is .NET 10
What Changed:
- Replaced the
net8.0andnet9.0driver implementation targets withnet10.0. .NET Framework 4.6.2 support is retained. (#4779)
Who Benefits:
- Applications moving to the .NET 10 runtime and dependency servicing band.
Impact:
- Upgrade modern applications to .NET 10, or remain on a compatible earlier driver. Retained
netstandard2.0reference/unsupported-platform assets do not extend driver runtime support to .NET 8 or .NET 9.
Breaking change: TCP MultiSubnetFailover is enabled by default
What Changed:
- When omitted from the connection string,
MultiSubnetFailovernow defaults totruefor TCP connections.TransparentNetworkIPResolutiondefaults tofalseon .NET Framework. (#4876, #4927)
Who Benefits:
- Applications connecting to multi-address hosts try resolved IP addresses in parallel, without needing an explicit opt-in.
Impact:
- Explicit values remain authoritative. The automatic default is disabled for non-TCP protocols, LocalDB, database mirroring partners,
admin:/via:, and unprefixed local servers using native SNI. Explicittruestill fails with unsupported protocols or failover partners. MSF retains its 64-address limit. - With native SNI on Windows, an unprefixed remote host now uses TCP only, without Named Pipes fallback. Use
np:orMultiSubnetFailover=falsewhen needed. - With MSF enabled,
IPAddressPreferenceand TNIR are ignored. The builder reports the keyword default, not the routing decision for a particular connection. - Restore the old MSF default with
Switch.Microsoft.Data.SqlClient.EnableMultiSubnetFailoverByDefault=false. On .NET Framework, also setSwitch.Microsoft.Data.SqlClient.DisableTNIRByDefaultInConnectionString=falseto restore the previous TNIR default. Set switches before using SqlClient. See networking migration guidance.
Breaking change: Azure Attestation requires the Azure extension
What Changed:
- Moved Azure Attestation token validation and the IdentityModel dependencies from the core driver to
Microsoft.Data.SqlClient.Extensions.Azure. (#4017, #4790)
Who Benefits:
- Applications not using Azure Attestation no longer receive these dependencies from core.
Impact:
- Applications using
Attestation Protocol=AASmust explicitly reference the matching Azure extension. Without it, enclave session setup throwsInvalidOperationException. - The Azure extension now depends on Azure.Core rather than Azure.Identity. Credential namespaces are unchanged. Remove direct Azure.Identity references older than 1.21.0, or upgrade to 1.21.0 or later; Azure.Identity.Broker users need 1.6.0 or later. (#4749)
Breaking changes: reference API and argument validation corrections
What Changed:
- Reference APIs now match implementation accessibility and sealing, and no longer expose the nonexistent
SqlBatchCommand.CanCreateParametersetter on .NET Framework. (#4832, #4890) SqlParameterCollection.RemoveAt(int)throwsArgumentOutOfRangeException, rather thanIndexOutOfRangeException, for an invalid index; indexer behavior is unchanged. (#4874)- Character-type
SqlMetaDataconstruction in globalization-invariant mode requires an overload with an explicit LCID (net10.0 only). (#4457)
Who Benefits:
- Consumers get accurate compile-time API contracts and explicit argument validation.
Impact:
- Correct code that instantiated inaccessible types, derived from sealed data-classification types, or assigned the nonexistent setter. Update exception handling for
RemoveAt(int). - Use a constructor with
localeorlocaleIdfor character metadata in invariant mode; this does not add general globalization-invariant connection support.
Package layout and family-version validation
- Managed driver implementations now reside in
lib/net462andlib/net10.0, without duplicated RID-specific managed DLLs. Update custom scripts copying fromruntimes/<rid>/lib/<tfm>/Microsoft.Data.SqlClient.dll. Native SNI remains separate. (#4673) - Consumer builds emit warning
SQLCLIENT001for mismatched installed family package versions, including preview suffixes. Use matching driver and companion versions. Native SNI andMicrosoft.SqlServer.Serverare excluded; settingSqlClientEnforceFamilyVersions=falsedisables the check. (#4815) - Corrected Source Link mappings and package source coverage. This branch-cut delta was also backported to 7.1; it is not unique to 8.0. (#4710)
Windows connection pool identity isolation (Windows only)
- Pool identity includes the Windows logon session, separating network-only impersonation sessions even when their local SID is identical. Reusing tokens from the same logon session preserves reuse; distinct sessions can increase pool counts. (#4814)
- See connection pooling and impersonation.
Trimming and authentication configuration
-
Authentication registration/bootstrap now lives in Abstractions, allowing
SqlAuthenticationProvider.GetProvider/SetProviderto use the shared registry without loading the driver through reflection.SqlAuthenticationInitializeralso lives in Abstractions, with a type forward preserving existing references. Abstractions adds a trim/AOT-analyzednet10.0asset. (#4821) -
Switch.Microsoft.Data.SqlClient.EnableAppConfigcontrols authentication configuration on both .NET Framework and modern .NET. The driver's separate retry-configuration and switch-override readers use this switch on modern .NET only; they remain unchanged on .NET Framework. (#4697, #4821) -
Added
Switch.Microsoft.Data.SqlClient.EnableAzureExtensionDiscoveryfor reflective authentication-provider discovery. Both authentication switches default totrueand cache their first value. Explicit provider registration remains available when discovery is disabled. Authentication discovery does not control the driver's separate Azure Attestation loader. -
For explicit registration in trimmed/Native AOT applications, disable both reflective paths at publish time, then explicitly construct/register a provider for every required method before opening connections. Runtime switch values alone cannot remove code during publication.
<ItemGroup> <RuntimeHostConfigurationOption Include="Switch.Microsoft.Data.SqlClient.EnableAppConfig" Value="false" Trim="true" /> <RuntimeHostConfigurationOption Include="Switch.Microsoft.Data.SqlClient.EnableAzureExtensionDiscovery" Value="false" Trim="true" /> </ItemGroup>
-
Trimmed JIT applications can retain enabled reflective paths if they preserve the configuration infrastructure, handlers, provider/initializer constructors, and Azure discovery contracts. Enabling a switch does not root these members. Enabled paths report trimming warnings and, for Native AOT, dynamic-code warnings.
-
Source-generated JSON serialization replaces reflection-based calls for vector conversions and enclave attestation, including the asynchronous HGS request path, reducing trimming and dynamic-code warnings (net10.0 only). JSON representations remain unchanged. (#4683, #4801)
-
Reduced trimming/AOT warnings in diagnostics, schema metadata, server discovery, and native interop (net10.0 only). These are incremental improvements, not complete Native AOT support. (#4684, #4688, #4703)
-
Authentication section handlers are public in Abstractions; existing driver-qualified app.config declarations remain supported. Configured providers/initializers take precedence over application registrations, which take precedence over Azure defaults. Failed explicit configuration does not silently select an earlier/default provider; failures are traced, and explicit successful application registration can recover a failed method. Check
SetProvider's return value and trace diagnostics when registering. (#4816, #4860, #4821)
Performance and sync/async pathways
- Reduced allocations in Always Encrypted key handling and cache contention for parallel encryption-key lookups. Calls to key-store providers to decrypt column encryption keys remain serialized. (#4256)
- Converted asynchronous
SqlBulkCopysetup, including metadata retrieval and connection recovery, to native async/await. The per-row asynchronous copy loop is unchanged. (#4687) - Added asynchronous enclave-provider and delegate operations, including awaited attestation HTTP requests and retry delays. This is groundwork, not end-to-end nonblocking Always Encrypted command execution: the new operations are not yet wired into the command execution path, and driver key-store resolution remains synchronous for both sync and async commands. (#4541, #4886)
Other changes
- The user-agent Driver Properties mask now reports configured
UseCompatibilityAsyncBehaviourandUseCompatibilityProcessSnivalues through bits0x2and0x4, respectively. These report configuration before compatibility overrides, not effective behavior; async defaults are unchanged. (#4911) - Added diagnostics for database-context mismatches after transparent reconnection, without changing recovery behavior. (#4130)
- Documentation now explains complete reader consumption for
InfoMessagedelivery and trailing errors.Read()/ReadAsync()ending a result does not establish batch success: with default behavior, advance throughNextResult()/NextResultAsync()untilfalse, including after empty results. Cleanup still suppresses pending nonfatal errors;SingleRowandSingleResultretain their discard semantics. Reader runtime behavior is unchanged. (#4723, #4729) - Clarified
Prepareincompatibility with optimized parameter binding andSqlBatchcommand-behavior exceptions. (#4726, #4878) - Updated shipping dependencies, including the cryptography servicing fixes. Concrete direct dependency floors are listed below and in the companion notes. (#4848, #4880)
- Updated
Microsoft.Data.SqlClient.SNIandMicrosoft.Data.SqlClient.SNI.runtimefrom 7.1.0 to 8.0.0-preview1.26309.4 (Windows native SNI only). (#5011)
Fixed
- Malformed PRELOGIN option headers, offsets, lengths, and response sizes now produce a parsing error (
InvalidOperationException) duringOpen/OpenAsync, rather than incidentalIndexOutOfRangeExceptionfailures. (#4902) - Responses missing required row metadata or authentication state now produce a corrupted-stream parsing error and invalidate the connection, rather than causing null-reference failures or falling back to unrelated result metadata. The parsing error is an
InvalidOperationException, not aSqlException. (#4941) - Managed SNI honors an explicit
HostNameInCertificateas the sole expected certificate hostname, rather than accepting a match only to the destination (net10.0, managed SNI only). Certificate-chain andServerCertificatechecks are unchanged. (#4905) - Fixed managed-SNI parallel TCP connection attempts failing when one address errors immediately despite another reachable address; unused sockets are disposed (net10.0, managed SNI only). (#4929)
- Fixed the managed-SNI MARS receive teardown race that could leave an unobserved callback exception during disposal (net10.0, managed SNI only). (#4680)
- Fixed
HasRowsreturningfalsewhen multiple informational messages precede rows. (#4773) - Fixed XML streaming failures for fragments beginning with text by explicitly selecting UTF-16LE when creating the XML reader. (#4757)
- Fixed corrupted
nvarchartext fromGetTextReader()withSequentialAccesson big-endian platforms; little-endian behavior is unchanged (big-endian only). (#4945) - Fixed
SqlBulkCopylosingmoney/smallmoneytype identity insql_variantvalues. (#4727) - Fixed configurable retry logic retrying a command outside its original transaction after the error aborted that transaction. (#4728)
- Reassert non-
ReadCommittedisolation levels when pooled connections reattach to the same ambient transaction with a pending reset. This unconditional correctness fix can add a round trip and is separate from the opt-in reset switch. (#4335) - Prevent V1/V2 pool pruning from retiring pools with in-flight acquisition, physical creation, or background replenishment, preserving transaction-affine reuse and avoiding unintended transaction promotion. Explicit clear/shutdown semantics are unchanged. (#4755, #4754)
- Isolate cached enclave sessions by attestation protocol, server, database, and URL. (#4829)
- Retry providers load/resolve in SqlClient's current
AssemblyLoadContext, rather than the default context (net10.0 only). Collectible contexts using managed SNI can unload; this does not promise native-SNI unloadability. (#4588) - Prevent eager native SNI initialization on non-Windows platforms (net10.0 on Linux/macOS). (#4700)
- Fixed the nullable statistics execution-timer race and active soft-connection counter drift when the default wait-handle pool reclaims abandoned connections. Concurrent use of a connection is still unsupported. (#4875, #4725)
- Formatter-based
SqlExceptionserialization preservesErrorsand derived error properties such asNumber, addressing .NET Framework remoting scenarios. Formatter serialization remains obsolete on modern .NET; this is not guidance to useBinaryFormatteror deserialize untrusted data. (#1940, #4622) - Restored
SqlParameterCollection.Add(string, object)and exposedMicrosoft.Data.SqlClient.Server.TriggerActionin the reference assembly (net462 only). The former remains obsolete; preferAddWithValueor explicitly typed parameters. (#4832) - Windows WAM missing-parent-window errors now explain alternatives for windowless hosts, preserving the MSAL error code and inner exception (Windows only, Azure extension). (#4858)
Included in the branch-cut delta, already shipped in 7.1.1
- Fixed zero-valued decimal parameters with equal precision and scale. (#4721)
- Fixed expired/nearly expired access-token eviction in opt-in connection pool V2. (#4734)
- Preserve admitted in-flight opens during pool clearing, discarding connections returned to the retired pool. (#4718)
These are retained because the requested baseline predates 7.1.1; they are not new fixes for applications already using that release.
Removed
Breaking change: SQL Server 2005 compatibility
What Changed:
- Removed SQL Server 2005 connectivity and
Type System Version=SQL Server 2005, including its date/time-as-string and large-UDT-as-binary compatibility projections. (#4881)
Impact:
- SQL Server 2005 connections are rejected. Remove that type-system setting and update code that depended on its projections to consume current date/time and UDT representations.
Contributors
We thank the following public contributors for their contributions to this release:
Target Platform Support
- .NET Framework 4.6.2+ on Windows.
- .NET 10.0+ on Windows, Linux, and macOS.
netstandard2.0assets are for reference/unsupported-platform scenarios only.
Dependencies
The following table lists direct dependency floors. Driver-family packages use 8.0.0-preview1; the independently versioned Microsoft.SqlServer.Server dependency is 1.0.0. SNI uses the range [8.0.0-preview1.26309.4, 9.0.0).
| Dependency | net462 | net10.0 | netstandard2.0 |
|---|---|---|---|
| Microsoft.Bcl.Cryptography | 10.0.13 | 10.0.13 | 10.0.13 |
| Microsoft.Bcl.TimeProvider | 10.0.13 | - | 10.0.13 |
| Microsoft.Data.SqlClient.Extensions.Abstractions | 8.0.0-preview1 | 8.0.0-preview1 | 8.0.0-preview1 |
| Microsoft.Data.SqlClient.Internal.Logging | 8.0.0-preview1 | 8.0.0-preview1 | 8.0.0-preview1 |
| Microsoft.Data.SqlClient.SNI | 8.0.0-preview1.26309.4 | - | - |
| Microsoft.Data.SqlClient.SNI.runtime | - | 8.0.0-preview1.26309.4 | 8.0.0-preview1.26309.4 |
| Microsoft.Extensions.Caching.Memory | 10.0.13 | 10.0.13 | 10.0.13 |
| Microsoft.SqlServer.Server | - | 1.0.0 | 1.0.0 |
| System.Buffers | 4.6.1 | - | - |
| System.Configuration.ConfigurationManager | - | 10.0.13 | 10.0.13 |
| System.Data.Common | 4.3.0 | - | - |
| System.Diagnostics.DiagnosticSource | 10.0.13 | - | - |
| System.Memory | 4.6.3 | - | - |
| System.Runtime.InteropServices.RuntimeInformation | 4.3.0 | - | - |
| System.Security.Cryptography.Pkcs | 10.0.13 | 10.0.13 | 10.0.13 |
| System.Text.Json | 10.0.13 | - | 10.0.13 |
| System.Threading.Channels | 10.0.13 | - | 10.0.13 |
| System.Threading.RateLimiting | 10.0.13 | 10.0.13 | 10.0.13 |
| System.ValueTuple | 4.6.2 | - | - |