From f1cfa655cfe9b896cb1ab4bfb0001d0f87887774 Mon Sep 17 00:00:00 2001 From: Johnny Pham Date: Mon, 15 Nov 2021 10:26:46 -0800 Subject: [PATCH 01/12] 4.0 release notes --- release-notes/4.0/4.0.0.md | 189 ++++++++++++++++++++++++++++++++++++ release-notes/4.0/4.0.md | 6 ++ release-notes/4.0/README.md | 6 ++ release-notes/README.md | 2 +- 4 files changed, 202 insertions(+), 1 deletion(-) create mode 100644 release-notes/4.0/4.0.0.md diff --git a/release-notes/4.0/4.0.0.md b/release-notes/4.0/4.0.0.md new file mode 100644 index 0000000000..8eb3f9f1d7 --- /dev/null +++ b/release-notes/4.0/4.0.0.md @@ -0,0 +1,189 @@ +# Release Notes + +## Microsoft.Data.SqlClient 4.0.0 released 18 November 2021 + +This update brings the below changes over the previous preview release: + + + + + +## Summary of changes in 4.0 + +All changes in Microsoft.Data.SqlClient v4.0 over v3.0: + +### New Additions +- 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) +- Included `42108` and `42109` error codes to retriable transient errors list. [#1215](https://github.com/dotnet/SqlClient/pull/1215) +- 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) +- Added `PoolBlockingPeriod` connection property support in .NET Standard. [#1181](https://github.com/dotnet/SqlClient/pull/1181) +- Added support for `SqlDataReader.GetColumnSchema()` in .NET Standard. [#1181](https://github.com/dotnet/SqlClient/pull/1181) +- Added PropertyGrid support with component model annotations to `SqlConnectionStringBuilder` properties for .NET Core. [#1152](https://github.com/dotnet/SqlClient/pull/1152) +- Added support for `SqlFileStream` on Windows using .NET Standard 2.0 and above. [#1240](https://github.com/dotnet/SqlClient/pull/1240) +- Added support for **localdb** `shared instance` using managed SNI. [#1237](https://github.com/dotnet/SqlClient/pull/1237) [Read more](#sqllocaldb-shared-instance-support) +- Add `GetFieldValueAsync` and `GetFieldValue` support for `XmlReader`, `TextReader`, `Stream` [#1019](https://github.com/dotnet/SqlClient/pull/1019). [Read more](#getfieldvalueasynct-and-getfieldvaluet-support-for-xmlreader-textreader-stream-types) + +### Bug Fixes +- Fixed issue with connectivity when TLS 1.3 is enabled on client and server. [#1168](https://github.com/dotnet/SqlClient/pull/1168) +- 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) +- Fixed issue where connection goes to unusable state. [#1128](https://github.com/dotnet/SqlClient/pull/1128) +- Fixed recursive calls to `RetryLogicProvider` when calling `SqlCommand.ExecuteScalarAsync`. [#1220](https://github.com/dotnet/SqlClient/pull/1220) +- Fixed async deadlock scenarios in web contexts with configurable retry logic provider. [#1220](https://github.com/dotnet/SqlClient/pull/1220) +- Fixed `EntryPointNotFoundException` in `InOutOfProcHelper` constructor. [#1120](https://github.com/dotnet/SqlClient/pull/1120) +- Fixed async thread blocking issues on `SqlConnection.Open()` for active directory authentication modes. [#1213](https://github.com/dotnet/SqlClient/pull/1213) +- 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) +- Fixed bug with `LegacyRowVersionNullBehavior` App Context switch. [#1182](https://github.com/dotnet/SqlClient/pull/1182) +- 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) +- Fixed `.NET decimal` conversion from `SqlDecimal`. [#1179](https://github.com/dotnet/SqlClient/pull/1179) +- 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) +- Fixed command's async cancellation. [#956](https://github.com/dotnet/SqlClient/pull/956) +- Fixed deadlock in transaction using .NET Framework. [#1242](https://github.com/dotnet/SqlClient/pull/1242) +- Fixed unknown transaction state issues when prompting delegated transaction. [1216](https://github.com/dotnet/SqlClient/pull/1216) +- Fixed `FormatException` when opening a connection with event tracing enabled [#1291](https://github.com/dotnet/SqlClient/pull/1291) +- Fixed improper initialization of `ActiveDirectoryAuthenticationProvider` [#1328](https://github.com/dotnet/SqlClient/pull/1328) +- Fixed `MissingMethodException` when accessing `SqlAuthenticationParameters.ConnectionTimeout` [#1336](https://github.com/dotnet/SqlClient/pull/1336) +- Fixed data corruption issues by reverting changes to async cancellations [#1352](https://github.com/dotnet/SqlClient/pull/1352) +- Fixed performance degradation by reverting changes to MARS state machine [#1357](https://github.com/dotnet/SqlClient/pull/1357) +- Fixed bug where environment variables are ignored when using `Active Directory Default` authentication [#1360](https://github.com/dotnet/SqlClient/pull/1360) + +### Improvements and Changes +- Updated error code to match with Windows when certificate validation fails in non-Windows client environments. [#1130](https://github.com/dotnet/SqlClient/pull/1130) +- Removed designer attributes from `SqlCommand` and `SqlDataAdapter`. [#1132](https://github.com/dotnet/SqlClient/pull/1132) +- Updated configurable retry logic default retriable error list. [#1125](https://github.com/dotnet/SqlClient/pull/1125) +- Improved performance by changing `SqlParameter` bool fields to flags. [#1064](https://github.com/dotnet/SqlClient/pull/1064) +- Improved performance by implementing static delegates. [#1060](https://github.com/dotnet/SqlClient/pull/1060) +- Optimized async method allocations in .NET Framework by porting changes from .NET Core. [#1084](https://github.com/dotnet/SqlClient/pull/1084) +- 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) +- Various code improvements [#1155](https://github.com/dotnet/SqlClient/pull/1155) [#1236](https://github.com/dotnet/SqlClient/pull/1236) [#1251](https://github.com/dotnet/SqlClient/pull/1251) [#1266](https://github.com/dotnet/SqlClient/pull/1266) +- 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) +- Disable encryption when connecting to SQL LocalDB [#1312](https://github.com/dotnet/SqlClient/pull/1312) +- Various code health and performance improvements. See [milestone](https://github.com/dotnet/SqlClient/milestone/31?closed=1) for more info. + +### Breaking Changes +- 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) +- The driver now throws `SqlException` replacing `AggregateException` for active directory authentication modes. [#1213](https://github.com/dotnet/SqlClient/pull/1213) +- Dropped obsolete `Asynchronous Processing` connection property from .NET Framework. [#1148](https://github.com/dotnet/SqlClient/pull/1148) +- Removed `Configurable Retry Logic` safety switch. [#1254](https://github.com/dotnet/SqlClient/pull/1254) [Read more](#remove-configurable-retry-logic-safety-switch) +- - Dropped support for .NET Core 2.1 [#1272](https://github.com/dotnet/SqlClient/pull/1272) +- [.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) +- +### Encrypt default value set to true +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. + +### Ensure connections fail when encryption is required +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. + +### App Context Switch for using System default protocols +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: + + `Switch.Microsoft.Data.SqlClient.UseSystemDefaultSecureProtocols` + +### Enable optimized parameter binding +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. + +```cs +public class SqlCommand +{ + public bool EnableOptimizedParameterBinding { get; set; } +} +``` + +### Remove configurable retry logic safety switch + +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. + +### SqlLocalDb shared instance support + +SqlLocalDb shared instances are now supported when using Managed SNI. + +- Possible scenarios: + - `(localdb)\.` (connects to default instance of SqlLocalDb) + - `(localdb)\` + - `(localdb)\.\` (*newly added support) + +### `GetFieldValueAsync` and `GetFieldValue` support for `XmlReader`, `TextReader`, `Stream` types + +`XmlReader`, `TextReader`, `Stream` types are now supported when using `GetFieldValueAsync` and `GetFieldValue`. + +Example usage: + +```cs +using (SqlConnection connection = new SqlConnection(connectionString)) +{ + using (SqlCommand command = new SqlCommand(query, connection)) + { + connection.Open(); + using (SqlDataReader reader = await command.ExecuteReaderAsync()) + { + if (await reader.ReadAsync()) + { + using (Stream stream = await reader.GetFieldValueAsync(1)) + { + // Continue to read from stream + } + } + } + } +} +``` + +## Target Platform Support + +- .NET Framework 4.6.1+ (Windows x86, Windows x64) +- .NET Core 3.1+ (Windows x86, Windows x64, Windows ARM64, Windows ARM, Linux, macOS) +- .NET Standard 2.0+ (Windows x86, Windows x64, Windows ARM64, Windows ARM, Linux, macOS) + +### Dependencies + +#### .NET Framework + +- Microsoft.Data.SqlClient.SNI 4.0.0-preview1.21232.1 +- Azure.Identity 1.3.0 +- Microsoft.Identity.Client 4.22.0 +- Microsoft.IdentityModel.JsonWebTokens 6.8.0 +- Microsoft.IdentityModel.Protocols.OpenIdConnect 6.8.0 +- System.Buffers 4.5.1 +- System.Configuration.ConfigurationManager 5.0.0 +- System.IO 4.3.0 +- System.Runtime.InteropServices.RuntimeInformation 4.3.0 +- System.Security.Cryptography.Algorithms 4.3.1 +- System.Security.Cryptography.Primitives 4.3.0 +- System.Text.Encodings.Web 4.7.2 + +#### .NET Core + +- Microsoft.Data.SqlClient.SNI.runtime 4.0.0-preview1.21232.1 +- Azure.Identity 1.3.0 +- Microsoft.Identity.Client 4.22.0 +- Microsoft.IdentityModel.Protocols.OpenIdConnect 6.8.0 +- Microsoft.IdentityModel.JsonWebTokens 6.8.0 +- Microsoft.Win32.Registry 5.0.0 +- System.Buffers 4.5.1 +- System.Configuration.ConfigurationManager 5.0.0 +- System.Diagnostics.DiagnosticSource 5.0.0 +- System.IO 4.3.0 +- System.Runtime.Caching 5.0.0 +- System.Text.Encoding.CodePages 5.0.0 +- System.Text.Encodings.Web 4.7.2 +- System.Resources.ResourceManager 4.3.0 +- System.Security.Cryptography.Cng 5.0.0 +- System.Security.Principal.Windows 5.0.0 + +#### .NET Standard + +- Microsoft.Data.SqlClient.SNI.runtime 4.0.0-preview1.21232.1 +- Azure.Identity 1.3.0 +- Microsoft.Identity.Client 4.22.0 +- Microsoft.IdentityModel.Protocols.OpenIdConnect 6.8.0 +- Microsoft.IdentityModel.JsonWebTokens 6.8.0 +- Microsoft.Win32.Registry 5.0.0 +- System.Buffers 4.5.1 +- System.Configuration.ConfigurationManager 5.0.0 +- System.IO 4.3.0 +- System.Runtime.Caching 5.0.0 +- System.Text.Encoding.CodePages 5.0.0 +- System.Text.Encodings.Web 4.7.2 +- System.Resources.ResourceManager 4.3.0 +- System.Runtime.Loader 4.3.0 +- System.Security.Cryptography.Cng 5.0.0 +- System.Security.Principal.Windows 5.0.0 diff --git a/release-notes/4.0/4.0.md b/release-notes/4.0/4.0.md index d9f8ceac96..74b5e8f776 100644 --- a/release-notes/4.0/4.0.md +++ b/release-notes/4.0/4.0.md @@ -1,5 +1,11 @@ # Microsoft.Data.SqlClient 4.0 Releases +The following Microsoft.Data.SqlClient 4.0 stable releases have been shipped: + +| Release Date | Version | Notes | +| :-- | :-- | :--: | +| 2021/11/18 | 4.0.0 | [release notes](4.0.0.md) | + The following Microsoft.Data.SqlClient 4.0 preview releases have been shipped: | Release Date | Version | Notes | diff --git a/release-notes/4.0/README.md b/release-notes/4.0/README.md index d9f8ceac96..dfd80be23f 100644 --- a/release-notes/4.0/README.md +++ b/release-notes/4.0/README.md @@ -1,5 +1,11 @@ # Microsoft.Data.SqlClient 4.0 Releases +The following Microsoft.Data.SqlClient 3.0 stable releases have been shipped: + +| Release Date | Version | Notes | +| :-- | :-- | :--: | +| 2021/11/18 | 4.0.0 | [release notes](4.0.0.md) | + The following Microsoft.Data.SqlClient 4.0 preview releases have been shipped: | Release Date | Version | Notes | diff --git a/release-notes/README.md b/release-notes/README.md index 4340d7838e..ae992b42c4 100644 --- a/release-notes/README.md +++ b/release-notes/README.md @@ -1,6 +1,6 @@ # Microsoft.Data.SqlClient Release Notes -The latest stable release is [Microsoft.Data.SqlClient 3.0](3.0). +The latest stable release is [Microsoft.Data.SqlClient 4.0](4.0). ## Release Information From 259079c06e26b1a970207082b09848722f8236cd Mon Sep 17 00:00:00 2001 From: Johnny Pham Date: Mon, 15 Nov 2021 14:51:45 -0800 Subject: [PATCH 02/12] Update 4.0.0.md --- release-notes/4.0/4.0.0.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/release-notes/4.0/4.0.0.md b/release-notes/4.0/4.0.0.md index 8eb3f9f1d7..d3c0cfb172 100644 --- a/release-notes/4.0/4.0.0.md +++ b/release-notes/4.0/4.0.0.md @@ -15,12 +15,12 @@ All changes in Microsoft.Data.SqlClient v4.0 over v3.0: ### New Additions - 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) - Included `42108` and `42109` error codes to retriable transient errors list. [#1215](https://github.com/dotnet/SqlClient/pull/1215) -- 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) +- 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) - Added `PoolBlockingPeriod` connection property support in .NET Standard. [#1181](https://github.com/dotnet/SqlClient/pull/1181) - Added support for `SqlDataReader.GetColumnSchema()` in .NET Standard. [#1181](https://github.com/dotnet/SqlClient/pull/1181) - Added PropertyGrid support with component model annotations to `SqlConnectionStringBuilder` properties for .NET Core. [#1152](https://github.com/dotnet/SqlClient/pull/1152) - Added support for `SqlFileStream` on Windows using .NET Standard 2.0 and above. [#1240](https://github.com/dotnet/SqlClient/pull/1240) -- Added support for **localdb** `shared instance` using managed SNI. [#1237](https://github.com/dotnet/SqlClient/pull/1237) [Read more](#sqllocaldb-shared-instance-support) +- Added support for **localdb** `shared instance` using managed SNI. [#1237](https://github.com/dotnet/SqlClient/pull/1237). [Read more](#sqllocaldb-shared-instance-support) - Add `GetFieldValueAsync` and `GetFieldValue` support for `XmlReader`, `TextReader`, `Stream` [#1019](https://github.com/dotnet/SqlClient/pull/1019). [Read more](#getfieldvalueasynct-and-getfieldvaluet-support-for-xmlreader-textreader-stream-types) ### Bug Fixes @@ -64,9 +64,9 @@ All changes in Microsoft.Data.SqlClient v4.0 over v3.0: - The driver now throws `SqlException` replacing `AggregateException` for active directory authentication modes. [#1213](https://github.com/dotnet/SqlClient/pull/1213) - Dropped obsolete `Asynchronous Processing` connection property from .NET Framework. [#1148](https://github.com/dotnet/SqlClient/pull/1148) - Removed `Configurable Retry Logic` safety switch. [#1254](https://github.com/dotnet/SqlClient/pull/1254) [Read more](#remove-configurable-retry-logic-safety-switch) -- - Dropped support for .NET Core 2.1 [#1272](https://github.com/dotnet/SqlClient/pull/1272) +- Dropped support for .NET Core 2.1 [#1272](https://github.com/dotnet/SqlClient/pull/1272) - [.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) -- + ### Encrypt default value set to true 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. From 66e920b54f9620dd014681b86620fa3b138bf3fc Mon Sep 17 00:00:00 2001 From: Johnny Pham Date: Tue, 16 Nov 2021 16:25:41 -0800 Subject: [PATCH 03/12] Update 4.0.0.md --- release-notes/4.0/4.0.0.md | 4 ---- 1 file changed, 4 deletions(-) diff --git a/release-notes/4.0/4.0.0.md b/release-notes/4.0/4.0.0.md index d3c0cfb172..f2e22062b0 100644 --- a/release-notes/4.0/4.0.0.md +++ b/release-notes/4.0/4.0.0.md @@ -4,10 +4,6 @@ This update brings the below changes over the previous preview release: - - - - ## Summary of changes in 4.0 All changes in Microsoft.Data.SqlClient v4.0 over v3.0: From 3e586d613240df4b022093e0b568c0bece48d24e Mon Sep 17 00:00:00 2001 From: Johnny Pham Date: Tue, 16 Nov 2021 16:27:36 -0800 Subject: [PATCH 04/12] Update 4.0.0.md --- release-notes/4.0/4.0.0.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/release-notes/4.0/4.0.0.md b/release-notes/4.0/4.0.0.md index f2e22062b0..5a13abc1be 100644 --- a/release-notes/4.0/4.0.0.md +++ b/release-notes/4.0/4.0.0.md @@ -49,8 +49,7 @@ All changes in Microsoft.Data.SqlClient v4.0 over v3.0: - Improved performance by changing `SqlParameter` bool fields to flags. [#1064](https://github.com/dotnet/SqlClient/pull/1064) - Improved performance by implementing static delegates. [#1060](https://github.com/dotnet/SqlClient/pull/1060) - Optimized async method allocations in .NET Framework by porting changes from .NET Core. [#1084](https://github.com/dotnet/SqlClient/pull/1084) -- 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) -- Various code improvements [#1155](https://github.com/dotnet/SqlClient/pull/1155) [#1236](https://github.com/dotnet/SqlClient/pull/1236) [#1251](https://github.com/dotnet/SqlClient/pull/1251) [#1266](https://github.com/dotnet/SqlClient/pull/1266) +- 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) - 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) - Disable encryption when connecting to SQL LocalDB [#1312](https://github.com/dotnet/SqlClient/pull/1312) - Various code health and performance improvements. See [milestone](https://github.com/dotnet/SqlClient/milestone/31?closed=1) for more info. From 1b5a057fe839e3f55d7fc723396e9f0fe3f70a91 Mon Sep 17 00:00:00 2001 From: Johnny Pham Date: Tue, 16 Nov 2021 16:28:24 -0800 Subject: [PATCH 05/12] Update README.md --- release-notes/4.0/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/release-notes/4.0/README.md b/release-notes/4.0/README.md index dfd80be23f..74b5e8f776 100644 --- a/release-notes/4.0/README.md +++ b/release-notes/4.0/README.md @@ -1,6 +1,6 @@ # Microsoft.Data.SqlClient 4.0 Releases -The following Microsoft.Data.SqlClient 3.0 stable releases have been shipped: +The following Microsoft.Data.SqlClient 4.0 stable releases have been shipped: | Release Date | Version | Notes | | :-- | :-- | :--: | From 08238ee5b170e22f1718b8fb2f3888c9b9fb2961 Mon Sep 17 00:00:00 2001 From: Johnny Pham Date: Wed, 17 Nov 2021 15:51:56 -0800 Subject: [PATCH 06/12] Update 4.0.0.md --- release-notes/4.0/4.0.0.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/release-notes/4.0/4.0.0.md b/release-notes/4.0/4.0.0.md index 5a13abc1be..3f68135157 100644 --- a/release-notes/4.0/4.0.0.md +++ b/release-notes/4.0/4.0.0.md @@ -132,7 +132,7 @@ using (SqlConnection connection = new SqlConnection(connectionString)) #### .NET Framework -- Microsoft.Data.SqlClient.SNI 4.0.0-preview1.21232.1 +- Microsoft.Data.SqlClient.SNI 4.0.0 - Azure.Identity 1.3.0 - Microsoft.Identity.Client 4.22.0 - Microsoft.IdentityModel.JsonWebTokens 6.8.0 @@ -147,7 +147,7 @@ using (SqlConnection connection = new SqlConnection(connectionString)) #### .NET Core -- Microsoft.Data.SqlClient.SNI.runtime 4.0.0-preview1.21232.1 +- Microsoft.Data.SqlClient.SNI.runtime 4.0.0 - Azure.Identity 1.3.0 - Microsoft.Identity.Client 4.22.0 - Microsoft.IdentityModel.Protocols.OpenIdConnect 6.8.0 @@ -166,7 +166,7 @@ using (SqlConnection connection = new SqlConnection(connectionString)) #### .NET Standard -- Microsoft.Data.SqlClient.SNI.runtime 4.0.0-preview1.21232.1 +- Microsoft.Data.SqlClient.SNI.runtime 4.0.0 - Azure.Identity 1.3.0 - Microsoft.Identity.Client 4.22.0 - Microsoft.IdentityModel.Protocols.OpenIdConnect 6.8.0 From 24a7698efaca8c5125b2aeb255364aede94fafb5 Mon Sep 17 00:00:00 2001 From: Johnny Pham Date: Thu, 18 Nov 2021 12:03:50 -0800 Subject: [PATCH 07/12] Update release-notes/4.0/4.0.0.md Co-authored-by: David Engel --- release-notes/4.0/4.0.0.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/release-notes/4.0/4.0.0.md b/release-notes/4.0/4.0.0.md index 3f68135157..e4ade88196 100644 --- a/release-notes/4.0/4.0.0.md +++ b/release-notes/4.0/4.0.0.md @@ -74,7 +74,7 @@ TLS 1.3 is not supported by the driver; therefore, it has been removed from the `Switch.Microsoft.Data.SqlClient.UseSystemDefaultSecureProtocols` ### Enable optimized parameter binding -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. +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. ```cs public class SqlCommand From 2704035cf2c89e9795e07735a75f5170a940e764 Mon Sep 17 00:00:00 2001 From: Johnny Pham Date: Thu, 18 Nov 2021 12:03:54 -0800 Subject: [PATCH 08/12] Update release-notes/4.0/4.0.0.md Co-authored-by: David Engel --- release-notes/4.0/4.0.0.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/release-notes/4.0/4.0.0.md b/release-notes/4.0/4.0.0.md index e4ade88196..81aadae1dc 100644 --- a/release-notes/4.0/4.0.0.md +++ b/release-notes/4.0/4.0.0.md @@ -69,7 +69,7 @@ The default value of the `Encrypt` connection setting has been changed from `fal 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. ### App Context Switch for using System default protocols -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: +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: `Switch.Microsoft.Data.SqlClient.UseSystemDefaultSecureProtocols` From c83d52e419c34c02d247fd9bd649ee73bb00097e Mon Sep 17 00:00:00 2001 From: Johnny Pham Date: Thu, 18 Nov 2021 13:11:22 -0800 Subject: [PATCH 09/12] add changes --- CHANGELOG.md | 7 +++++++ release-notes/4.0/4.0.0.md | 2 ++ 2 files changed, 9 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 900703d501..9e5b426da3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,13 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) +## [Stable Release 4.0.0] - 2021-11-18 + +### Changed + +- Avoid throwing unnecessary exception when an invalid SqlNotificationInfo value is received from SQL Server [#1378](https://github.com/dotnet/SqlClient/pull/1378) +- 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) + ## [Preview Release 4.0.0-preview3.21293.2] - 2021-10-20 This update brings the below changes over the previous release: diff --git a/release-notes/4.0/4.0.0.md b/release-notes/4.0/4.0.0.md index 81aadae1dc..ec0a052f15 100644 --- a/release-notes/4.0/4.0.0.md +++ b/release-notes/4.0/4.0.0.md @@ -52,6 +52,8 @@ All changes in Microsoft.Data.SqlClient v4.0 over v3.0: - 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) - 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) - Disable encryption when connecting to SQL LocalDB [#1312](https://github.com/dotnet/SqlClient/pull/1312) +- Avoid throwing unnecessary exception when an invalid SqlNotificationInfo value is received from SQL Server [#1378](https://github.com/dotnet/SqlClient/pull/1378) +- 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) - Various code health and performance improvements. See [milestone](https://github.com/dotnet/SqlClient/milestone/31?closed=1) for more info. ### Breaking Changes From bd173ccdbdd52e129ffb9d64c1e21c6aec545b2e Mon Sep 17 00:00:00 2001 From: Johnny Pham Date: Thu, 18 Nov 2021 14:38:38 -0800 Subject: [PATCH 10/12] Update release-notes/4.0/4.0.0.md Co-authored-by: DavoudEshtehari <61173489+DavoudEshtehari@users.noreply.github.com> --- release-notes/4.0/4.0.0.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/release-notes/4.0/4.0.0.md b/release-notes/4.0/4.0.0.md index ec0a052f15..b71a03672b 100644 --- a/release-notes/4.0/4.0.0.md +++ b/release-notes/4.0/4.0.0.md @@ -70,7 +70,7 @@ The default value of the `Encrypt` connection setting has been changed from `fal ### Ensure connections fail when encryption is required 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. -### App Context Switch for using System default protocols +### App Context Switch for using System default protocols 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: `Switch.Microsoft.Data.SqlClient.UseSystemDefaultSecureProtocols` From 5135ce45a6a5cd8ebd0a93afc796012439dd7198 Mon Sep 17 00:00:00 2001 From: Johnny Pham Date: Thu, 18 Nov 2021 15:48:59 -0800 Subject: [PATCH 11/12] add SqlClientLogger changes --- CHANGELOG.md | 4 ++++ release-notes/4.0/4.0.0.md | 1 + 2 files changed, 5 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9e5b426da3..792541de8b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) ## [Stable Release 4.0.0] - 2021-11-18 +### Added + +- Add missing `SqlClientLogger` class to .NET Core refs and missing 'SqlClientLogger.LogWarning' method in .NET Framework refs [#1392](https://github.com/dotnet/SqlClient/pull/1392) + ### Changed - Avoid throwing unnecessary exception when an invalid SqlNotificationInfo value is received from SQL Server [#1378](https://github.com/dotnet/SqlClient/pull/1378) diff --git a/release-notes/4.0/4.0.0.md b/release-notes/4.0/4.0.0.md index b71a03672b..8668d63a32 100644 --- a/release-notes/4.0/4.0.0.md +++ b/release-notes/4.0/4.0.0.md @@ -18,6 +18,7 @@ All changes in Microsoft.Data.SqlClient v4.0 over v3.0: - Added support for `SqlFileStream` on Windows using .NET Standard 2.0 and above. [#1240](https://github.com/dotnet/SqlClient/pull/1240) - Added support for **localdb** `shared instance` using managed SNI. [#1237](https://github.com/dotnet/SqlClient/pull/1237). [Read more](#sqllocaldb-shared-instance-support) - Add `GetFieldValueAsync` and `GetFieldValue` support for `XmlReader`, `TextReader`, `Stream` [#1019](https://github.com/dotnet/SqlClient/pull/1019). [Read more](#getfieldvalueasynct-and-getfieldvaluet-support-for-xmlreader-textreader-stream-types) +- Add missing `SqlClientLogger` class to .NET Core refs and missing 'SqlClientLogger.LogWarning' method in .NET Framework refs [#1392](https://github.com/dotnet/SqlClient/pull/1392) ### Bug Fixes - Fixed issue with connectivity when TLS 1.3 is enabled on client and server. [#1168](https://github.com/dotnet/SqlClient/pull/1168) From e7b3e26f402e3a9b16a56c243300d0fd16c63bd8 Mon Sep 17 00:00:00 2001 From: Johnny Pham Date: Thu, 18 Nov 2021 16:15:44 -0800 Subject: [PATCH 12/12] typos --- CHANGELOG.md | 2 +- release-notes/4.0/4.0.0.md | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 792541de8b..7862b203ce 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,7 +8,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) ### Added -- Add missing `SqlClientLogger` class to .NET Core refs and missing 'SqlClientLogger.LogWarning' method in .NET Framework refs [#1392](https://github.com/dotnet/SqlClient/pull/1392) +- 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) ### Changed diff --git a/release-notes/4.0/4.0.0.md b/release-notes/4.0/4.0.0.md index 8668d63a32..3838f98938 100644 --- a/release-notes/4.0/4.0.0.md +++ b/release-notes/4.0/4.0.0.md @@ -17,8 +17,8 @@ All changes in Microsoft.Data.SqlClient v4.0 over v3.0: - Added PropertyGrid support with component model annotations to `SqlConnectionStringBuilder` properties for .NET Core. [#1152](https://github.com/dotnet/SqlClient/pull/1152) - Added support for `SqlFileStream` on Windows using .NET Standard 2.0 and above. [#1240](https://github.com/dotnet/SqlClient/pull/1240) - Added support for **localdb** `shared instance` using managed SNI. [#1237](https://github.com/dotnet/SqlClient/pull/1237). [Read more](#sqllocaldb-shared-instance-support) -- Add `GetFieldValueAsync` and `GetFieldValue` support for `XmlReader`, `TextReader`, `Stream` [#1019](https://github.com/dotnet/SqlClient/pull/1019). [Read more](#getfieldvalueasynct-and-getfieldvaluet-support-for-xmlreader-textreader-stream-types) -- Add missing `SqlClientLogger` class to .NET Core refs and missing 'SqlClientLogger.LogWarning' method in .NET Framework refs [#1392](https://github.com/dotnet/SqlClient/pull/1392) +- Added `GetFieldValueAsync` and `GetFieldValue` support for `XmlReader`, `TextReader`, `Stream` [#1019](https://github.com/dotnet/SqlClient/pull/1019). [Read more](#getfieldvalueasynct-and-getfieldvaluet-support-for-xmlreader-textreader-stream-types) +- 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) ### Bug Fixes - Fixed issue with connectivity when TLS 1.3 is enabled on client and server. [#1168](https://github.com/dotnet/SqlClient/pull/1168)