|
| 1 | +# Release Notes |
| 2 | + |
| 3 | +## Microsoft.Data.SqlClient 4.0.0-preview1.21237.2 released 25 August 2021 |
| 4 | + |
| 5 | +This update brings the below changes over the previous release: |
| 6 | + |
| 7 | +### Breaking changes over stable release 3.0.0 |
| 8 | +- Changed `Encrypt` connection string property to be `true` by default. [#1210](https://github.com/dotnet/SqlClient/pull/1210) [Read more](#encrypt-default-value-set-to-true) |
| 9 | +- The driver now throws `SqlException` replacing `AggregateException` for active directory authentication modes. [#1213](https://github.com/dotnet/SqlClient/pull/1213) |
| 10 | +- Dropped obsolete `Asynchronous Processing` connection property from .NET Framework. [#1148](https://github.com/dotnet/SqlClient/pull/1148) |
| 11 | + |
| 12 | +### Added |
| 13 | +- Added `SqlCommand.EnableOptimizedParameterBinding` property that when enabled increases performance for commands with very large numbers of parameters. [#1041](https://github.com/dotnet/SqlClient/pull/1041) [Read more](#enable-optimized-parameter-binding) |
| 14 | +- Included `42108` and `42109` error codes to retriable transient errors list. [#1215](https://github.com/dotnet/SqlClient/pull/1215) |
| 15 | +- Added new App Context switch to use OS enabled client protocols only. [#1168](https://github.com/dotnet/SqlClient/pull/1168) [Read more](#app-context-switch-for-using-system-default-protocols) |
| 16 | +- Added `PoolBlockingPeriod` connection property support in .NET Standard. [#1181](https://github.com/dotnet/SqlClient/pull/1181) |
| 17 | +- Added support for `SqlDataReader.GetColumnSchema()` in .NET Standard. [#1181](https://github.com/dotnet/SqlClient/pull/1181) |
| 18 | +- Added PropertyGrid support with component model annotations to `SqlConnectionStringBuilder` properties for .NET Core. [#1152](https://github.com/dotnet/SqlClient/pull/1152) |
| 19 | + |
| 20 | +### Fixed |
| 21 | +- Fixed issue with connectivity when TLS 1.3 is enabled on client and server. [#1168](https://github.com/dotnet/SqlClient/pull/1168) |
| 22 | +- Fixed issue with connection encryption to ensure connections fail when encryption is required. [#1210](https://github.com/dotnet/SqlClient/pull/1210) [Read more](#ensure-connections-fail-when-encryption-is-required) |
| 23 | +- Fixed issue where connection goes to unusable state. [#1128](https://github.com/dotnet/SqlClient/pull/1128) |
| 24 | +- Fixed recursive calls to `RetryLogicProvider` when calling `SqlCommand.ExecuteScalarAsync`. [#1220](https://github.com/dotnet/SqlClient/pull/1220) |
| 25 | +- Fixed async deadlock scenarios in web contexts with configurable retry logic provider. [#1220](https://github.com/dotnet/SqlClient/pull/1220) |
| 26 | +- Fixed `EntryPointNotFoundException` in `InOutOfProcHelper` constructor. [#1120](https://github.com/dotnet/SqlClient/pull/1120) |
| 27 | +- Fixed async thread blocking issues on `SqlConnection.Open()` for active directory authentication modes. [#1213](https://github.com/dotnet/SqlClient/pull/1213) |
| 28 | +- Fixed driver behavior for Always Encrypted with secure enclaves to not fail when no user parameters have been provided. [#1115](https://github.com/dotnet/SqlClient/pull/1115) |
| 29 | +- Fixed bug with `LegacyRowVersionNullBehavior` App Context switch. [#1182](https://github.com/dotnet/SqlClient/pull/1182) |
| 30 | +- Fixed issues in Strings.resx file containing error messages. [#1136](https://github.com/dotnet/SqlClient/pull/1136) [#1178](https://github.com/dotnet/SqlClient/pull/1178) |
| 31 | + |
| 32 | +### Changed |
| 33 | +- Updated error code to match with Windows when certificate validation fails in non-Windows client environments. [#1130](https://github.com/dotnet/SqlClient/pull/1130) |
| 34 | +- Removed designer attributes from `SqlCommand` and `SqlDataAdapter`. [#1132](https://github.com/dotnet/SqlClient/pull/1132) |
| 35 | +- Updated configurable retry logic default retriable error list. [#1125](https://github.com/dotnet/SqlClient/pull/1125) |
| 36 | +- Improved performance by changing `SqlParameter` bool fields to flags. [#1064](https://github.com/dotnet/SqlClient/pull/1064) |
| 37 | +- Improved performance by implementing static delegates. [#1060](https://github.com/dotnet/SqlClient/pull/1060) |
| 38 | +- Optimized async method allocations in .NET Framework by porting changes from .NET Core. [#1084](https://github.com/dotnet/SqlClient/pull/1084) |
| 39 | +- Various code improvements [#902](https://github.com/dotnet/SqlClient/pull/902) [#925](https://github.com/dotnet/SqlClient/pull/925) [#933](https://github.com/dotnet/SqlClient/pull/933) [#934](https://github.com/dotnet/SqlClient/pull/934) [#1024](https://github.com/dotnet/SqlClient/pull/1024) [#1057](https://github.com/dotnet/SqlClient/pull/1057) [#1122](https://github.com/dotnet/SqlClient/pull/1122) [#1133]((https://github.com/dotnet/SqlClient/pull/1133)) [#1134](https://github.com/dotnet/SqlClient/pull/1134) [#1141](https://github.com/dotnet/SqlClient/pull/1141) [#1187](https://github.com/dotnet/SqlClient/pull/1187) [#1188](https://github.com/dotnet/SqlClient/pull/1188) [#1223](https://github.com/dotnet/SqlClient/pull/1223) [#1225](https://github.com/dotnet/SqlClient/pull/1225) [#1226](https://github.com/dotnet/SqlClient/pull/1226) |
| 40 | + |
| 41 | +## New features over stable release v3.0 |
| 42 | + |
| 43 | +### Encrypt default value set to true |
| 44 | +The default value of the `Encrypt` connection setting has been changed from `false` to `true`. With the growing use of cloud databases and the need to ensure those connections are secure, it's time for this backwards-compatibility-breaking change. |
| 45 | + |
| 46 | +### Ensure connections fail when encryption is required |
| 47 | +In scenarios where client encryption libraries were disabled or unavailable, it was possible for unencrypted connections to be made when Encrypt was set to true or the server required encryption. |
| 48 | + |
| 49 | +### App Context Switch for using System default protocols |
| 50 | +TLS 1.3 is not supported by the driver; therefore, it has been removed from the supported protocols list by default. Users can switch back to forcing use of Operating System's client protocols, by enabling the App Context switch below: |
| 51 | + |
| 52 | + `Switch.Microsoft.Data.SqlClient.UseSystemDefaultSecureProtocols` |
| 53 | + |
| 54 | +### Enable optimized parameter binding |
| 55 | +Microsoft.Data.SqlClient introduces new `SqlCommand` API, `EnableOptimizedParameterBinding` to improve performance of queries with large number of parameters. This property is disabled by default. When set to `true`, parameter names will not be sent to the SQL server when the command is executed. |
| 56 | + |
| 57 | +```cs |
| 58 | +public class SqlCommand |
| 59 | +{ |
| 60 | + public bool EnableOptimizedParameterBinding { get; set; } |
| 61 | +} |
| 62 | +``` |
| 63 | + |
| 64 | +## Target Platform Support |
| 65 | + |
| 66 | +- .NET Framework 4.6.1+ (Windows x86, Windows x64) |
| 67 | +- .NET Core 2.1+ (Windows x86, Windows x64, Windows ARM64, Windows ARM, Linux, macOS) |
| 68 | +- .NET Standard 2.0+ (Windows x86, Windows x64, Windows ARM64, Windows ARM, Linux, macOS) |
| 69 | + |
| 70 | +### Dependencies |
| 71 | + |
| 72 | +#### .NET Framework |
| 73 | + |
| 74 | +- Microsoft.Data.SqlClient.SNI 4.0.0-preview1.21232.1 |
| 75 | +- Azure.Identity 1.3.0 |
| 76 | +- Microsoft.Identity.Client 4.22.0 |
| 77 | +- Microsoft.IdentityModel.Protocols.OpenIdConnect 6.8.0 |
| 78 | +- Microsoft.IdentityModel.JsonWebTokens 6.8.0 |
| 79 | +- System.Configuration.ConfigurationManager 5.0.0 |
| 80 | +- System.Text.Encodings.Web 4.7.2 |
| 81 | +- System.Runtime.InteropServices.RuntimeInformation 4.3.0 |
| 82 | + |
| 83 | +#### .NET Core |
| 84 | + |
| 85 | +- Microsoft.Data.SqlClient.SNI.runtime 4.0.0-preview1.21232.1 |
| 86 | +- Microsoft.Win32.Registry 5.0.0 |
| 87 | +- System.Security.Principal.Windows 5.0.0 |
| 88 | +- System.Text.Encoding.CodePages 5.0.0 |
| 89 | +- System.Text.Encodings.Web 4.7.2 |
| 90 | +- System.Diagnostics.DiagnosticSource 5.0.0 |
| 91 | +- System.Configuration.ConfigurationManager 5.0.0 |
| 92 | +- System.Runtime.Caching 5.0.0 |
| 93 | +- Azure.Identity 1.3.0 |
| 94 | +- Microsoft.Identity.Client 4.22.0 |
| 95 | +- Microsoft.IdentityModel.Protocols.OpenIdConnect 6.8.0 |
| 96 | +- Microsoft.IdentityModel.JsonWebTokens 6.8.0 |
| 97 | + |
| 98 | +#### .NET Standard |
| 99 | + |
| 100 | +- Microsoft.Data.SqlClient.SNI.runtime 4.0.0-preview1.21232.1 |
| 101 | +- Microsoft.Win32.Registry 5.0.0 |
| 102 | +- System.Buffers 4.5.1 |
| 103 | +- System.Memory 4.5.4 |
| 104 | +- System.Security.Principal.Windows 5.0.0 |
| 105 | +- System.Text.Encoding.CodePages 5.0.0 |
| 106 | +- System.Text.Encodings.Web 4.7.2 |
| 107 | +- System.Runtime.Caching 5.0.0 |
| 108 | +- Azure.Identity 1.3.0 |
| 109 | +- Microsoft.Identity.Client 4.22.0 |
| 110 | +- Microsoft.IdentityModel.Protocols.OpenIdConnect 6.8.0 |
| 111 | +- Microsoft.IdentityModel.JsonWebTokens 6.8.0 |
| 112 | +- System.Configuration.ConfigurationManager 5.0.0 |
| 113 | +- System.Runtime.Loader 4.3.0 |
0 commit comments