Skip to content

Bump Microsoft.Data.SqlClient and Microsoft.SqlServer.DacFx - #62

Open
dependabot[bot] wants to merge 1 commit into
developfrom
dependabot/nuget/src/PsDac/develop/multi-7671299e55
Open

dependabot[bot] wants to merge 1 commit into
developfrom
dependabot/nuget/src/PsDac/develop/multi-7671299e55

Conversation

@dependabot

@dependabot dependabot Bot commented on behalf of github Nov 25, 2026

Copy link
Copy Markdown
Contributor

Updated Microsoft.Data.SqlClient from 5.2.3 to 6.1.8.

Release notes

Sourced from Microsoft.Data.SqlClient's releases.

6.1.8

This update brings the following changes since the 6.1.7 release:

Changed

  • Updated the System.Security.Cryptography.Pkcs dependency to 8.0.2 (was 8.0.1) for .NET Framework 4.6.2, .NET 8.0, and .NET Standard 2.0, and updated the Microsoft.Extensions.Caching.Memory, System.Configuration.ConfigurationManager, and System.Security.Cryptography.Pkcs dependencies to 9.0.21 (was 9.0.11) for .NET 9.0.
    (#​4842, #​4862, #​4870)

  • Improved the error reported when Active Directory Interactive authentication through the Windows Web Account Manager (WAM) broker fails because the host has no parent window, such as a service or Azure Functions host. The resulting error now explains the supported alternatives: supply a parent window with SetParentActivityOrWindowFunc, use Active Directory Default with a configured non-interactive credential, or supply a custom ApplicationClientId with UseWamBroker disabled. The original MSAL error code and inner exception are preserved, and authentication selection, retry behavior, and other failures are unchanged. (Windows only)
    (#​4854, #​4858, #​4918)

Fixed

  • Fixed the managed SNI path ignoring HostNameInCertificate during server certificate validation. When HostNameInCertificate is set, it is now the only host name the server certificate is validated against, and certificates that do not match it are rejected. Default host-name selection when the property is not set, certificate chain validation, ServerCertificate matching, and the connection destination are unchanged. (net8.0/net9.0 only)
    (#​4905, #​4909)

  • Fixed Always Encrypted enclave session caching so that cached enclave sessions are isolated by attestation protocol. A session established with one Attestation Protocol setting is no longer reused by a connection to the same server, database, and attestation URL that uses a different protocol.
    (#​4829, #​4868)

  • Fixed SqlDataReader.HasRows returning false when a result set contains rows but the server sends multiple informational messages, or an informational message before an ORDER token, ahead of the first row. Empty results still report false, and InfoMessage delivery is unchanged.
    (#​3018, #​4773, #​4898)

  • Fixed an intermittent InvalidOperationException ("Nullable object must have a value") from statistics bookkeeping when commands complete concurrently on a MARS connection. This issue was reported as a regression starting with 6.1.4.
    (#​4778, #​4875, #​4896)

  • Fixed Entra ID authentication when the server supplies an authority URL with an OAuth endpoint suffix, such as https://login.microsoftonline.com/<tenant>/oauth2/authorize returned by the Dataverse/Dynamics 365 TDS endpoint. The provider now extracts the tenant from the first path segment and uses the normalized authority for Azure.Identity credentials, MSAL, and their cache keys. An authority URL that cannot be parsed now fails with a clear, localized ArgumentException naming the authority. Bare tenant authority URLs used by Azure SQL and Fabric retain their existing behavior.
    (#​4496, #​4521, #​4791, #​4807)

Target Platform Support

  • .NET Framework 4.6.2+ (Windows x86, Windows x64, Windows ARM64)
  • .NET 8.0+ (Windows x86, Windows x64, Windows ARM64, Linux, macOS)
  • .NET Standard 2.0+ (Windows x86, Windows x64, Windows ARM64, Linux, macOS)

Full details: release-notes/6.1/6.1.8.md

6.1.7

This update brings the following changes since the 6.1.6 release:

Changed

  • Updated the Microsoft.Data.SqlClient.SNI and Microsoft.Data.SqlClient.SNI.runtime dependencies to 6.0.3 (was 6.0.2).
    (#​4598)

Fixed

  • Fixed ServerCertificate validation on the managed SNI path so the configured certificate is compared against the server certificate even when the server certificate passes chain and host-name validation. When certificate validation is enabled, a missing, unreadable, or invalid certificate file, a certificate mismatch, or a missing server certificate now causes the TLS handshake to fail instead of bypassing the configured certificate check. (net8.0/net9.0 only)
    (#​4445, #​4584)

  • Fixed Always Encrypted VSM/HGS enclave attestation to verify that the enclave public key used to establish a session matches the key committed to by the signed attestation report. Missing, malformed, or mismatched key-binding data now causes attestation to fail before the session secret is derived.
    (#​4532, #​4552)

  • Fixed SqlConnection.AccessTokenCallback not disabling Transparent Network IP Resolution by default, making it consistent with SqlConnection.AccessToken. An explicitly configured TransparentNetworkIPResolution connection-string value still takes precedence. (net462 only)
    (#​4520, #​4560)

  • Fixed token authentication state handling so clearing SqlConnection.AccessToken preserves an existing AccessTokenCallback in the connection pool key, and clearing AccessTokenCallback preserves an existing AccessToken. Callback-based authentication now also follows the same prelogin server-certificate validation rules as an explicitly supplied access token.
    (#​4520, #​4560)

  • Fixed configurable retry logic installing a permanent, process-wide assembly-resolution handler that could interfere with unrelated assembly loading. The handler is now active only while an explicitly configured custom retry provider is resolved and constructed, and probes AppContext.BaseDirectory instead of the current working directory. Place custom retry assemblies in the application base directory; dependencies loaded after provider construction must be resolvable through normal application dependency resolution or an application-provided handler. (net8.0/net9.0 only)
    (#​2214, #​4547, #​4664)

Target Platform Support

  • .NET Framework 4.6.2+ (Windows x86, Windows x64, Windows ARM64)
  • .NET 8.0+ (Windows x86, Windows x64, Windows ARM64, Linux, macOS)
  • .NET Standard 2.0+ (Windows x86, Windows x64, Windows ARM64, Linux, macOS)

Full details: release-notes/6.1/6.1.7.md

6.1.6

This update brings the following changes since the 6.1.5 release:

Added

WAM broker support for the supported Entra ID authentication modes (Windows only)

What Changed:

  • Added support for the Web Account Manager (WAM) broker for the supported Microsoft Entra ID authentication modes. A new ActiveDirectoryAuthenticationProviderOptions options bag and a corresponding ActiveDirectoryAuthenticationProvider(ActiveDirectoryAuthenticationProviderOptions options) constructor were introduced, exposing a UseWamBroker property (alongside ApplicationClientId and DeviceCodeFlowCallback).
    (#​4288, #​4387)
  • Added a cross-platform SetParentActivityOrWindowFunc(Func<object> parentActivityOrWindowFunc) method so callers can supply a parent window handle on Windows or a parent Activity/UIViewController on Android/iOS/MAUI.

Who Benefits:

  • Applications using ActiveDirectoryInteractive and other supported Entra ID authentication modes on Windows benefit from the WAM broker's improved security (tokens are brokered by the OS), single sign-on with the logged-in Windows account, and support for Conditional Access and Windows Hello.

Impact:

  • When you supply your ApplicationClientId, WAM is opt-in via ActiveDirectoryAuthenticationProviderOptions.UseWamBroker. Consider enabling it when you want OS-brokered tokens, single sign-on with the signed-in Windows account, Windows Hello, and Conditional Access support.
  • UseWamBroker is a Windows-only setting and has no effect on non-Windows platforms, where interactive Entra ID flows always use the system browser.
  • Prefer the new options-bag constructor over the positional-argument overloads in new code.
var options = new ActiveDirectoryAuthenticationProviderOptions
{
    ApplicationClientId = "<your-app-client-id>",
    // Enable WAM (Windows only) for OS-brokered tokens, SSO, Windows Hello, and Conditional Access.
    UseWamBroker = true,
};
var provider = new ActiveDirectoryAuthenticationProvider(options);
// Supply the parent window/activity that owns the interactive sign-in prompt.
provider.SetParentActivityOrWindowFunc(() => parentWindowHandle);
SqlAuthenticationProvider.SetProvider(SqlAuthenticationMethod.ActiveDirectoryInteractive, provider);

Changed

Hardened TDS token parsing with data-length bounds checks

What Changed:

  • Added bounds checking when parsing TDS token data lengths. The parser now validates the declared length of incoming token data against the available buffer before reading, rejecting malformed or out-of-range length values instead of reading past the intended boundary.
    (#​4340, #​4359)

Who Benefits:

  • All consumers benefit from improved resilience against malformed or hostile TDS responses. A server (or man-in-the-middle) sending an invalid token length can no longer drive the parser to read beyond the declared payload.

Impact:
... (truncated)

6.1.5

This update brings the following changes since the 6.1.4 release:

Fixed

  • Fixed a connection performance regression where SPN (Service Principal Name) generation was triggered for non-integrated authentication modes (e.g., SQL authentication) on the native SNI path, causing unnecessary DNS lookups and significantly slower connection times. Only affects .NET on Windows (not .NET Framework). (#​3523, #​3946)
  • Fixed ExecuteScalar to properly propagate errors when the server sends data followed by an error token. Previously, errors such as conversion failures during WHERE clause evaluation were silently consumed during SqlDataReader.Close() instead of being thrown to the caller, which could result in transactions being unexpectedly zombied. (#​3736, #​3947)
  • Fixed SqlDataReader.GetFieldType and SqlDataReader.GetProviderSpecificFieldType to return the correct type (SqlVector<float>) for vector float32 columns. Previously, these methods did not follow the same type-resolution logic as GetValue, returning an incorrect type for vector columns. (#​4104, #​4151)

Target Platform Support

  • .NET Framework 4.6.2+ (Windows x86, Windows x64, Windows ARM64)
  • .NET 8.0+ (Windows x86, Windows x64, Windows ARM64, Linux, macOS)
  • .NET Standard 2.0+ (Windows x86, Windows x64, Windows ARM64, Linux, macOS)

Dependencies

.NET Framework 4.6.2

  • Azure.Core 1.50.0
  • Azure.Identity 1.17.1
  • Microsoft.Data.SqlClient.SNI 6.0.2
  • Microsoft.Extensions.Caching.Memory 8.0.1
  • Microsoft.Identity.Client 4.80.0
  • Microsoft.IdentityModel.JsonWebTokens 7.7.1
  • Microsoft.IdentityModel.Protocols.OpenIdConnect 7.7.1
  • System.Buffers 4.6.1
  • System.Data.Common 4.3.0
  • System.Diagnostics.DiagnosticSource 8.0.1
  • System.IdentityModel.Tokens.Jwt 7.7.1
  • System.Memory 4.6.3
  • System.Security.Cryptography.Pkcs 8.0.1
  • System.Text.Json 8.0.6
  • System.Text.RegularExpressions 4.3.1

.NET 8.0

  • Azure.Core 1.50.0
  • Azure.Identity 1.17.1
  • Microsoft.Data.SqlClient.SNI.runtime 6.0.2
  • Microsoft.Extensions.Caching.Memory 8.0.1
  • Microsoft.Identity.Client 4.80.0
  • Microsoft.IdentityModel.JsonWebTokens 7.7.1
  • Microsoft.IdentityModel.Protocols.OpenIdConnect 7.7.1
  • Microsoft.SqlServer.Server 1.0.0
  • System.Configuration.ConfigurationManager 8.0.1
  • System.Diagnostics.DiagnosticSource 8.0.1
  • System.IdentityModel.Tokens.Jwt 7.7.1
  • System.Security.Cryptography.Pkcs 8.0.1

.NET 9.0

... (truncated)

6.1.4

This update brings the following changes since the 6.1.3 release:

Fixed

  • Fixed NullReferenceException issue with SqlDataAdapter when processing batch scenarios where certain SQL RPC calls may not include system parameters.
    (#​3877)
  • Fixed connection pooling issue where extra connection deactivation was causing active connection counts to go negative.
    (#​3776)

Added

AppContext Switch for enabling MultiSubnetFailover

What Changed:

  • Added new AppContext switch Switch.Microsoft.Data.SqlClient.EnableMultiSubnetFailoverByDefault to set MultiSubnetFailover=true by default in connection string.
    (#​3851)

Who Benefits:

  • Applications that need MultiSubnetFailover enabled globally without modifying connection strings.

Impact:

  • Applications can now enable MultiSubnetFailover globally using one of the following methods:
// In application code
AppContext.SetSwitch("Switch.Microsoft.Data.SqlClient.EnableMultiSubnetFailoverByDefault", true);
// In runtimeconfig.json
{
  "configProperties": {
    "Switch.Microsoft.Data.SqlClient.EnableMultiSubnetFailoverByDefault": true
  }
}
<!-- In App.Config -->
<runtime>
  <AppContextSwitchOverrides value="Switch.Microsoft.Data.SqlClient.EnableMultiSubnetFailoverByDefault=true" />
</runtime>

Changed

  • Optimized SqlStatistics execution timing by using Environment.TickCount instead of more expensive timing mechanisms.
    ... (truncated)

6.1.3

This update includes the following changes since the 6.1.2 release:

Added

App Context Switch for Ignoring Server-Provided Failover Partner

What Changed:

  • A new app context switch Switch.Microsoft.Data.SqlClient.IgnoreServerProvidedFailoverPartner was introduced to let the client ignore server-provided failover partner info in Basic Availability Groups (BAGs). When the switch is enabled, only the failover partner specified in the connection string is used; server-supplied partner values are skipped. This context switch was introduced in PR #​3702.

Who Benefits:

  • Applications connecting to SQL Server BAGs using TCP and custom ports, especially where the server's provided partner name lacks the protocol, host, or port. This avoids connection failures when the server-provided partner is incompatible or incomplete.
  • Teams who manage availability groups and rely on client-side control of failover behavior in heterogeneous networking environments.

Impact:

  • If your environment might be affected (i.e., you operate a BAG with custom ports, or have experienced failures after failover), you can enable the new switch in your application:
AppContext.SetSwitch("Switch.Microsoft.Data.SqlClient.IgnoreServerProvidedFailoverPartner", true);
  • Then, ensure your connection string includes your preferred failover partner (with correct tcp:host,port) so that the client uses that instead of the server's suggestion.
  • Without enabling this, by default, the client continues to prefer the server-provided partner, maintaining backwards compatibility.

Fixed

  • Fixed an issue to ensure reliable metrics initialization during startup, preventing missed telemetry when EventSource is enabled early. (#​3718)

Target Platform Support

  • .NET Framework 4.6.2+ (Windows ARM64, Windows x86, Windows x64)
  • .NET 8.0+ (Windows x86, Windows x64, Windows ARM64, Windows ARM, Linux, macOS)

Dependencies

.NET Framework 4.6.2+

  • Azure.Core 1.47.1
  • Azure.Identity 1.14.2
  • Microsoft.Bcl.Cryptography 8.0.0
  • Microsoft.Data.SqlClient.SNI 6.0.2
  • Microsoft.Extensions.Caching.Memory 8.0.1
  • Microsoft.IdentityModel.JsonWebTokens 7.7.1
  • Microsoft.IdentityModel.Protocols.OpenIdConnect 7.7.1
  • System.Buffers 4.5.1
  • System.Data.Common 4.3.0
  • System.Security.Cryptography.Pkcs 8.0.1
  • System.Text.Encodings.Web 8.0.0
    ... (truncated)

6.1.2

This update brings the below changes over the previous stable release:

Fixed

  • Fixed an issue where initializing PerformanceCounters would throw System.InvalidOperationException #​3629
  • Fixed an issue where a Custom SqlClientAuthenticationProvider was being overwritten by default implementation. #​3651
  • Fixed a concurrency issue in connection pooling where the number of active connections could be lower than the configured maximum pool size. #​3653

6.1.1

This update includes the following changes since the 6.1.0 release:

Fixed

  • Reverted changes related to improving partial packet detection, fixup, and replay functionality. This revert addresses regressions introduced in 6.1.0. (#​3556)
  • Applied reference assembly corrections supporting vector, fixed JSON tests, and ensured related tests are enabled. #​3562
  • Fixed SqlVector<T>.Null API signature in Reference assembly. #​3521

Changed

  • Upgraded Azure.Identity and other dependencies to newer versions. (#​3538) (#​3552)

6.1.0

Release Notes

[!WARNING]
This release version is delisted from NuGet.org and is no longer supported.
It contains critical bugs that make it unsuitable for use.

Stable Release 6.1.0 - 2025-07-25

This update brings the following changes since the 6.0.2 stable release:

Added

Added dedicated SQL Server vector datatype support

What Changed:

  • Optimized vector communications between MDS and SQL Server 2025, employing a custom binary format over the TDS protocol. (#​3433, #​3443)
  • Reduced processing load compared to existing JSON-based vector support.
  • Initial support for 32-bit single-precision floating point vectors.

Who Benefits:

  • Applications moving large vector data sets will see beneficial improvements to processing times and memory requirements.
  • Vector-specific APIs are ready to support future numeric representations with a consistent look-and-feel.

Impact:

  • Reduced transmission and processing times for vector operations versus JSON using SQL Server 2025 preview:
    • Reads: 50x improvement
    • Writes: 3.3x improvement
    • Bulk Copy: 19x improvement
    • (Observed with vector column of max 1998 size, and 10,000 records for each operation.)
  • Improved memory footprint due to the elimination of JSON serialization/deserialization and string representation bloat.
  • For backwards compatibility with earlier SQL Server Vector implementations, applications may continue to use JSON strings to send/receive vector data, although they will not see any of the performance improvements noted above.

Revived .NET Standard 2.0 target support

What Changed:

Who Benefits:

  • Libraries that depend on MDS may seamlessly target any of the following frameworks:
    • .NET Standard 2.0
    • .NET Framework 4.6.2 and above
    • .NET 8.0
    • .NET 9.0
  • Applications should continue to target runtimes.
    ... (truncated)

6.1.0-preview2

Preview Release 6.1.0-preview2.25178.5 - 2025-06-27

This update brings the following changes since the 6.1.0-preview1 release:

Added

Added dedicated SQL Server vector datatype support

What Changed:

  • Optimized vector communications between MDS and SQL Server 2025, employing a custom binary format over the TDS protocol. (#​3433, #​3443)
  • Reduced processing load compared to existing JSON-based vector support.
  • Initial support for 32-bit single-precision floating point vectors.

Who Benefits:

  • Applications moving large vector data sets will see beneficial improvements to processing times and memory requirements.
  • Vector-specific APIs are ready to support future numeric representations with a consistent look-and-feel.

Impact:

  • Reduced transmission and processing times for vector operations versus JSON using SQL Server 2025 preview:
    • Reads: 50x improvement
    • Writes: 3.3x improvement
    • Bulk Copy: 19x improvement
    • (Observed with vector column of max 1998 size, and 10,000 records for each operation.)
  • Improved memory footprint due to the elimination of JSON serialization/deserialization and string representation bloat.
  • For backwards compatibility with earlier SQL Server Vector implementations, applications may continue to use JSON strings to send/receive vector data, although they will not see any of the performance improvements noted above.

Revived .NET Standard 2.0 target support

What Changed:

Who Benefits:

  • Libraries that depend on MDS may seamlessly target any of the following frameworks:
    • .NET Standard 2.0
    • .NET Framework 4.6.2 and above
    • .NET 8.0
    • .NET 9.0
  • Applications should continue to target runtimes.
    • The MDS .NET Standard 2.0 target framework support does not include an actual implementation, and cannot be used with a runtime.
    • An application's build/publish process should always pick the appropriate MDS .NET/.NET Framework runtime implementation.
    • Custom build/publish actions that incorrectly try to deploy the MDS .NET Standard 2.0 reference DLL at runtime are not supported.

Impact:

... (truncated)

6.1.0-preview1

This update brings the following changes over the previous release:

Added

  • Added packet multiplexing support to improve large data read performance. #​2714 #​3161 #​3202
  • Added support for special casing with Fabric endpoints. #​3084

Fixed

  • Fixed distributed transactions to be preserved during pooled connection resets. #​3019.
  • Fixed application crash when the Data Source parameter begins with a comma. #​3250.
  • Resolved synonym count discrepancies in debug mode. #​3098.
  • Addressed warnings for down-level SSL/TLS versions. #​3126.

Changed

New Contributors

6.0.5

[Stable release 6.0.5] - 2026-01-15

This update brings the below changes over the previous stable release:

Fixed

  • Fixed NullReferenceException issue with SqlDataAdapter when processing batch scenarios where certain SQL RPC calls may not include system parameters.
    (#​3878)

Added

What Changed:

  • Added new AppContext switch Switch.Microsoft.Data.SqlClient.EnableMultiSubnetFailoverByDefault to set MultiSubnetFailover=true by default in connection string.
    (#​3852)

Who Benefits:

  • Applications that need MultiSubnetFailover enabled globally without modifying connection strings.

Impact:

  • Applications can now enable MultiSubnetFailover globally using one of the following methods:
// In application code
AppContext.SetSwitch("Switch.Microsoft.Data.SqlClient.EnableMultiSubnetFailoverByDefault", true);
// In runtimeconfig.json
{
  "configProperties": {
    "Switch.Microsoft.Data.SqlClient.EnableMultiSubnetFailoverByDefault": true
  }
}
<!-- In App.Config -->
<runtime>
  <AppContextSwitchOverrides value="Switch.Microsoft.Data.SqlClient.EnableMultiSubnetFailoverByDefault=true" />
</runtime>

Changed

  • Updated dependencies (#​3840):
    • .NET Framework 4.6.2:

... (truncated)

6.0.4

This update brings the below changes over the 6.0.3 release:

Added

App Context Switch for Ignoring Server-Provided Failover Partner

What Changed:

  • A new app context switch Switch.Microsoft.Data.SqlClient.IgnoreServerProvidedFailoverPartner was introduced to let the client ignore server-provided failover partner info in Basic Availability Groups (BAGs). When the switch is enabled, only the failover partner specified in the connection string is used; server-supplied partner values are skipped. This context switch was introduced in PR #​3703.

Who Benefits:

  • Applications connecting to SQL Server BAGs using TCP and custom ports, especially where the server's provided partner name lacks the protocol, host, or port. This avoids connection failures when the server-provided partner is incompatible or incomplete.
  • Teams who manage availability groups and rely on client-side control of failover behavior in heterogeneous networking environments.

Impact:

  • If your environment might be affected (i.e., you operate a BAG with custom ports, or have experienced failures after failover), you can enable the new switch in your application:
AppContext.SetSwitch("Switch.Microsoft.Data.SqlClient.IgnoreServerProvidedFailoverPartner", true);
  • Then, ensure your connection string includes your preferred failover partner (with correct tcp:host,port) so that the client uses that instead of the server's suggestion.
  • Without enabling this, by default, the client continues to prefer the server-provided partner, maintaining backwards compatibility.

Target Platform Support

  • .NET Framework 4.6.2+ (Windows ARM64, Windows x64, Windows x86)
  • .NET 8.0+ (Linux, macOS, Windows ARM64, Windows x64, Windows x86)

Dependencies

.NET Framework

  • Azure.Identity 1.14.2
  • Microsoft.Bcl.Cryptography 8.0.0
  • Microsoft.Data.SqlClient.SNI 6.0.2
  • Microsoft.Extensions.Caching.Memory 8.0.1
  • Microsoft.IdentityModel.JsonWebTokens 7.5.0
  • Microsoft.IdentityModel.Protocols.OpenIdConnect 7.5.0
  • System.Buffers 4.5.1
  • System.Security.Cryptography.Pkcs 8.0.1
  • System.Text.Encodings.Web 8.0.0
  • System.Text.Json 8.0.5
  • System.Data.Common 4.3.0

.NET 8

  • Azure.Identity 1.14.2
    ... (truncated)

6.0.3

This update brings the below changes over the previous stable release:

Fixed

  • Fixed an issue where a Custom SqlClientAuthenticationProvider was being overwritten by default implementation. #​3652
  • Fixed a concurrency issue in connection pooling where the number of active connections could be lower than the configured maximum pool size. #​3654

Changed

  • Updated MSAL usage as per code compliance requirements #​3360
  • Updated SqlDecimal implementation to improve code compliance #​3466
  • Updated Azure.Identity and related dependencies #​3553

6.0.2

This update brings the below changes over the previous release:

Fixed

  • Fixed possible NullPointerException during socket receive #​3283
  • Fixed reference assembly definitions for SqlJson APIs #​3169
  • Fixed an error reading the output parameter of type JSON while executing stored procedure #​3173

Changed

6.0.1

Released to NuGet.org on 2025-01-23

Breaking Changes

  • Removed support for .NET Standard. #​2386
  • Removed support for .NET 6 #​2927
  • Removed UWP (UAP) references. #​2483
  • Removed SQL 2000 client-side debugging support for .NET Framework #​2981, #​2940

Added

JSON Support

JSON data type support is now available in Microsoft.Data.SqlClient v6.0. This release introduces SqlJson type available as an extension to System.Data.SqlDbTypes:

using System;
using System.Data.SqlTypes;
using System.Text.Json;

namespace Microsoft.Data.SqlTypes
{
    /// <summary>
    /// Represents the JSON data type in SQL Server.
    /// </summary>
    public class SqlJson : INullable
    {
        /// <summary>
        /// Parameterless constructor. Initializes a new instance of the SqlJson class which 
        /// represents a null JSON value.
        /// </summary>
        public SqlJson() { }

        /// <summary>
        /// Takes a <see cref="string"/> as input and initializes a new instance of the SqlJson class.
        /// </summary>
        /// <param name="jsonString"></param>
        public SqlJson(string jsonString) { }

        /// <summary>
        /// Takes a <see cref="JsonDocument"/> as input and initializes a new instance of the SqlJson class.
        /// </summary>
        /// <param name="jsonDoc"></param>
        public SqlJson(JsonDocument jsonDoc) { }

        /// <inheritdoc/>
        public bool IsNull => throw null;

        /// <summary>
        /// Represents a null instance of the <see cref="SqlJson"/> type.
 ... (truncated)

## 6.0.0-preview3.24332.3

## Breaking Changes
- Dropped support for .NET 6 [#​2927](https://github.com/dotnet/SqlClient/pull/2927)
- Removed SQL 2000 client-side debugging support for .NET Framework [#​2981](https://github.com/dotnet/SqlClient/pull/2981), [#​2940](https://github.com/dotnet/SqlClient/pull/2940)

### Added
- Enabled NuGet package auditing via NuGet.org audit source [#​3024](https://github.com/dotnet/SqlClient/pull/3024)
- Added support for .NET 9 [#​2946](https://github.com/dotnet/SqlClient/pull/2946)
- Added dependency on System.Security.Cryptography.Pkcs:9.0.0 to address [SYSLIB0057](https://learn.microsoft.com/en-us/dotnet/fundamentals/syslib-diagnostics/syslib0057)[#​2946](https://github.com/dotnet/SqlClient/pull/2946)
- Added dependency on Microsoft.Bcl.Cryptography:9.0.0 [#​2946](https://github.com/dotnet/SqlClient/pull/2946)
- Added missing SqlCommand_BeginExecuteReader code sample [#​3009](https://github.com/dotnet/SqlClient/pull/3009)
- Added support for SqlConnectionOverrides in OpenAsync() API [#​2433](https://github.com/dotnet/SqlClient/pull/2433)
- Added localization in Czech, Polish, and Turkish [#​2987](https://github.com/dotnet/SqlClient/pull/2987)

### Fixed
- Reverted default value of UseMinimumLoginTimeout context switch to 'true' [#​2419](https://github.com/dotnet/SqlClient/pull/2419)
- Added missing DynamicallyAccessedMembers attributes in .NET Runtime reference assemblies. [#​2946](https://github.com/dotnet/SqlClient/pull/2946)
- Synchronized dependencies of Reference Assemblies with Runtime assemblies [#​2878](https://github.com/dotnet/SqlClient/pull/2878)
- Fixed lazy initialization of the _SqlMetaData hidden column map for .NET Framework [#​2964](https://github.com/dotnet/SqlClient/pull/2964)

### Changed
- Updated Microsoft.Extensions.Caching.Memory to 9.0.0 for all frameworks [#​2946](https://github.com/dotnet/SqlClient/pull/2946)
- Updated System.Configuration.ConfigurationManager to 9.0.0 [#​2946](https://github.com/dotnet/SqlClient/pull/2946)
- Updated docs to use absolute links [#​2949](https://github.com/dotnet/SqlClient/pull/2949)
- Removed System.Text.Json dependency from .NET 8 [#​2930](https://github.com/dotnet/SqlClient/pull/2930)

### Contributors

Thanks to the following public contributors. Their efforts toward this project are very much appreciated.

- @​MichelZ
- @​EamonHetherton
- @​edwardneal
- @​deadlydog
- @​mus65

For detailed release notes, refer to [6.0.0-preview3.md](https://github.com/dotnet/SqlClient/blob/main/release-notes/6.0/6.0.0-preview3.md)

## 6.0.0-preview2.24304.8

### Added

- Added a dependency on System.Text.Json 8.0.5 for .NET 8+ and 6.0.10 for other versions [#​2921](https://github.com/dotnet/SqlClient/pull/2921)
- Added support for [JSON native datatype](https://learn.microsoft.com/en-us/sql/t-sql/data-types/json-data-type?view=azuresqldb-current&preserve-view=true) currently in [Public preview in SQL Server](https://learn.microsoft.com/azure/azure-sql/database/doc-changes-updates-release-notes-whats-new?view=azuresql).  [#​2916](https://github.com/dotnet/SqlClient/pull/2916), [#​2892](https://github.com/dotnet/SqlClient/pull/2892), [#​2891](https://github.com/dotnet/SqlClient/pull/2891), [#​2880](https://github.com/dotnet/SqlClient/pull/2880), [#​2882](https://github.com/dotnet/SqlClient/pull/2882), [#​2829](https://github.com/dotnet/SqlClient/pull/2829), [#​2830](https://github.com/dotnet/SqlClient/pull/2830)
- Added readme to nuget package [#​2826](https://github.com/dotnet/SqlClient/pull/2826)

### Fixed

- Fixed scale serialization when explicitly set to 0 [#​2411](https://github.com/dotnet/SqlClient/pull/2411)
- Fixed issue blocking GetSchema commands from being enrolled into the current transaction [#​2876](https://github.com/dotnet/SqlClient/pull/2876)
- Adjusted retry logic to allow errors with negative numbers to be considered transient [#​2896](https://github.com/dotnet/SqlClient/pull/2896)
- Fixed string formatting in OutOfMemory exceptions [#​2797](https://github.com/dotnet/SqlClient/pull/2797)
- Increased routing attempts to 10 in netcore for LoginNoFailover and added routing support to LoginWithFailover to standardize routing behavior between netcore and netfx [#​2873](https://github.com/dotnet/SqlClient/pull/2873)
- Restructured documentation into XML format so that it displays correctly in visual studio [#​2836](https://github.com/dotnet/SqlClient/pull/2836), [#​2822](https://github.com/dotnet/SqlClient/pull/2822), [#​2834](https://github.com/dotnet/SqlClient/pull/2834), [#​2851](https://github.com/dotnet/SqlClient/pull/2851), [#​2863](https://github.com/dotnet/SqlClient/pull/2863), [#​2864](https://github.com/dotnet/SqlClient/pull/2864), [#​2865](https://github.com/dotnet/SqlClient/pull/2865), [#​2869](https://github.com/dotnet/SqlClient/pull/2869), [#​2871](https://github.com/dotnet/SqlClient/pull/2871), [#​2837](https://github.com/dotnet/SqlClient/pull/2837), [#​2821](https://github.com/dotnet/SqlClient/pull/2821)
- Fixed cleanup behavior when column decryption fails. Prevents leaving stale data on the wire for pooled connections [#​2843](https://github.com/dotnet/SqlClient/pull/2843), [#​2825](https://github.com/dotnet/SqlClient/pull/2825)

### Changed

- Updated System.Configuration.ConfigurationManager from 8.0.0 to 8.0.1 for .Net 8 [#​2921](https://github.com/dotnet/SqlClient/pull/2921)
- Updated Microsoft.Extensions.Caching.Memory from 8.0.0 to 8.0.1 for .Net 8 [#​2921](https://github.com/dotnet/SqlClient/pull/2921)
- Code Health Improvements [#​2915](https://github.com/dotnet/SqlClient/pull/2915), [#​2844](https://github.com/dotnet/SqlClient/pull/2844), [#​2812](https://github.com/dotnet/SqlClient/pull/2812), [#​2805](https://github.com/dotnet/SqlClient/pull/2805), [#​2897](https://github.com/dotnet/SqlClient/pull/2897), [#​2376](https://github.com/dotnet/SqlClient/pull/2376), [#​2814](https://github.com/dotnet/SqlClient/pull/2814), [#​2889](https://github.com/dotnet/SqlClient/pull/2889), [#​2885](https://github.com/dotnet/SqlClient/pull/2885), [#​2854](https://github.com/dotnet/SqlClient/pull/2854), [#​2835](https://github.com/dotnet/SqlClient/pull/2835), [#​2442](https://github.com/dotnet/SqlClient/pull/2442), [#​2820](https://github.com/dotnet/SqlClient/pull/2820), [#​2831](https://github.com/dotnet/SqlClient/pull/2831), [#​2907](https://github.com/dotnet/SqlClient/pull/2907), [#​2910](https://github.com/dotnet/SqlClient/pull/2910), [#​2898](https://github.com/dotnet/SqlClient/pull/2898), [#​2928](https://github.com/dotnet/SqlClient/pull/2928), [#​2929](https://github.com/dotnet/SqlClient/pull/2929), [#​2936](https://github.com/dotnet/SqlClient/pull/2936), [#​2939](https://github.com/dotnet/SqlClient/pull/2939)

## New Contributors
* @​Markeli made their first contribution in https://github.com/dotnet/SqlClient/pull/2797
* @​EamonHetherton made their first contribution in https://github.com/dotnet/SqlClient/pull/2411

For detailed release notes, refer to [6.0.0-preview2.md](https://github.com/dotnet/SqlClient/blob/main/release-notes/6.0/6.0.0-preview2.md)

## 6.0.0-preview1.24240.8

## [Preview Release 6.0.0-preview1.24240.8] - 2024-08-27

This update brings the below changes over the 5.2 release:

### Breaking Changes

- Removed support for .NET Standard. [#​2386](https://github.com/dotnet/SqlClient/pull/2386)
- Removed UWP (uap) references. [#​2483](https://github.com/dotnet/SqlClient/pull/2483)

### Added

- Added `TokenCredential` object to take advantage of token caching in `ActiveDirectoryAuthenticationProvider`. [#​2380](https://github.com/dotnet/SqlClient/pull/2380)
- Added `DateOnly` and `TimeOnly` support to `DataTable` as a structured parameter. [#​2258](https://github.com/dotnet/SqlClient/pull/2258)
- Added `Microsoft.Data.SqlClient.Diagnostics.SqlClientDiagnostic` type in .NET. [#​2226](https://github.com/dotnet/SqlClient/pull/2226)
- Added scope trace for `GenerateSspiClientContext`. [#​2497](https://github.com/dotnet/SqlClient/pull/2497), [#​2725](https://github.com/dotnet/SqlClient/pull/2725)

### Fixed

- Fixed `Socket.Connect` timeout issue caused by thread starvation. [#​2777](https://github.com/dotnet/SqlClient/pull/2777)
- Fixed pending data with `SqlDataReader` against an encrypted column. [#​2618](https://github.com/dotnet/SqlClient/pull/2618)
- Fixed Entra authentication when using infinite connection timeout in `ActiveDirectoryAuthenticationProvider`. [#​2651](https://github.com/dotnet/SqlClient/pull/2651)
- Fixed `GetSchema` by excluding unsupported engines due to lack of support for `ASSEMBLYPROPERTY` function. [#​2593](https://github.com/dotnet/SqlClient/pull/2593)
- Fixed SSPI retry negotiation with default port in .NET. [#​2559](https://github.com/dotnet/SqlClient/pull/2559)
- Fixed assembly path in .NET 8.0 and `.AssemblyAttributes`. [#​2550](https://github.com/dotnet/SqlClient/pull/2550)
- Fixed certificate chain validation. [#​2487](https://github.com/dotnet/SqlClient/pull/2487)
- Fixed clone of `SqlConnection` to include `AccessTokenCallback`. [#​2525](https://github.com/dotnet/SqlClient/pull/2525)
- Fixed issue with `DateTimeOffset` in table-valued parameters, which was introduced in 5.2. [#​2453](https://github.com/dotnet/SqlClient/pull/2453)
- Fixed `ArgumentNullException` on `SqlDataRecord.GetValue` when using user-defined data type on .NET. [#​2448](https://github.com/dotnet/SqlClient/pull/2448)
- Fixed `SqlBuffer` and `SqlGuild` when it's null. [#​2310](https://github.com/dotnet/SqlClient/pull/2310)
- Fixed `SqlBulkCopy.WriteToServer` state in a consecutive calls. [#​2375](https://github.com/dotnet/SqlClient/pull/2375)
- Fixed null reference exception with `SqlConnection.FireInfoMessageEventOnUserErrors` after introducing the batch command. [#​2399](https://github.com/dotnet/SqlClient/pull/2399)

### Changed

- Updated Microsoft.Data.SqlClient.SNI version to `6.0.0-preview1.24226.4`. [#​2772](https://github.com/dotnet/SqlClient/pull/2772)
- Improved access to `SqlAuthenticationProviderManager.Instance` and avoid early object initiation. [#​2636](https://github.com/dotnet/SqlClient/pull/2636)
- Removed undocumented properties of `Azure.Identity` in `ActiveDirectoryAuthenticationProvider`. [#​2562](https://github.com/dotnet/SqlClient/pull/2562)
- Replaced `System.Runtime.Caching` with `Microsoft.Extensions.Caching.Memory`. [#​2493](https://github.com/dotnet/SqlClient/pull/2493)
- Updated `EnableOptimizedParameterBinding` to only accept text mode commands. [#​2417](https://github.com/dotnet/SqlClient/pull/2417)
- Updated `Azure.Identity` version from `1.10.3` to `1.11.4`. [#​2577](https://github.com/dotnet/SqlClient/pull/2577)
- Updated `Azure.Core` version from `1.35.0` to `1.38.0`. [#​2462](https://github.com/dotnet/SqlClient/pull/2462)
- Updated `Azure.Security.KeyVault.Keys` version from `4.4.0` to `4.5.0`. [#​2462](https://github.com/dotnet/SqlClient/pull/2462)
- Updated `Microsoft.IdentityModel.JsonWebTokens` and `Microsoft.IdentityModel.Protocols.OpenIdConnect` from `6.35.0` to `7.5.0`. [#​2429](https://github.com/dotnet/SqlClient/pull/2429)
- Removed direct dependency to `Microsoft.Identity.Client` to take the transient dependecy through `Azure.Identity`. [#​2577](https://github.com/dotnet/SqlClient/pull/2577)
- Removed unnecessary references `Microsoft.Extensions.Caching.Memory` and `System.Security.Cryptography.Cng` after removing .NET Standard. [#​2577](https://github.com/dotnet/SqlClient/pull/2577)
- Improved memory allocation when reader opened by `CommandBehavior.SequentialAccess` over the big string columns. [#​2356](https://github.com/dotnet/SqlClient/pull/2356)
- Improved SSPI by consolidating the context generation to single abstraction and using memory/span for SSPI generation. [#​2255](https://github.com/dotnet/SqlClient/pull/2255), [#​2447](https://github.com/dotnet/SqlClient/pull/2447)
- Reverted the [#​2281](https://github.com/dotnet/SqlClient/pull/2281) code changes on ManagedSNI. [#​2395](https://github.com/dotnet/SqlClient/pull/2395)
- Updated assembly version to 6.0.0.0. [#​2382](https://github.com/dotnet/SqlClient/pull/2382)
- Code health improvements: [#​2366](https://github.com/dotnet/SqlClient/pull/2366), [#​2369](https://github.com/dotnet/SqlClient/pull/2369), [#​2381](https://github.com/dotnet/SqlClient/pull/2381), [#​2390](https://github.com/dotnet/SqlClient/pull/2390), [#​2392](https://github.com/dotnet/SqlClient/pull/2392), [#​2403](https://github.com/dotnet/SqlClient/pull/2403), [#​2410](https://github.com/dotnet/SqlClient/pull/2410), [#​2413](https://github.com/dotnet/SqlClient/pull/2413), [#​2425](https://github.com/dotnet/SqlClient/pull/2425), [#​2428](https://github.com/dotnet/SqlClient/pull/2428), [#​2440](https://github.com/dotnet/SqlClient/pull/2440), [#​2443](https://github.com/dotnet/SqlClient/pull/2443), [#​2450](https://github.com/dotnet/SqlClient/pull/2450), [#​2466](https://github.com/dotnet/SqlClient/pull/2466), [#​2486](https://github.com/dotnet/SqlClient/pull/2486), [#​2521](https://github.com/dotnet/SqlClient/pull/2521), [#​2522](https://github.com/dotnet/SqlClient/pull/2522), [#​2533](https://github.com/dotnet/SqlClient/pull/2533), [#​2552](https://github.com/dotnet/SqlClient/pull/2552), [#​2560](https://github.com/dotnet/SqlClient/pull/2560), [#​2726](https://github.com/dotnet/SqlClient/pull/2726), [#​2751](https://github.com/dotnet/SqlClient/pull/2751), [#​2811](https://github.com/dotnet/SqlClient/pull/2811)
 ... (truncated)

Commits viewable in [compare view](https://github.com/dotnet/sqlclient/compare/v5.2.3...v6.1.8).
</details>

Updated [Microsoft.SqlServer.DacFx](https://github.com/microsoft/DacFx) from 170.2.70 to 170.6.60.

<details>
<summary>Release notes</summary>

_Sourced from [Microsoft.SqlServer.DacFx's releases](https://github.com/microsoft/DacFx/releases)._

No release notes found for this version range.

Commits viewable in [compare view](https://github.com/microsoft/DacFx/commits).
</details>

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)


</details>

Bumps Microsoft.Data.SqlClient from 5.2.3 to 6.1.8
Bumps Microsoft.SqlServer.DacFx from 170.2.70 to 170.6.60

---
updated-dependencies:
- dependency-name: Microsoft.Data.SqlClient
  dependency-version: 6.1.8
  dependency-type: direct:production
  update-type: version-update:semver-major
- dependency-name: Microsoft.SqlServer.DacFx
  dependency-version: 170.6.60
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot dependabot Bot added .NET Pull requests that update .NET code dependencies Pull requests that update a dependency file labels Nov 25, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file .NET Pull requests that update .NET code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants