Skip to content

Commit 768b58b

Browse files
Johnny PhamDavid-EngelDavoudEshtehari
authored
Release notes v4.0.0 (#1389)
* 4.0 release notes * Update 4.0.0.md * Update 4.0.0.md * Update 4.0.0.md * Update README.md * Update 4.0.0.md * Update release-notes/4.0/4.0.0.md Co-authored-by: David Engel <[email protected]> * Update release-notes/4.0/4.0.0.md Co-authored-by: David Engel <[email protected]> * add changes * Update release-notes/4.0/4.0.0.md Co-authored-by: DavoudEshtehari <[email protected]> * add SqlClientLogger changes * typos Co-authored-by: David Engel <[email protected]> Co-authored-by: DavoudEshtehari <[email protected]>
1 parent c1b86b8 commit 768b58b

File tree

5 files changed

+211
-1
lines changed

5 files changed

+211
-1
lines changed

CHANGELOG.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,17 @@ All notable changes to this project will be documented in this file.
44

55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
66

7+
## [Stable Release 4.0.0] - 2021-11-18
8+
9+
### Added
10+
11+
- Added missing `SqlClientLogger` class to .NET Core refs and missing 'SqlClientLogger.LogWarning' method in .NET Framework refs [#1392](https://github.com/dotnet/SqlClient/pull/1392)
12+
13+
### Changed
14+
15+
- Avoid throwing unnecessary exception when an invalid SqlNotificationInfo value is received from SQL Server [#1378](https://github.com/dotnet/SqlClient/pull/1378)
16+
- Updated `Microsoft.Data.SqlClient.SNI` (.NET Framework dependency) and `Microsoft.Data.SqlClient.SNI.runtime` (.NET Core/Standard dependency) version to `v4.0.0` [#1391](https://github.com/dotnet/SqlClient/pull/1391)
17+
718
## [Preview Release 4.0.0-preview3.21293.2] - 2021-10-20
819

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

release-notes/4.0/4.0.0.md

Lines changed: 187 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,187 @@
1+
# Release Notes
2+
3+
## Microsoft.Data.SqlClient 4.0.0 released 18 November 2021
4+
5+
This update brings the below changes over the previous preview release:
6+
7+
## Summary of changes in 4.0
8+
9+
All changes in Microsoft.Data.SqlClient v4.0 over v3.0:
10+
11+
### New Additions
12+
- 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)
13+
- Included `42108` and `42109` error codes to retriable transient errors list. [#1215](https://github.com/dotnet/SqlClient/pull/1215)
14+
- 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)
15+
- Added `PoolBlockingPeriod` connection property support in .NET Standard. [#1181](https://github.com/dotnet/SqlClient/pull/1181)
16+
- Added support for `SqlDataReader.GetColumnSchema()` in .NET Standard. [#1181](https://github.com/dotnet/SqlClient/pull/1181)
17+
- Added PropertyGrid support with component model annotations to `SqlConnectionStringBuilder` properties for .NET Core. [#1152](https://github.com/dotnet/SqlClient/pull/1152)
18+
- Added support for `SqlFileStream` on Windows using .NET Standard 2.0 and above. [#1240](https://github.com/dotnet/SqlClient/pull/1240)
19+
- Added support for **localdb** `shared instance` using managed SNI. [#1237](https://github.com/dotnet/SqlClient/pull/1237). [Read more](#sqllocaldb-shared-instance-support)
20+
- Added `GetFieldValueAsync<T>` and `GetFieldValue<T>` support for `XmlReader`, `TextReader`, `Stream` [#1019](https://github.com/dotnet/SqlClient/pull/1019). [Read more](#getfieldvalueasynct-and-getfieldvaluet-support-for-xmlreader-textreader-stream-types)
21+
- Added missing `SqlClientLogger` class to .NET Core refs and missing 'SqlClientLogger.LogWarning' method in .NET Framework refs [#1392](https://github.com/dotnet/SqlClient/pull/1392)
22+
23+
### Bug Fixes
24+
- Fixed issue with connectivity when TLS 1.3 is enabled on client and server. [#1168](https://github.com/dotnet/SqlClient/pull/1168)
25+
- 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)
26+
- Fixed issue where connection goes to unusable state. [#1128](https://github.com/dotnet/SqlClient/pull/1128)
27+
- Fixed recursive calls to `RetryLogicProvider` when calling `SqlCommand.ExecuteScalarAsync`. [#1220](https://github.com/dotnet/SqlClient/pull/1220)
28+
- Fixed async deadlock scenarios in web contexts with configurable retry logic provider. [#1220](https://github.com/dotnet/SqlClient/pull/1220)
29+
- Fixed `EntryPointNotFoundException` in `InOutOfProcHelper` constructor. [#1120](https://github.com/dotnet/SqlClient/pull/1120)
30+
- Fixed async thread blocking issues on `SqlConnection.Open()` for active directory authentication modes. [#1213](https://github.com/dotnet/SqlClient/pull/1213)
31+
- 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)
32+
- Fixed bug with `LegacyRowVersionNullBehavior` App Context switch. [#1182](https://github.com/dotnet/SqlClient/pull/1182)
33+
- 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)
34+
- Fixed `.NET decimal` conversion from `SqlDecimal`. [#1179](https://github.com/dotnet/SqlClient/pull/1179)
35+
- Fixed `Event Source` changes on **TryBeginExecuteEvent** and **WriteEndExecuteEvent** to address the failure on other MS products such as OpenTelemetry and Application Insight. [#1258](https://github.com/dotnet/SqlClient/pull/1258)
36+
- Fixed command's async cancellation. [#956](https://github.com/dotnet/SqlClient/pull/956)
37+
- Fixed deadlock in transaction using .NET Framework. [#1242](https://github.com/dotnet/SqlClient/pull/1242)
38+
- Fixed unknown transaction state issues when prompting delegated transaction. [1216](https://github.com/dotnet/SqlClient/pull/1216)
39+
- Fixed `FormatException` when opening a connection with event tracing enabled [#1291](https://github.com/dotnet/SqlClient/pull/1291)
40+
- Fixed improper initialization of `ActiveDirectoryAuthenticationProvider` [#1328](https://github.com/dotnet/SqlClient/pull/1328)
41+
- Fixed `MissingMethodException` when accessing `SqlAuthenticationParameters.ConnectionTimeout` [#1336](https://github.com/dotnet/SqlClient/pull/1336)
42+
- Fixed data corruption issues by reverting changes to async cancellations [#1352](https://github.com/dotnet/SqlClient/pull/1352)
43+
- Fixed performance degradation by reverting changes to MARS state machine [#1357](https://github.com/dotnet/SqlClient/pull/1357)
44+
- Fixed bug where environment variables are ignored when using `Active Directory Default` authentication [#1360](https://github.com/dotnet/SqlClient/pull/1360)
45+
46+
### Improvements and Changes
47+
- Updated error code to match with Windows when certificate validation fails in non-Windows client environments. [#1130](https://github.com/dotnet/SqlClient/pull/1130)
48+
- Removed designer attributes from `SqlCommand` and `SqlDataAdapter`. [#1132](https://github.com/dotnet/SqlClient/pull/1132)
49+
- Updated configurable retry logic default retriable error list. [#1125](https://github.com/dotnet/SqlClient/pull/1125)
50+
- Improved performance by changing `SqlParameter` bool fields to flags. [#1064](https://github.com/dotnet/SqlClient/pull/1064)
51+
- Improved performance by implementing static delegates. [#1060](https://github.com/dotnet/SqlClient/pull/1060)
52+
- Optimized async method allocations in .NET Framework by porting changes from .NET Core. [#1084](https://github.com/dotnet/SqlClient/pull/1084)
53+
- 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) [#1155](https://github.com/dotnet/SqlClient/pull/1155) [#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) [#1236](https://github.com/dotnet/SqlClient/pull/1236) [#1251](https://github.com/dotnet/SqlClient/pull/1251) [#1266](https://github.com/dotnet/SqlClient/pull/1266)
54+
- Removed attributes for classes used in Microsoft.VSDesigner due to lack of support for Microsoft.Data.SqlClient [#1296](https://github.com/dotnet/SqlClient/pull/1296)
55+
- Disable encryption when connecting to SQL LocalDB [#1312](https://github.com/dotnet/SqlClient/pull/1312)
56+
- Avoid throwing unnecessary exception when an invalid SqlNotificationInfo value is received from SQL Server [#1378](https://github.com/dotnet/SqlClient/pull/1378)
57+
- Updated `Microsoft.Data.SqlClient.SNI` (.NET Framework dependency) and `Microsoft.Data.SqlClient.SNI.runtime` (.NET Core/Standard dependency) version to `v4.0.0` [#1391](https://github.com/dotnet/SqlClient/pull/1391)
58+
- Various code health and performance improvements. See [milestone](https://github.com/dotnet/SqlClient/milestone/31?closed=1) for more info.
59+
60+
### Breaking Changes
61+
- 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)
62+
- The driver now throws `SqlException` replacing `AggregateException` for active directory authentication modes. [#1213](https://github.com/dotnet/SqlClient/pull/1213)
63+
- Dropped obsolete `Asynchronous Processing` connection property from .NET Framework. [#1148](https://github.com/dotnet/SqlClient/pull/1148)
64+
- Removed `Configurable Retry Logic` safety switch. [#1254](https://github.com/dotnet/SqlClient/pull/1254) [Read more](#remove-configurable-retry-logic-safety-switch)
65+
- Dropped support for .NET Core 2.1 [#1272](https://github.com/dotnet/SqlClient/pull/1272)
66+
- [.NET Framework] Exception will not be thrown if a User ID is provided in the connection string when using `Active Directory Integrated` authentication [#1359](https://github.com/dotnet/SqlClient/pull/1359)
67+
68+
### Encrypt default value set to true
69+
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.
70+
71+
### Ensure connections fail when encryption is required
72+
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.
73+
74+
### App Context Switch for using System default protocols
75+
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 the Operating System's client protocols, by enabling the App Context switch below:
76+
77+
`Switch.Microsoft.Data.SqlClient.UseSystemDefaultSecureProtocols`
78+
79+
### Enable optimized parameter binding
80+
Microsoft.Data.SqlClient introduces a new `SqlCommand` API, `EnableOptimizedParameterBinding` to improve performance of queries with a 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.
81+
82+
```cs
83+
public class SqlCommand
84+
{
85+
public bool EnableOptimizedParameterBinding { get; set; }
86+
}
87+
```
88+
89+
### Remove configurable retry logic safety switch
90+
91+
The App Context switch "Switch.Microsoft.Data.SqlClient.EnableRetryLogic" will no longer be required to use the configurable retry logic feature. The feature is now supported in production. The default behavior of the feature will continue to be a non-retry policy, which will need to be overridden by client applications to enable retries.
92+
93+
### SqlLocalDb shared instance support
94+
95+
SqlLocalDb shared instances are now supported when using Managed SNI.
96+
97+
- Possible scenarios:
98+
- `(localdb)\.` (connects to default instance of SqlLocalDb)
99+
- `(localdb)\<named instance>`
100+
- `(localdb)\.\<shared instance name>` (*newly added support)
101+
102+
### `GetFieldValueAsync<T>` and `GetFieldValue<T>` support for `XmlReader`, `TextReader`, `Stream` types
103+
104+
`XmlReader`, `TextReader`, `Stream` types are now supported when using `GetFieldValueAsync<T>` and `GetFieldValue<T>`.
105+
106+
Example usage:
107+
108+
```cs
109+
using (SqlConnection connection = new SqlConnection(connectionString))
110+
{
111+
using (SqlCommand command = new SqlCommand(query, connection))
112+
{
113+
connection.Open();
114+
using (SqlDataReader reader = await command.ExecuteReaderAsync())
115+
{
116+
if (await reader.ReadAsync())
117+
{
118+
using (Stream stream = await reader.GetFieldValueAsync<Stream>(1))
119+
{
120+
// Continue to read from stream
121+
}
122+
}
123+
}
124+
}
125+
}
126+
```
127+
128+
## Target Platform Support
129+
130+
- .NET Framework 4.6.1+ (Windows x86, Windows x64)
131+
- .NET Core 3.1+ (Windows x86, Windows x64, Windows ARM64, Windows ARM, Linux, macOS)
132+
- .NET Standard 2.0+ (Windows x86, Windows x64, Windows ARM64, Windows ARM, Linux, macOS)
133+
134+
### Dependencies
135+
136+
#### .NET Framework
137+
138+
- Microsoft.Data.SqlClient.SNI 4.0.0
139+
- Azure.Identity 1.3.0
140+
- Microsoft.Identity.Client 4.22.0
141+
- Microsoft.IdentityModel.JsonWebTokens 6.8.0
142+
- Microsoft.IdentityModel.Protocols.OpenIdConnect 6.8.0
143+
- System.Buffers 4.5.1
144+
- System.Configuration.ConfigurationManager 5.0.0
145+
- System.IO 4.3.0
146+
- System.Runtime.InteropServices.RuntimeInformation 4.3.0
147+
- System.Security.Cryptography.Algorithms 4.3.1
148+
- System.Security.Cryptography.Primitives 4.3.0
149+
- System.Text.Encodings.Web 4.7.2
150+
151+
#### .NET Core
152+
153+
- Microsoft.Data.SqlClient.SNI.runtime 4.0.0
154+
- Azure.Identity 1.3.0
155+
- Microsoft.Identity.Client 4.22.0
156+
- Microsoft.IdentityModel.Protocols.OpenIdConnect 6.8.0
157+
- Microsoft.IdentityModel.JsonWebTokens 6.8.0
158+
- Microsoft.Win32.Registry 5.0.0
159+
- System.Buffers 4.5.1
160+
- System.Configuration.ConfigurationManager 5.0.0
161+
- System.Diagnostics.DiagnosticSource 5.0.0
162+
- System.IO 4.3.0
163+
- System.Runtime.Caching 5.0.0
164+
- System.Text.Encoding.CodePages 5.0.0
165+
- System.Text.Encodings.Web 4.7.2
166+
- System.Resources.ResourceManager 4.3.0
167+
- System.Security.Cryptography.Cng 5.0.0
168+
- System.Security.Principal.Windows 5.0.0
169+
170+
#### .NET Standard
171+
172+
- Microsoft.Data.SqlClient.SNI.runtime 4.0.0
173+
- Azure.Identity 1.3.0
174+
- Microsoft.Identity.Client 4.22.0
175+
- Microsoft.IdentityModel.Protocols.OpenIdConnect 6.8.0
176+
- Microsoft.IdentityModel.JsonWebTokens 6.8.0
177+
- Microsoft.Win32.Registry 5.0.0
178+
- System.Buffers 4.5.1
179+
- System.Configuration.ConfigurationManager 5.0.0
180+
- System.IO 4.3.0
181+
- System.Runtime.Caching 5.0.0
182+
- System.Text.Encoding.CodePages 5.0.0
183+
- System.Text.Encodings.Web 4.7.2
184+
- System.Resources.ResourceManager 4.3.0
185+
- System.Runtime.Loader 4.3.0
186+
- System.Security.Cryptography.Cng 5.0.0
187+
- System.Security.Principal.Windows 5.0.0

release-notes/4.0/4.0.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# Microsoft.Data.SqlClient 4.0 Releases
22

3+
The following Microsoft.Data.SqlClient 4.0 stable releases have been shipped:
4+
5+
| Release Date | Version | Notes |
6+
| :-- | :-- | :--: |
7+
| 2021/11/18 | 4.0.0 | [release notes](4.0.0.md) |
8+
39
The following Microsoft.Data.SqlClient 4.0 preview releases have been shipped:
410

511
| Release Date | Version | Notes |

release-notes/4.0/README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# Microsoft.Data.SqlClient 4.0 Releases
22

3+
The following Microsoft.Data.SqlClient 4.0 stable releases have been shipped:
4+
5+
| Release Date | Version | Notes |
6+
| :-- | :-- | :--: |
7+
| 2021/11/18 | 4.0.0 | [release notes](4.0.0.md) |
8+
39
The following Microsoft.Data.SqlClient 4.0 preview releases have been shipped:
410

511
| Release Date | Version | Notes |

release-notes/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Microsoft.Data.SqlClient Release Notes
22

3-
The latest stable release is [Microsoft.Data.SqlClient 3.0](3.0).
3+
The latest stable release is [Microsoft.Data.SqlClient 4.0](4.0).
44

55
## Release Information
66

0 commit comments

Comments
 (0)