Skip to content

Commit 4d787cb

Browse files
committed
Merge branch 'main' into feat/assemblyloadcontext-1687/sniloadhandle
2 parents c68f161 + 37dde3f commit 4d787cb

38 files changed

+4623
-6596
lines changed

CHANGELOG.md

Lines changed: 109 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -88,31 +88,6 @@ This update brings the following changes since [7.0.0-preview1.25257.1]
8888
- Updated `System.Security.Cryptography.Pkcs` to v9.0.9 (net9)
8989
- Updated `System.Text.Json` to v8.0.6 (net8), v9.0.9 (net9)
9090

91-
## [Stable Release 6.1.2] - 2025-10-07
92-
93-
This update brings the below changes over the previous stable release:
94-
95-
### Fixed
96-
97-
- Fixed an issue where initializing PerformanceCounters would throw `System.InvalidOperationException` [#3629](https://github.com/dotnet/sqlclient/pull/3629)
98-
- Fixed an issue where a Custom SqlClientAuthenticationProvider was being overwritten by default implementation. [#3651](https://github.com/dotnet/SqlClient/pull/3651)
99-
- Fixed a concurrency issue in connection pooling where the number of active connections could be lower than the configured maximum pool size. [#3653](https://github.com/dotnet/SqlClient/pull/3653)
100-
101-
## [Stable release 6.0.3] - 2025-10-07
102-
103-
This update brings the below changes over the previous stable release:
104-
105-
### Fixed
106-
107-
- Fixed an issue where a Custom SqlClientAuthenticationProvider was being overwritten by default implementation. [#3652](https://github.com/dotnet/SqlClient/pull/3652)
108-
- Fixed a concurrency issue in connection pooling where the number of active connections could be lower than the configured maximum pool size. [#3654](https://github.com/dotnet/SqlClient/pull/3654)
109-
110-
### Changed
111-
112-
- Updated MSAL usage as per code compliance requirements [#3360](https://github.com/dotnet/SqlClient/pull/3360)
113-
- Updated `SqlDecimal` implementation to improve code compliance [#3466](https://github.com/dotnet/SqlClient/pull/3466)
114-
- Updated Azure.Identity and related dependencies [#3553](https://github.com/dotnet/SqlClient/pull/3553)
115-
11691
## [Preview Release 7.0.0-preview1.25257.1] - 2025-09-12
11792

11893
This update brings the following changes since the [6.1.0](release-notes/6.1/6.1.0.md)
@@ -175,9 +150,53 @@ release:
175150
- Updated `Azure.Identity` dependency to v1.14.2.
176151
([#3538](https://github.com/dotnet/SqlClient/pull/3538))
177152

153+
## [Stable Release 6.1.3] - 2025-11-12
154+
155+
This update includes the following changes since the [6.1.2](release-notes/6.1/6.1.2.md) release:
156+
157+
### Added
158+
159+
#### App Context Switch for Ignoring Server-Provided Failover Partner
160+
161+
*What Changed:*
162+
163+
- 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 [#3702](https://github.com/dotnet/SqlClient/pull/3702).
164+
165+
*Who Benefits:*
166+
167+
- 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.
168+
- Teams who manage availability groups and rely on client-side control of failover behavior in heterogeneous networking environments.
169+
170+
*Impact:*
171+
172+
- 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:
173+
174+
```c#
175+
AppContext.SetSwitch("Switch.Microsoft.Data.SqlClient.IgnoreServerProvidedFailoverPartner", true);
176+
```
177+
178+
- 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.
179+
- Without enabling this, by default, the client continues to prefer the server-provided partner, maintaining backwards compatibility.
180+
181+
### Fixed
182+
183+
- Fixed an issue to ensure reliable metrics initialization during startup,
184+
preventing missed telemetry when EventSource is enabled early.
185+
([#3718](https://github.com/dotnet/SqlClient/pull/3718))
186+
187+
## [Stable Release 6.1.2] - 2025-10-07
188+
189+
This update includes the following changes since the [6.1.1](release-notes/6.1/6.1.1.md) release:
190+
191+
### Fixed
192+
193+
- Fixed an issue where initializing PerformanceCounters would throw `System.InvalidOperationException` [#3629](https://github.com/dotnet/sqlclient/pull/3629)
194+
- Fixed an issue where a Custom SqlClientAuthenticationProvider was being overwritten by default implementation. [#3651](https://github.com/dotnet/SqlClient/pull/3651)
195+
- Fixed a concurrency issue in connection pooling where the number of active connections could be lower than the configured maximum pool size. [#3653](https://github.com/dotnet/SqlClient/pull/3653)
196+
178197
## [Stable Release 6.1.1] - 2025-08-14
179198

180-
This update includes the following changes since the [6.1.0](6.1.0.md) release:
199+
This update includes the following changes since the [6.1.0](release-notes/6.1/6.1.0.md) release:
181200

182201
### Fixed
183202

@@ -440,6 +459,21 @@ This update brings the following changes over the previous release:
440459
- Code merge towards a unified SqlClient project, aligning .NET Framework and .NET Core implementations. ([#2957](https://github.com/dotnet/sqlclient/pull/2957), [#2963](https://github.com/dotnet/sqlclient/pull/2963), [#2984](https://github.com/dotnet/sqlclient/pull/2984), [#2982](https://github.com/dotnet/sqlclient/pull/2982), [#3023](https://github.com/dotnet/sqlclient/pull/3023), [#3015](https://github.com/dotnet/sqlclient/pull/3015), [#2967](https://github.com/dotnet/sqlclient/pull/2967), [#3164](https://github.com/dotnet/sqlclient/pull/3164), [#3163](https://github.com/dotnet/sqlclient/pull/3163), [#3171](https://github.com/dotnet/sqlclient/pull/3171), [#3182](https://github.com/dotnet/sqlclient/pull/3182), [#3179](https://github.com/dotnet/sqlclient/pull/3179), [#3156](https://github.com/dotnet/sqlclient/pull/3156), [#3213](https://github.com/dotnet/sqlclient/pull/3213), [#3232](https://github.com/dotnet/sqlclient/pull/3232), [#3236](https://github.com/dotnet/sqlclient/pull/3236), [#3231](https://github.com/dotnet/sqlclient/pull/3231), [#3241](https://github.com/dotnet/sqlclient/pull/3241), [#3246](https://github.com/dotnet/sqlclient/pull/3246), [#3247](https://github.com/dotnet/sqlclient/pull/3247), [#3222](https://github.com/dotnet/sqlclient/pull/3222), [#3255](https://github.com/dotnet/sqlclient/pull/3255), [#3254](https://github.com/dotnet/sqlclient/pull/3254), [#3259](https://github.com/dotnet/sqlclient/pull/3259), [#3264](https://github.com/dotnet/sqlclient/pull/3264), [#3256](https://github.com/dotnet/sqlclient/pull/3256), [#3251](https://github.com/dotnet/sqlclient/pull/3251), [#3275](https://github.com/dotnet/sqlclient/pull/3275), [#3277](https://github.com/dotnet/sqlclient/pull/3277), [#3263](https://github.com/dotnet/sqlclient/pull/3263), [#3292](https://github.com/dotnet/sqlclient/pull/3292), [#3208](https://github.com/dotnet/sqlclient/pull/3208)).
441460
- Test improvements include updates to test references, removal of hardcoded certificates, improved stability, and better coverage ([#3041](https://github.com/dotnet/sqlclient/pull/3041), [#3034](https://github.com/dotnet/sqlclient/pull/3034), [#3130](https://github.com/dotnet/sqlclient/pull/3130), [#3128](https://github.com/dotnet/sqlclient/pull/3128), [#3181](https://github.com/dotnet/sqlclient/pull/3181), [#3060](https://github.com/dotnet/sqlclient/pull/3060), [#3184](https://github.com/dotnet/sqlclient/pull/3184), [#3033](https://github.com/dotnet/sqlclient/pull/3033), [#3186](https://github.com/dotnet/sqlclient/pull/3186), [#3025](https://github.com/dotnet/sqlclient/pull/3025), [#3230](https://github.com/dotnet/sqlclient/pull/3230), [#3237](https://github.com/dotnet/sqlclient/pull/3237), [#3059](https://github.com/dotnet/sqlclient/pull/3059), [#3061](https://github.com/dotnet/sqlclient/pull/3061)).
442461

462+
## [Stable release 6.0.3] - 2025-10-07
463+
464+
This update brings the below changes over the previous stable release:
465+
466+
### Fixed
467+
468+
- Fixed an issue where a Custom SqlClientAuthenticationProvider was being overwritten by default implementation. [#3652](https://github.com/dotnet/SqlClient/pull/3652)
469+
- Fixed a concurrency issue in connection pooling where the number of active connections could be lower than the configured maximum pool size. [#3654](https://github.com/dotnet/SqlClient/pull/3654)
470+
471+
### Changed
472+
473+
- Updated MSAL usage as per code compliance requirements [#3360](https://github.com/dotnet/SqlClient/pull/3360)
474+
- Updated `SqlDecimal` implementation to improve code compliance [#3466](https://github.com/dotnet/SqlClient/pull/3466)
475+
- Updated Azure.Identity and related dependencies [#3553](https://github.com/dotnet/SqlClient/pull/3553)
476+
443477
## [Stable release 6.0.2] - 2025-04-25
444478

445479
This update brings the below changes over the previous release:
@@ -827,6 +861,55 @@ This update brings the below changes over the previous release:
827861
- Added Microsoft.SqlServer.Types to verify support for SqlHierarchyId and Spatial for .NET Core. [#1848](https://github.com/dotnet/SqlClient/pull/1848)
828862
- 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)
829863

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+
830913
## [Stable release 5.1.7] - 2025-04-25
831914

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

eng/pipelines/dotnet-sqlclient-ci-core.yml

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ parameters:
5656
- name: codeCovTargetFrameworks
5757
displayName: 'Code Coverage Target Frameworks'
5858
type: object
59-
default: [net462, net8.0]
59+
default: [net462, net8.0, net9.0]
6060

6161
- name: buildType
6262
displayName: 'Build Type'
@@ -84,6 +84,12 @@ parameters:
8484
- name: testJobTimeout
8585
type: number
8686

87+
# If true, the Always Encrypted (AE) test set will be run, which requires
88+
# Enclave-enabled SQL Server instances.
89+
- name: runAlwaysEncryptedTests
90+
type: boolean
91+
default: true
92+
8793
variables:
8894
- template: libraries/ci-build-variables.yml@self
8995

@@ -394,7 +400,9 @@ stages:
394400
LocalDbAppName: $(LocalDbAppName)
395401
LocalDbSharedInstanceName: $(LocalDbSharedInstanceName)
396402

397-
${{ if eq(variables['system.pullRequest.isFork'], 'False') }}: # only run enclave jobs if the password is available
403+
# Only run the AE tests if enable and if we have access to the necessary
404+
# secrets.
405+
${{ if and(eq(parameters.runAlwaysEncryptedTests, true), eq(variables['system.pullRequest.isFork'], 'False')) }}:
398406
windows_enclave_sql:
399407
pool: ADO-CI-AE-1ES-Pool
400408
images:
@@ -481,7 +489,9 @@ stages:
481489
LocalDbAppName: $(LocalDbAppName)
482490
LocalDbSharedInstanceName: $(LocalDbSharedInstanceName)
483491

484-
${{ if eq(variables['system.pullRequest.isFork'], 'False') }}: # only run enclave jobs if the password is available
492+
# Only run the AE tests if enable and if we have access to the necessary
493+
# secrets.
494+
${{ if and(eq(parameters.runAlwaysEncryptedTests, true), eq(variables['system.pullRequest.isFork'], 'False')) }}:
485495
linux_enclave_sql:
486496
pool: ADO-CI-AE-1ES-Pool
487497
images:

eng/pipelines/dotnet-sqlclient-ci-package-reference-pipeline.yml

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,13 @@
1111
# - Microsoft.Data.SqlClient
1212
# - Microsoft.Data.SqlClient.AlwaysEncrypted.AzureKeyVaultProvider
1313
#
14-
# It runs via CI push triggers and schedules:
14+
# It runs via CI push triggers and schedules and uses the Release build
15+
# configuration:
1516
#
1617
# - Commits to GitHub main
1718
# - Commits to ADO internal/main
18-
# - Weekdays at 01:00 UTC on GitHub main
19-
# - Thursdays at 03:00 UTC on ADO internal/main
19+
# - Weekdays at 03:00 UTC on GitHub main
20+
# - Thursdays at 07:00 UTC on ADO internal/main
2021
#
2122
# GOTCHA: This pipeline definition is triggered by GitHub _and_ ADO CI. We are
2223
# able to define different triggers and schedules using branch filters:
@@ -45,7 +46,8 @@ name: $(DayOfYear)$(Rev:rr)
4546
# Trigger this pipeline on commits to certain branches.
4647
trigger:
4748

48-
# Don't trigger a new run until the previous one completes.
49+
# Don't trigger a new run until the previous one completes. This may cause
50+
# multiple commits to be batched into a single run.
4951
batch: true
5052

5153
branches:
@@ -60,8 +62,9 @@ trigger:
6062
include:
6163
- .azuredevops
6264
- .config
63-
- src
65+
- doc
6466
- eng
67+
- src
6568
- tools
6669
- azurepipelines-coverage.yml
6770
- build.proj
@@ -72,15 +75,15 @@ schedules:
7275

7376
# GitHub main on weekdays
7477
- cron: '0 3 * * Mon-Fri'
75-
displayName: Weekday Release Build
78+
displayName: Weekday Run (Release Config)
7679
branches:
7780
include:
7881
- main
7982
always: true
8083

8184
# ADO internal/main on Thursdays.
82-
- cron: '0 5 * * Thu'
83-
displayName: Thursday Release Build
85+
- cron: '0 7 * * Thu'
86+
displayName: Thursday Run (Release Config)
8487
branches:
8588
include:
8689
- internal/main
@@ -162,10 +165,10 @@ extends:
162165
# specified. We choose different values depending on the build
163166
# configuration.
164167
${{ if eq(parameters.testJobTimeout, 'Default') }}:
165-
# If the build configuration is Debug, double the test job timeout value.
166-
# Some of our tests currently take much longer to run in Debug mode.
168+
# If the build configuration is Debug, we allow a bit of extra time since
169+
# some tests run more slowly, and some tests are Debug only.
167170
${{ if eq(parameters.buildConfiguration, 'Debug') }}:
168-
testJobTimeout: 180
171+
testJobTimeout: 110
169172
${{ else }}:
170173
testJobTimeout: 90
171174
${{ else }}:

eng/pipelines/dotnet-sqlclient-ci-project-reference-pipeline.yml

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,13 @@
1111
# - Microsoft.Data.SqlClient
1212
# - Microsoft.Data.SqlClient.AlwaysEncrypted.AzureKeyVaultProvider
1313
#
14-
# It runs via CI push triggers and schedules:
14+
# It runs via CI push triggers and schedules and uses the Release build
15+
# configuration:
1516
#
1617
# - Commits to GitHub main
1718
# - Commits to ADO internal/main
1819
# - Weekdays at 01:00 UTC on GitHub main
19-
# - Thursdays at 03:00 UTC on ADO internal/main
20+
# - Thursdays at 05:00 UTC on ADO internal/main
2021
#
2122
# GOTCHA: This pipeline definition is triggered by GitHub _and_ ADO CI. We are
2223
# able to define different triggers and schedules using branch filters:
@@ -45,7 +46,8 @@ name: $(DayOfYear)$(Rev:rr)
4546
# Trigger this pipeline on commits to certain branches.
4647
trigger:
4748

48-
# Don't trigger a new run until the previous one completes.
49+
# Don't trigger a new run until the previous one completes. This may cause
50+
# multiple commits to be batched into a single run.
4951
batch: true
5052

5153
branches:
@@ -60,8 +62,9 @@ trigger:
6062
include:
6163
- .azuredevops
6264
- .config
63-
- src
65+
- doc
6466
- eng
67+
- src
6568
- tools
6669
- azurepipelines-coverage.yml
6770
- build.proj
@@ -72,15 +75,15 @@ schedules:
7275

7376
# GitHub main on weekdays
7477
- cron: '0 1 * * Mon-Fri'
75-
displayName: Weekday Release Build
78+
displayName: Weekday Run (Release Config)
7679
branches:
7780
include:
7881
- main
7982
always: true
8083

8184
# ADO internal/main on Thursdays.
82-
- cron: '0 3 * * Thu'
83-
displayName: Thursday Release Build
85+
- cron: '0 5 * * Thu'
86+
displayName: Thursday Run (Release Config)
8487
branches:
8588
include:
8689
- internal/main
@@ -151,7 +154,7 @@ extends:
151154
parameters:
152155
buildConfiguration: ${{ parameters.buildConfiguration }}
153156
buildPlatforms: ${{ parameters.buildPlatforms }}
154-
buildType: Package
157+
buildType: Project
155158
codeCovTargetFrameworks: ${{ parameters.codeCovTargetFrameworks }}
156159
debug: ${{ parameters.debug }}
157160
enableStressTests: ${{ parameters.enableStressTests }}
@@ -162,10 +165,10 @@ extends:
162165
# specified. We choose different values depending on the build
163166
# configuration.
164167
${{ if eq(parameters.testJobTimeout, 'Default') }}:
165-
# If the build configuration is Debug, double the test job timeout value.
166-
# Some of our tests currently take much longer to run in Debug mode.
168+
# If the build configuration is Debug, we allow a bit of extra time since
169+
# some tests run more slowly, and some tests are Debug only.
167170
${{ if eq(parameters.buildConfiguration, 'Debug') }}:
168-
testJobTimeout: 180
171+
testJobTimeout: 110
169172
${{ else }}:
170173
testJobTimeout: 90
171174
${{ else }}:

0 commit comments

Comments
 (0)