|
| 1 | +# Release Notes |
| 2 | + |
| 3 | +## Microsoft.Data.SqlClient 5.1.0 released 19 January 2023 |
| 4 | + |
| 5 | +This update includes the following changes over the 5.0 release: |
| 6 | + |
| 7 | +### Breaking changes |
| 8 | + |
| 9 | +- Dropped support for .NET Core 3.1. [#1704](https://github.com/dotnet/SqlClient/pull/1704) [#1823](https://github.com/dotnet/SqlClient/pull/1823) |
| 10 | + |
| 11 | +### Added |
| 12 | + |
| 13 | +- Added support for .NET 6.0. [#1704](https://github.com/dotnet/SqlClient/pull/1704) |
| 14 | +- Added support for `DateOnly` and `TimeOnly` for `SqlParameter` value and `GetFieldValue`. [#1813](https://github.com/dotnet/SqlClient/pull/1813) |
| 15 | +- Added support for TLS 1.3 on .NET Core and native SNI. [#1821](https://github.com/dotnet/SqlClient/pull/1821) |
| 16 | +- Added `ServerCertificate` setting for `Encrypt=Mandatory` or `Encrypt=Strict`. [#1822](https://github.com/dotnet/SqlClient/pull/1822) [Read more](#server-certificate) |
| 17 | +- Added Windows ARM64 support when targeting .NET Framework. [#1828](https://github.com/dotnet/SqlClient/pull/1828) |
| 18 | + |
| 19 | +### Fixed |
| 20 | + |
| 21 | +- Fixed thread safety of transient error list in configurable retry logic. [#1882](https://github.com/dotnet/SqlClient/pull/1882) |
| 22 | +- Fixed deadlock when using SinglePhaseCommit with distributed transactions. [#1801](https://github.com/dotnet/SqlClient/pull/1801) |
| 23 | +- Fixed Dedicated Admin Connections (DAC) to localhost in managed SNI [#1865](https://github.com/dotnet/SqlClient/pull/1865) |
| 24 | +- Fixed memory leak regression from [#1781](https://github.com/dotnet/SqlClient/pull/1781) using a `DisposableTemporaryOnStack` struct. [#1818](https://github.com/dotnet/SqlClient/pull/1818) |
| 25 | +- Fixed `ReadAsync()` behavior to register Cancellation token action before streaming results. [#1781](https://github.com/dotnet/SqlClient/pull/1781) |
| 26 | +- Fixed `NullReferenceException` when assigning `null` to `SqlConnectionStringBuilder.Encrypt`. [#1778](https://github.com/dotnet/SqlClient/pull/1778) |
| 27 | +- Fixed missing `HostNameInCertificate` property in .NET Framework Reference Project. [#1776](https://github.com/dotnet/SqlClient/pull/1776) |
| 28 | +- Fixed async deadlock issue when sending attention fails due to network failure. [#1766](https://github.com/dotnet/SqlClient/pull/1766) |
| 29 | +- Fixed failed connection requests in ConnectionPool in case of PoolBlock. [#1768](https://github.com/dotnet/SqlClient/pull/1768) |
| 30 | +- Fixed hang on infinite timeout and managed SNI. [#1742](https://github.com/dotnet/SqlClient/pull/1742) |
| 31 | +- Fixed Default UTF8 collation conflict. [#1739](https://github.com/dotnet/SqlClient/pull/1739) |
| 32 | + |
| 33 | +### Changed |
| 34 | + |
| 35 | +- Updated `Microsoft.Data.SqlClient.SNI` (.NET Framework dependency) and `Microsoft.Data.SqlClient.SNI.runtime` (.NET Core/Standard dependency) version to `5.1.0`. [#1889](https://github.com/dotnet/SqlClient/pull/1889) which includes fix for AppDomain crash in issue [#1418](https://github.com/dotnet/SqlClient/issues/1418), TLS 1.3 Support, removal of ARM32 binaries, and support for the `ServerCertificate` option. [#1822](https://github.com/dotnet/SqlClient/issues/1822) [Read more](#server-certificate) |
| 36 | +- Reverted "Excluding unsupported TLS protocols" for issue [#1151](https://github.com/dotnet/SqlClient/issues/1151) (i.e. removed `Switch.Microsoft.Data.SqlClient.EnableSecureProtocolsByOS`) by adding support for TLS 1.3. [#1824](https://github.com/dotnet/SqlClient/issues/1824) |
| 37 | +- Changed the `SqlConnectionEncryptOption` string parser to public. [#1771](https://github.com/dotnet/SqlClient/pull/1771) |
| 38 | +- Converted `ExecuteNonQueryAsync` to use async context object. [#1692](https://github.com/dotnet/SqlClient/pull/1692) |
| 39 | +- Code health improvements [#1867](https://github.com/dotnet/SqlClient/pull/1867) [#1849](https://github.com/dotnet/SqlClient/pull/1849) [#1812](https://github.com/dotnet/SqlClient/pull/1812) [#1520](https://github.com/dotnet/SqlClient/pull/1520) [#1604](https://github.com/dotnet/SqlClient/pull/1604) [#1598](https://github.com/dotnet/SqlClient/pull/1598) [#1595](https://github.com/dotnet/SqlClient/pull/1595) [#1443](https://github.com/dotnet/SqlClient/pull/1443) |
| 40 | + |
| 41 | +## New features |
| 42 | + |
| 43 | +### Server Certificate |
| 44 | + |
| 45 | +The default value of the `ServerCertificate` connection setting is an empty string. When `Encrypt` is set to `Mandatory` or `Strict`, `ServerCertificate` can be used to specify a path on the file system to a certificate file to match against the SQL Server's TLS/SSL certificate. For this to be valid, the certificate specified must be an exact match. The accepted certificate formats are `PEM`, `DER`, and `CER`. Here is an example: |
| 46 | + |
| 47 | + ```cs |
| 48 | + "Data Source=...;Encrypt=Strict;ServerCertificate=C:\\certificates\\server.cer" |
| 49 | + ``` |
| 50 | + |
| 51 | +## Target Platform Support |
| 52 | + |
| 53 | +- .NET Framework 4.6.2+ (Windows x86, Windows x64) |
| 54 | +- .NET 6.0+ (Windows x86, Windows x64, Windows ARM64, Windows ARM, Linux, macOS) |
| 55 | +- .NET Standard 2.0+ (Windows x86, Windows x64, Windows ARM64, Windows ARM, Linux, macOS) |
| 56 | + |
| 57 | +### Dependencies |
| 58 | + |
| 59 | +#### .NET Framework |
| 60 | + |
| 61 | +- Microsoft.Data.SqlClient.SNI 5.1.0 |
| 62 | +- Azure.Identity 1.7.0 |
| 63 | +- Microsoft.Identity.Client 4.47.2 |
| 64 | +- Microsoft.IdentityModel.JsonWebTokens 6.24.0 |
| 65 | +- Microsoft.IdentityModel.Protocols.OpenIdConnect 6.24.0 |
| 66 | +- System.Buffers 4.5.1 |
| 67 | +- System.Configuration.ConfigurationManager 6.0.1 |
| 68 | +- System.Runtime.InteropServices.RuntimeInformation 4.3.0 |
| 69 | +- System.Text.Encoding.Web 6.0.0 |
| 70 | + |
| 71 | +#### .NET |
| 72 | + |
| 73 | +- Microsoft.Data.SqlClient.SNI 5.1.0 |
| 74 | +- Azure.Identity 1.7.0 |
| 75 | +- Microsoft.Identity.Client 4.47.2 |
| 76 | +- Microsoft.IdentityModel.JsonWebTokens 6.24.0 |
| 77 | +- Microsoft.IdentityModel.Protocols.OpenIdConnect 6.24.0 |
| 78 | +- Microsoft.SqlServer.Server 1.0.0 |
| 79 | +- System.Configuration.ConfigurationManager 6.0.1 |
| 80 | +- System.Diagnostics.DiagnosticSource 6.0.0 |
| 81 | +- System.Runtime.Caching 6.0.0 |
| 82 | +- System.Text.Encoding.CodePages 6.0.0 |
| 83 | +- System.Text.Encodings.Web 6.0.0 |
| 84 | +- System.Security.Cryptography.Cng 5.0.0 |
| 85 | +- System.Security.Principal.Windows 5.0.0 |
| 86 | + |
| 87 | +#### .NET Standard |
| 88 | + |
| 89 | +- Microsoft.Data.SqlClient.SNI 5.1.0 |
| 90 | +- Azure.Identity 1.7.0 |
| 91 | +- Microsoft.Identity.Client 4.47.2 |
| 92 | +- Microsoft.IdentityModel.Protocols.OpenIdConnect 6.24.0 |
| 93 | +- Microsoft.IdentityModel.JsonWebTokens 6.24.0 |
| 94 | +- Microsoft.SqlServer.Server 1.0.0 |
| 95 | +- Microsoft.Win32.Registry 5.0.0 |
| 96 | +- System.Buffers 4.5.1 |
| 97 | +- System.Configuration.ConfigurationManager 6.0.1 |
| 98 | +- System.Runtime.Caching 6.0.0 |
| 99 | +- System.Text.Encoding.CodePages 6.0.0 |
| 100 | +- System.Text.Encodings.Web 6.0.0 |
| 101 | +- System.Runtime.Loader 4.3.0 |
| 102 | +- System.Security.Cryptography.Cng 5.0.0 |
| 103 | +- System.Security.Principal.Windows 5.0.0 |
0 commit comments