- Notifications
You must be signed in to change notification settings - Fork311
Stable Release v6.0.1
Compare
Could not load tags
Nothing to show
{{ refName }}defaultLoading
· 14 commits to release/6.0 since this release
cfb007d
This commit was created on GitHub.com and signed with GitHub’sverified signature.
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 introducesSqlJson
type available as an extension toSystem.Data.SqlDbTypes
:
usingSystem;usingSystem.Data.SqlTypes;usingSystem.Text.Json;namespaceMicrosoft.Data.SqlTypes{/// <summary>/// Represents the JSON data type in SQL Server./// </summary>publicclassSqlJson:INullable{/// <summary>/// Parameterless constructor. Initializes a new instance of the SqlJson class which/// represents a null JSON value./// </summary>publicSqlJson(){}/// <summary>/// Takes a <see cref="string"/> as input and initializes a new instance of the SqlJson class./// </summary>/// <param name="jsonString"></param>publicSqlJson(stringjsonString){}/// <summary>/// Takes a <see cref="JsonDocument"/> as input and initializes a new instance of the SqlJson class./// </summary>/// <param name="jsonDoc"></param>publicSqlJson(JsonDocumentjsonDoc){}/// <inheritdoc/>publicboolIsNull=>thrownull;/// <summary>/// Represents a null instance of the <see cref="SqlJson"/> type./// </summary>publicstaticSqlJsonNull{get{thrownull;}}/// <summary>/// Gets the string representation of the Json content of this <see cref="SqlJson" /> instance./// </summary>publicstringValue{get;}}}
The JSON data type supports reading, writing, streaming, and performing bulk copy operations.
Introducing SqlClientDiagnostics
SqlClientDiagnostic
is now available as a strongly-typed collection of key-value pairs that can be captured by consuming applications.
// Class that provides strongly-typed collection of key-value pairs for SqlClient diagnostic objects.publicabstractclassSqlClientDiagnostic:System.Collections.Generic.IReadOnlyList<System.Collections.Generic.KeyValuePair<string,object>>{// A guid value used to correlate before, after and error events.publicSystem.GuidOperationId;// The name of the operation.publicstringOperation;// The timestamp of the event.publiclongTimestamp;// The number of elements in the collection.publicintCount;// The element at the specified index in the read-only list.publicSystem.Collections.Generic.KeyValuePair<string,object>this[intindex];// An enumerator that can be used to iterate through the collection.publicSystem.Collections.Generic.IEnumerator<System.Collections.Generic.KeyValuePair<string,object>>GetEnumerator();}
Added Support for Connection Overrides inOpenAsync()
API
The default behavior ofSqlConnection.OpenAsync()
can be overridden to disable the ten-second delay and automatic connection retries triggered by transient errors.
using(SqlConnectionsqlConnection=newSqlConnection("Data Source=(local);Integrated Security=true;Initial Catalog=AdventureWorks;")){awaitsqlConnection.OpenAsync(SqlConnectionOverrides.OpenWithoutRetry,cancellationToken);}
Other Additions
- Added support for .NET 9#2946
- Added localization in Czech, Polish, and Turkish#2987
- Added
TokenCredential
object to take advantage of token caching inActiveDirectoryAuthenticationProvider
.#2380 - Added support for using
DateOnly
andTimeOnly
inDataTable
andSqlDataRecord
structured parameters.#2258 - Added scope trace for
GenerateSspiClientContext
.#2497,#2725 - Added readme to NuGet package#2826
- Enabled NuGet package auditing via NuGet.org audit source#3024
- Added missing SqlCommand_BeginExecuteReader code sample#3009
Fixed
- Fixed
Socket.Connect
timeout issue caused by thread starvation.#2777 - Fixed pending data with
SqlDataReader
against an encrypted column.#2618 - Fixed Entra authentication when using infinite connection timeout in
ActiveDirectoryAuthenticationProvider
.#2651 - Fixed
GetSchema
by excluding unsupported engines due to lack of support forASSEMBLYPROPERTY
function.#2593 - Fixed SSPI retry negotiation with default port in .NET.#2559
- Fixed assembly path in .NET 8.0 and
.AssemblyAttributes
.#2550 - Fixed certificate chain validation.#2487
- Fixed clone of
SqlConnection
to includeAccessTokenCallback
.#2525 - Fixed issue with
DateTimeOffset
in table-valued parameters, which was introduced in 5.2.#2453 - Fixed
ArgumentNullException
onSqlDataRecord.GetValue
when using user-defined data type on .NET.#2448 - Fixed
SqlBuffer
andSqlGuid
when it's null.#2310 - Fixed
SqlBulkCopy.WriteToServer
state in a consecutive calls.#2375 - Fixed null reference exception with
SqlConnection.FireInfoMessageEventOnUserErrors
after introducing the batch command.#2399 - Fixed scale serialization when explicitly set to 0#2411
- Fixed issue blocking
GetSchema
commands from being enrolled into the current transaction#2876 - Adjusted retry logic to allow errors with negative numbers to be considered transient#2896
- Fixed string formatting in
OutOfMemory
exceptions#2797 - Increased routing attempts to 10 in netcore for
LoginNoFailover
and added routing support toLoginWithFailover
to standardize routing behavior between netcore and netfx#2873 - Restructured documentation into XML format so that it displays correctly in Visual Studio#2836,#2822,#2834,#2851,#2863,#2864,#2865,#2869,#2871,#2837,#2821
- Fixed cleanup behavior when column decryption fails. Prevents leaving stale data on the wire for pooled connections#2843,#2825
- Reverted default value of
UseMinimumLoginTimeout
context switch to 'true'#2419 - Added missing
DynamicallyAccessedMembers
attributes in .NET Runtime reference assemblies.#2946 - Synchronized dependencies of reference assemblies with runtime assemblies#2878
- Fixed lazy initialization of the
_SqlMetaData
hidden column map for .NET Framework#2964 - Fixed reference assembly definitions for SqlClientDiagnostic APIs#3097
- Fixed issue with down-level SSL/TLS version warnings#3126
Changed
- Dependency changes
- Added dependency on
Microsoft.Bcl.Cryptography:9.0.0
#2946 - Added dependency on
System.Security.Cryptography.Pkcs:9.0.0
to addressSYSLIB0057#2946 - Added dependency on
System.Text.Json
8.0.5
for .NET 8+ and6.0.10
for other versions#2921 - Removed dependency on
Microsoft.Extensions.Caching.Memory
andSystem.Security.Cryptography.Cng
, which were unnecessary after removing .NET Standard.#2577 - Removed dependency on
System.Text.Json
from .NET 8+#2930 - Removed direct dependency to
Microsoft.Identity.Client
to take the transient dependecy throughAzure.Identity
.#2577 - Replaced
System.Runtime.Caching
withMicrosoft.Extensions.Caching.Memory
.#2493 - Updated
Azure.Core
version from1.35.0
to1.38.0
.#2462 - Updated
Azure.Identity
version from1.10.3
to1.11.4
.#2577 - Updated
Azure.Security.KeyVault.Keys
version from4.4.0
to4.5.0
.#2462 - Updated SNI dependency
Microsoft.Data.SqlClient.SNI
andMicrosoft.Data.SqlClient.SNI.runtime
to6.0.2
#3116#3117 - Updated
Microsoft.IdentityModel.JsonWebTokens
andMicrosoft.IdentityModel.Protocols.OpenIdConnect
from6.35.0
to7.5.0
.#2429 - Updated
Microsoft.Extensions.Caching.Memory
from8.0.0
to9.0.0
#2921 - Updated
System.Configuration.ConfigurationManager
from8.0.0
to9.0.10
for .NET 8#2921
- Added dependency on
- Improved access to
SqlAuthenticationProviderManager.Instance
and avoid early object initiation.#2636 - Removed undocumented properties of
Azure.Identity
inActiveDirectoryAuthenticationProvider
.#2562 - Updated
EnableOptimizedParameterBinding
to only accept text mode commands.#2417 - Improved memory allocation when reader opened by
CommandBehavior.SequentialAccess
over the big string columns.#2356 - Improved SSPI by consolidating the context generation to single abstraction and using memory/span for SSPI generation.#2255,#2447
- Reverted the#2281 code changes on ManagedSNI.#2395
- Updated assembly version to 6.0.0.0.#2382, since Preview 1
- Updated docs to use absolute links#2949, since Preview 3
- Code health improvements:#2366,#2369,#2376,#2381,#2390,#2392,#2403,#2410,#2413,#2425,#2428,#2440,#2442,#2443,#2450,#2466,#2486,#2521,#2522,#2533,#2552,#2560,#2726,#2751,#2805,#2811,#2812,#2814,#2820,#2831,#2835,#2844,#2854,#2885,#2889,#2897,#2898,#2907,#2910,#2915,#2928,#2929,#2936,#2939
Contributors
Assets3
Uh oh!
There was an error while loading.Please reload this page.
4 people reacted