Skip to content

Commit 1f776d8

Browse files
committed
Merge branch 'main' of github.com:dotnet/SqlClient into dev/mdaigle/active-connection-count
2 parents cb03625 + ad5687e commit 1f776d8

File tree

20 files changed

+4215
-6479
lines changed

20 files changed

+4215
-6479
lines changed

CHANGELOG.md

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -861,6 +861,55 @@ This update brings the below changes over the previous release:
861861
- Added Microsoft.SqlServer.Types to verify support for SqlHierarchyId and Spatial for .NET Core. [#1848](https://github.com/dotnet/SqlClient/pull/1848)
862862
- Code health improvements:[#1943](https://github.com/dotnet/SqlClient/pull/1943)[#1949](https://github.com/dotnet/SqlClient/pull/1949)[#1198](https://github.com/dotnet/SqlClient/pull/1198)[#1829](https://github.com/dotnet/SqlClient/pull/1829)
863863

864+
## [Stable release 5.1.8] - 2025-11-14
865+
866+
This update brings the following changes since the [5.1.7](release-notes/5.1/5.1.7.md) release:
867+
868+
### Added
869+
870+
#### App Context Switch for Ignoring Server-Provided Failover Partner
871+
872+
*What Changed:*
873+
874+
- A new app context switch `Switch.Microsoft.Data.SqlClient.IgnoreServerProvidedFailoverPartner` was introduced to let the client ignore server-provided failover partner info in Basic Availability Groups (BAGs). When the switch is enabled, only the failover partner specified in the connection string is used; server-supplied partner values are skipped. This context switch was introduced in PR [#3704](https://github.com/dotnet/SqlClient/pull/3704).
875+
876+
*Who Benefits:*
877+
878+
- Applications connecting to SQL Server BAGs using TCP and custom ports, especially where the server's provided partner name lacks the protocol, host, or port. This avoids connection failures when the server-provided partner is incompatible or incomplete.
879+
- Teams who manage availability groups and rely on client-side control of failover behavior in heterogeneous networking environments.
880+
881+
*Impact:*
882+
883+
- If your environment might be affected (i.e., you operate a BAG with custom ports, or have experienced failures after failover), you can enable the new switch in your application:
884+
885+
```c#
886+
AppContext.SetSwitch("Switch.Microsoft.Data.SqlClient.IgnoreServerProvidedFailoverPartner", true);
887+
```
888+
889+
- Then, ensure your connection string includes your preferred failover partner (with correct `tcp:host,port`) so that the client uses that instead of the server's suggestion.
890+
- Without enabling this, by default, the client continues to prefer the server-provided partner, maintaining backwards compatibility.
891+
892+
### Fixed
893+
894+
- Fixed a bulk copy bug that incorrectly prepended a UTF-8 Byte-Order-Marker
895+
when processing row data.
896+
([#3617](https://github.com/dotnet/SqlClient/pull/3617))
897+
898+
### Changed
899+
900+
- Modernized creation of `Microsoft.Identity.Client.PublicClientApplication`
901+
instances to use its builder pattern.
902+
([#3367](https://github.com/dotnet/SqlClient/pull/3367))
903+
- Replaced use of undocumented .NET Framework internals when reading
904+
`SqlDecimal` values.
905+
([#3465](https://github.com/dotnet/SqlClient/pull/3465))
906+
- Updated the following dependencies
907+
([#3754](https://github.com/dotnet/SqlClient/pull/3754)):
908+
- Azure.Core 1.41.0
909+
(Avoids transitive [vulnerability](https://github.com/Azure/azure-sdk-for-net/issues/44817))
910+
- Azure.Identity 1.12.1
911+
- Microsoft.Identity.Client 4.76.0
912+
864913
## [Stable release 5.1.7] - 2025-04-25
865914

866915
This update brings the following changes since the 5.1.6 release:

release-notes/5.1/5.1.8.md

Lines changed: 126 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,126 @@
1+
# Release Notes
2+
3+
## Microsoft.Data.SqlClient 5.1.8 - November 14, 2025
4+
5+
This update brings the following changes since the [5.1.7](5.1.7.md) release:
6+
7+
### Added
8+
9+
#### App Context Switch for Ignoring Server-Provided Failover Partner
10+
11+
*What Changed:*
12+
13+
- A new app context switch `Switch.Microsoft.Data.SqlClient.IgnoreServerProvidedFailoverPartner` was introduced to let the client ignore server-provided failover partner info in Basic Availability Groups (BAGs). When the switch is enabled, only the failover partner specified in the connection string is used; server-supplied partner values are skipped. This context switch was introduced in PR [#3704](https://github.com/dotnet/SqlClient/pull/3704).
14+
15+
*Who Benefits:*
16+
17+
- Applications connecting to SQL Server BAGs using TCP and custom ports, especially where the server's provided partner name lacks the protocol, host, or port. This avoids connection failures when the server-provided partner is incompatible or incomplete.
18+
- Teams who manage availability groups and rely on client-side control of failover behavior in heterogeneous networking environments.
19+
20+
*Impact:*
21+
22+
- If your environment might be affected (i.e., you operate a BAG with custom ports, or have experienced failures after failover), you can enable the new switch in your application:
23+
24+
```c#
25+
AppContext.SetSwitch("Switch.Microsoft.Data.SqlClient.IgnoreServerProvidedFailoverPartner", true);
26+
```
27+
28+
- Then, ensure your connection string includes your preferred failover partner (with correct `tcp:host,port`) so that the client uses that instead of the server's suggestion.
29+
- Without enabling this, by default, the client continues to prefer the server-provided partner, maintaining backwards compatibility.
30+
31+
### Fixed
32+
33+
- Fixed a bulk copy bug that incorrectly prepended a UTF-8 Byte-Order-Marker
34+
when processing row data.
35+
([#3617](https://github.com/dotnet/SqlClient/pull/3617))
36+
37+
### Changed
38+
39+
- Modernized creation of `Microsoft.Identity.Client.PublicClientApplication`
40+
instances to use its builder pattern.
41+
([#3367](https://github.com/dotnet/SqlClient/pull/3367))
42+
- Replaced use of undocumented .NET Framework internals when reading
43+
`SqlDecimal` values.
44+
([#3465](https://github.com/dotnet/SqlClient/pull/3465))
45+
- Updated the following dependencies
46+
([#3754](https://github.com/dotnet/SqlClient/pull/3754)):
47+
- Azure.Core 1.41.0
48+
(Avoids transitive [vulnerability](https://github.com/Azure/azure-sdk-for-net/issues/44817))
49+
- Azure.Identity 1.12.1
50+
- Microsoft.Identity.Client 4.76.0
51+
52+
## Target Platform Support
53+
54+
- .NET Framework 4.6.2+ (Windows x86, Windows x64)
55+
- .NET 6.0+ (Windows x86, Windows x64, Windows ARM64, Windows ARM, Linux, macOS)
56+
- .NET Standard 2.0+ (Windows x86, Windows x64, Windows ARM64, Windows ARM, Linux, macOS)
57+
58+
## Dependencies
59+
60+
### .NET Framework
61+
62+
- Azure.Core 1.41.0
63+
- Azure.Identity 1.12.1
64+
- Microsoft.Data.SqlClient.SNI 5.1.2
65+
- Microsoft.Identity.Client 4.76.0
66+
- Microsoft.IdentityModel.JsonWebTokens 6.35.0
67+
- Microsoft.IdentityModel.Protocols.OpenIdConnect 6.35.0
68+
- System.Buffers 4.5.1
69+
- System.Text.Encoding.Web 6.0.1
70+
- System.Text.Json 6.0.11
71+
72+
### .NET 6.0
73+
74+
- Azure.Core 1.41.0
75+
- Azure.Identity 1.12.1
76+
- Microsoft.Data.SqlClient.SNI.runtime 5.1.2
77+
- Microsoft.Identity.Client 4.76.0
78+
- Microsoft.IdentityModel.JsonWebTokens 6.35.0
79+
- Microsoft.IdentityModel.Protocols.OpenIdConnect 6.35.0
80+
- Microsoft.SqlServer.Server 1.0.0
81+
- System.Configuration.ConfigurationManager 6.0.1
82+
- System.Diagnostics.DiagnosticSource 6.0.1
83+
- System.Runtime.Caching 6.0.0
84+
- System.Security.Permissions 6.0.0
85+
- System.Security.Principal.Windows 5.0.0
86+
- System.Text.Encoding.CodePages 6.0.0
87+
- System.Text.Encodings.Web 6.0.1
88+
89+
### .NET Standard 2.0
90+
91+
- Azure.Core 1.41.0
92+
- Azure.Identity 1.12.1
93+
- Microsoft.Data.SqlClient.SNI.runtime 5.1.2
94+
- Microsoft.Identity.Client 4.76.0
95+
- Microsoft.IdentityModel.JsonWebTokens 6.35.0
96+
- Microsoft.IdentityModel.Protocols.OpenIdConnect 6.35.0
97+
- Microsoft.SqlServer.Server 1.0.0
98+
- Microsoft.Win32.Registry 5.0.0
99+
- System.Buffers 4.5.1
100+
- System.Configuration.ConfigurationManager 6.0.1
101+
- System.Runtime.Caching 6.0.0
102+
- System.Runtime.Loader 4.3.0
103+
- System.Security.Cryptography.Cng 5.0.0
104+
- System.Security.Permissions 6.0.0
105+
- System.Security.Principal.Windows 5.0.0
106+
- System.Text.Encoding.CodePages 6.0.0
107+
- System.Text.Encodings.Web 6.0.1
108+
109+
### .NET Standard 2.1
110+
111+
- Azure.Core 1.41.0
112+
- Azure.Identity 1.12.1
113+
- Microsoft.Data.SqlClient.SNI.runtime 5.1.2
114+
- Microsoft.Identity.Client 4.76.0
115+
- Microsoft.IdentityModel.JsonWebTokens 6.35.0
116+
- Microsoft.IdentityModel.Protocols.OpenIdConnect 6.35.0
117+
- Microsoft.SqlServer.Server 1.0.0
118+
- Microsoft.Win32.Registry 5.0.0
119+
- System.Configuration.ConfigurationManager 6.0.1
120+
- System.Runtime.Caching 6.0.0
121+
- System.Runtime.Loader 4.3.0
122+
- System.Security.Cryptography.Cng 5.0.0
123+
- System.Security.Permissions 6.0.0
124+
- System.Security.Principal.Windows 5.0.0
125+
- System.Text.Encoding.CodePages 6.0.0
126+
- System.Text.Encodings.Web 6.0.1

release-notes/5.1/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ The following Microsoft.Data.SqlClient 5.1 stable releases have been shipped:
44

55
| Release Date | Version | Notes |
66
| :-- | :-- | :--: |
7+
| 2025/11/12 | 5.1.8 | [release notes](5.1.8.md) |
78
| 2025/04/25 | 5.1.7 | [release notes](5.1.7.md) |
89
| 2024/08/27 | 5.1.6 | [release notes](5.1.6.md) |
910
| 2024/01/29 | 5.1.5 | [release notes](5.1.5.md) |

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 6.0](6.0).
3+
The latest stable release is [Microsoft.Data.SqlClient 6.1](6.1).
44

55
## Release Information
66

src/Microsoft.Data.SqlClient/netcore/src/Microsoft.Data.SqlClient.csproj

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -210,6 +210,15 @@
210210
<Compile Include="$(CommonSourceRoot)Microsoft\Data\SqlClient\ColumnEncryptionKeyInfo.cs">
211211
<Link>Microsoft\Data\SqlClient\ColumnEncryptionKeyInfo.cs</Link>
212212
</Compile>
213+
<Compile Include="$(CommonSourceRoot)Microsoft\Data\SqlClient\Connection\ServerInfo.cs">
214+
<Link>Microsoft\Data\SqlClient\Connection\ServerInfo.cs</Link>
215+
</Compile>
216+
<Compile Include="$(CommonSourceRoot)Microsoft\Data\SqlClient\Connection\SessionData.cs">
217+
<Link>Microsoft\Data\SqlClient\Connection\SessionData.cs</Link>
218+
</Compile>
219+
<Compile Include="$(CommonSourceRoot)Microsoft\Data\SqlClient\Connection\SessionStateRecord.cs">
220+
<Link>Microsoft\Data\SqlClient\Connection\SessionStateRecord.cs</Link>
221+
</Compile>
213222
<Compile Include="$(CommonSourceRoot)Microsoft\Data\SqlClient\DataClassification\SensitivityClassification.cs">
214223
<Link>Microsoft\Data\SqlClient\DataClassification\SensitivityClassification.cs</Link>
215224
</Compile>
@@ -693,6 +702,9 @@
693702
<Compile Include="$(CommonSourceRoot)Microsoft\Data\SqlClient\SqlInternalConnection.cs">
694703
<Link>Microsoft\Data\SqlClient\SqlInternalConnection.cs</Link>
695704
</Compile>
705+
<Compile Include="$(CommonSourceRoot)Microsoft\Data\SqlClient\SqlInternalConnectionTds.cs">
706+
<Link>Microsoft\Data\SqlClient\SqlInternalConnectionTds.cs</Link>
707+
</Compile>
696708
<Compile Include="$(CommonSourceRoot)Microsoft\Data\SqlClient\SqlInternalTransaction.cs">
697709
<Link>Microsoft\Data\SqlClient\SqlInternalTransaction.cs</Link>
698710
</Compile>
@@ -849,8 +861,6 @@
849861
<Compile Include="$(CommonSourceRoot)System\Diagnostics\CodeAnalysis.cs">
850862
<Link>System\Diagnostics\CodeAnalysis.cs</Link>
851863
</Compile>
852-
853-
<Compile Include="Microsoft\Data\SqlClient\SqlInternalConnectionTds.cs" />
854864
<Compile Include="Microsoft.Data.SqlClient.TypeForwards.cs" />
855865
</ItemGroup>
856866

0 commit comments

Comments
 (0)