Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
175 commits
Select commit Hold shift + click to select a range
564e0db
Fix async cancellation failing to send TDS attention signal
cheenamalhotra Jul 9, 2026
71d63e3
Add manual test for async cancellation with partial results
cheenamalhotra Jul 9, 2026
5ca7e0f
Address review: fix test to cancel before ExecuteReaderAsync and acce…
cheenamalhotra Jul 9, 2026
89b51a9
Add AE test for async cancellation via CreateLocalCompletionTask path
cheenamalhotra Jul 9, 2026
7590ffe
Address review feedback: fix test accuracy
cheenamalhotra Jul 9, 2026
b30baf4
Potential fix for pull request finding
cheenamalhotra Jul 9, 2026
c4ab8ec
Address review: add CTS assertions, fix AE test query order
cheenamalhotra Jul 9, 2026
ac8acd7
Revert CreateLocalCompletionTask lock removal to fix AE test
cheenamalhotra Jul 9, 2026
9431172
Address review: add infinite WHILE loop test, fix CTS timing, clarify…
cheenamalhotra Jul 9, 2026
22528a8
Address review: clarify lock comment, add watchdog to while-loop test
cheenamalhotra Jul 9, 2026
bd0f7e5
Address flakiness by canceling from another thread.
cheenamalhotra Jul 15, 2026
59fc6a6
Apply suggestions from code review
cheenamalhotra Aug 10, 2026
885c66f
Add cancellation coverage for the internal-end execute path
mdaigle Aug 17, 2026
b16406c
Address review: subscribe InfoMessage before dispatch and assert it a…
cheenamalhotra Aug 17, 2026
b33eb08
Skip the internal-end cancellation test instead of passing it silently
mdaigle Aug 18, 2026
87cfe5f
Subscribe InfoMessage before dispatch in the new cancellation tests
mdaigle Aug 18, 2026
120ba67
Merge branch 'dev/automation/pr4435-internal-end-cancellation-tests' …
cheenamalhotra Aug 18, 2026
81b95f0
Remove lock(_stateObj) from CreateLocalCompletionTask internal-end path
cheenamalhotra Aug 19, 2026
00f0710
Merge branch 'main' into dev/cheena/fix-async-cancel-attention
cheenamalhotra Aug 20, 2026
c56c996
Prevent cancellation tests from hanging the test host
cheenamalhotra Sep 24, 2026
4d299e3
Merge remote-tracking branch 'origin/main' into pr/4435/dev/cheena/fi…
cheenamalhotra Sep 24, 2026
ff314ce
Use issue types instead of bug and enhancement labels (#4753)
cheenamalhotra Sep 25, 2026
a846e2a
Fix auto-triage safe-output preparation (#4693)
priyankatiwari08 Sep 25, 2026
07a7c58
Fix Windows performance harness affinity interop (#4724)
priyankatiwari08 Sep 25, 2026
e66db6c
Re-issue session isolation level on TransactionScope re-enlistment (#…
priyankatiwari08 Sep 28, 2026
b542307
Add SqlClient 7.1.1 release notes (#4769)
mdaigle Sep 29, 2026
3664685
Fix configurable retry logic retrying commands whose transaction was …
priyankatiwari08 Sep 30, 2026
9ab7942
Fix SqlBulkCopy money identity in sql_variant (#4727)
priyankatiwari08 Sep 30, 2026
280ff92
Fix soft disconnect accounting for reclaimed connections (#4725)
priyankatiwari08 Sep 30, 2026
768c902
Fix eager native SNI initialization on non-Windows platforms (#4700)
shreyarao4 Sep 30, 2026
9162f07
Add async counterparts to the enclave provider hierarchy (Phase 3, pa…
cheenamalhotra Oct 1, 2026
2d604fa
Remove RID-specific SqlClient DLLs (#4673)
edwardneal Oct 1, 2026
7019240
Suppress IL2026 on BeginExecute and EndExecute (#4703)
charlesroddie Oct 1, 2026
9790867
Cleanup | Remove dead code paths and Regexes from SqlConnectionOption…
edwardneal Oct 1, 2026
c3f0737
Fix build orchestration and refresh developer documentation (#4748)
cheenamalhotra Oct 1, 2026
a014db2
Replace Azure.Identity dependency with Azure.Core (#4749)
cheenamalhotra Oct 1, 2026
5508773
Add evidence-based SqlClient code review skill (#4736)
cheenamalhotra Oct 1, 2026
c91a435
Update CI resource trigger filters (#4694)
paulmedynski Oct 1, 2026
356123e
Use System.Text.Json source generation to remove some trim/AOT warnin…
charlesroddie Oct 1, 2026
ede1bee
Enforce milestone match with next SqlClient version (#4762)
mdaigle Oct 5, 2026
3bbdd19
Migrate review-pr-feedback prompt to an agent skill (#4750)
paulmedynski Oct 5, 2026
8232226
Add defensive diagnostics to symbol publishing (#4731)
paulmedynski Oct 5, 2026
6f6a0d2
Remove some trim/AOT warnings: easy cases (#4684)
charlesroddie Oct 5, 2026
75c3d81
Remove redundant case normalization from build.proj conditions (#4771)
paulmedynski Oct 7, 2026
750b608
Add XML documentation validation to OneBranch builds (#4730)
paulmedynski Oct 7, 2026
6b4232d
Retarget SqlClient to .NET 10 (#4779)
mdaigle Oct 7, 2026
47c815c
Add an EnableAppConfig switch to remove trim warnings (#4697)
charlesroddie Oct 7, 2026
e595dba
Reset pooled session isolation level before reuse (fixes #96) (#4330)
priyankatiwari08 Oct 7, 2026
f3cfc73
Tests | Cleanup AAD Password auth from tests + code cleanup (#4390)
cheenamalhotra Oct 7, 2026
5949e4b
Feature | Write TimeOnly instances as time values (#4604)
edwardneal Oct 8, 2026
aa2ae45
Cleanup | Make all ReferenceType comparisons positive (#4772)
paulmedynski Oct 8, 2026
d68ab88
Add database context reconnection tests and diagnostics (#4130)
paulmedynski Oct 8, 2026
5eaa932
Fix exception thrown when streaming certain XML values via XmlReader …
sharpjs Oct 8, 2026
d7fb438
[Scheduled Run] Localized resource files from OneLocBuild (#4803)
cheenamalhotra Oct 8, 2026
332e17f
Use the source-generated JSON context in HGS MakeRequestAsync (#4801)
virzak Oct 8, 2026
3bc0502
Remove macOS tests from PR validation (#4792)
cheenamalhotra Oct 12, 2026
c7ab087
Mark NetworkError_TriggersFailover_ClearsPool as flaky (#4804)
cheenamalhotra Oct 12, 2026
acf01d0
Fix agentic triage comment submission and reject incomplete summaries…
priyankatiwari08 Oct 13, 2026
4b6a671
Improve agent workflow guidance (#4777)
paulmedynski Oct 13, 2026
dd9abaf
Flaky tests / lighter test queries (#4344)
mdaigle Oct 13, 2026
9fbd686
[Scheduled Run] Localized resource files from OneLocBuild (#4825)
cheenamalhotra Oct 13, 2026
0564fcc
Expand query execution coverage in the performance test suite (#4789)
benrr101 Oct 13, 2026
04b01a1
Document complete reader consumption for InfoMessage events (#4723)
priyankatiwari08 Oct 15, 2026
925d2c8
Clarify Prepare incompatibility with optimized parameter binding (#4726)
priyankatiwari08 Oct 15, 2026
598296a
Remove obsolete DataSetExtensions InternalsVisibleTo grant (#4722)
priyankatiwari08 Oct 15, 2026
18579fc
Fix vulnerable Pkcs dependency and package metadata (#4848)
mdaigle Oct 15, 2026
29f76ad
Clarify OneBranch localization validation under failOnValidationError…
paulmedynski Oct 16, 2026
cac4661
Clarify interactive and autonomous agent branch naming (#4818)
paulmedynski Oct 16, 2026
617759e
Perf Tests | Default Config File (#4606)
benrr101 Oct 16, 2026
f6ae2ac
Isolate enclave session cache entries by attestation protocol (#4829)
priyankatiwari08 Oct 19, 2026
29c804e
Quarantine flaky user-provided failover partner retry test (#4873)
cheenamalhotra Oct 20, 2026
2ea42d6
Throw ArgumentOutOfRangeException from SqlParameterCollection.RemoveA…
alaricd Oct 20, 2026
fcf00e9
Public API | Align ref and implementation assemblies (#4832)
edwardneal Oct 20, 2026
2a6039e
Update shipping dependencies for 8.0.0-preview1 (#4880)
mdaigle Oct 20, 2026
c4c2f9e
Correct SqlBatch command behavior exception documentation (#4878)
mdaigle Oct 20, 2026
9139585
Address review follow-ups on the async enclave attestation gate (#4621)
cheenamalhotra Oct 21, 2026
89f0e41
Use IVT for shared SqlClient switch test helpers (#4765)
paulmedynski Oct 21, 2026
f6c3f50
Fix nullable statistics execution timer race (#4875)
mdaigle Oct 21, 2026
ecfd55a
Harden SqlClient code review skill and posting guidance (#4885)
cheenamalhotra Oct 21, 2026
5394363
Use Windows auth for local perf runs (#4877)
mdaigle Oct 21, 2026
06d0e99
Fix HasRows detection after multiple INFO tokens (#4773)
cheenamalhotra Oct 22, 2026
48a4286
Perf | Reduce allocations in Always Encrypted key handling, reorganis…
edwardneal Oct 22, 2026
fa92ca6
Fix expected SqlClient friend assembly checks (#4901)
paulmedynski Oct 22, 2026
b1d2a01
Perf Tests | Allow dependencies with vulnerabilities in baseline runs…
benrr101 Oct 22, 2026
568f4d9
Consumer build-time validation of SqlClient family package versions (…
paulmedynski Oct 22, 2026
846c28a
Move IdentityModel dependencies to Extensions.Azure (#4790)
virzak Oct 22, 2026
c05e312
Globalization invariant mode: Require explicit LCID when constructing…
edwardneal Oct 22, 2026
c44f66d
Fix Windows netonly connection pool identity and replenishment (#4814)
mdaigle Oct 22, 2026
9b12724
AOT 1: Expose authentication configuration handlers from Abstractions…
paulmedynski Oct 23, 2026
6606377
Fix | Load and resolve retry logic providers into the current Assembl…
edwardneal Oct 23, 2026
e01e17e
Stabilize simulated server tests while retaining quarantine (#4891)
mdaigle Oct 23, 2026
7c55ed0
Honor HostNameInCertificate in managed SNI certificate validation (#4…
apoorvdeshmukh Oct 23, 2026
616aeff
Refactor TDS parser into focused namespaces and files (#4810)
benrr101 Oct 23, 2026
d136788
Report configured async compatibility switches in user agent telemetr…
benrr101 Oct 23, 2026
e012b32
Performance | Remove manual state machine from setup phase of SqlBulk…
edwardneal Oct 23, 2026
7b1184b
Add asynchronous enclave delegate operations (#4886)
cheenamalhotra Oct 26, 2026
a62aad4
Improve WAM authentication diagnostics for windowless hosts (#4858)
priyankatiwari08 Oct 26, 2026
e754f8d
Preserve SqlDataReader result boundaries and document trailing-error …
priyankatiwari08 Oct 26, 2026
2704794
Remove Lingering Sql Server 2005 References (#4881)
benrr101 Oct 26, 2026
d8210d9
Add regression coverage for native SNI initialization (#4922)
cheenamalhotra Oct 27, 2026
9f6f4d1
Fix net-only account password handling for PowerShell analysis (#4923)
mdaigle Oct 27, 2026
c76d081
Allow release-notes-only PRs to use servicing milestones on main (#4926)
priyankatiwari08 Oct 27, 2026
52ddd7f
Add release notes for Microsoft.Data.SqlClient 6.1.8 (#4920)
priyankatiwari08 Oct 27, 2026
185a7ba
AOT 2: Load and validate authentication configuration in Abstractions…
paulmedynski Oct 27, 2026
00482fc
Normalize TDS token metadata names and structure (#4811)
benrr101 Oct 28, 2026
0666194
Normalize TDS UDT and XML metadata types (#4812)
benrr101 Oct 28, 2026
8dab81c
Fix | Enable serialization of SqlException (#4622)
edwardneal Oct 29, 2026
b368afd
Add authentication diagnostics to Azure extension (MSAL + Azure.Ident…
cheenamalhotra Oct 29, 2026
5d17a35
[Scheduled Run] Localized resource files from OneLocBuild (#4944)
cheenamalhotra Oct 30, 2026
cb66150
Fix MultiSubnetFailover parallel connect when one address fails immed…
cheenamalhotra Oct 30, 2026
266a32e
Fix managed SNI MARS receive teardown race (#4680)
cheenamalhotra Oct 30, 2026
89b228d
Restore local tools before Azure integration builds (#4952)
cheenamalhotra Oct 30, 2026
827c136
Update instructions to write better unit tests (#4948)
benrr101 Oct 30, 2026
87e15ca
Public API | Enforce ref/implementation parity using ApiCompat (#4890)
edwardneal Nov 2, 2026
c1e89ab
Enable MultiSubnetFailover by default and disable Framework TNIR (#4927)
cheenamalhotra Nov 2, 2026
8dae635
Fix Corrupted text from SqlDataReader.GetTextReader with SequentialAc…
shreyarao4 Nov 2, 2026
671c7e3
[Scheduled Run] Localized resource files from OneLocBuild (#4955)
cheenamalhotra Nov 2, 2026
ddef008
[Scheduled Run] Localized resource files from OneLocBuild (#4964)
cheenamalhotra Nov 3, 2026
192c1b8
Document STSURL and SPN federated authentication design (#4959)
paulmedynski Nov 3, 2026
1152bb2
Add vector(float16) support (#4501)
apoorvdeshmukh Nov 3, 2026
ff241b6
Validate PRELOGIN option offsets before reading option data (#4902)
priyankatiwari08 Nov 3, 2026
2808c8e
Enable ManualTests internal access for project and signed-package bui…
cheenamalhotra Nov 3, 2026
adb72d9
Fix MarsReceiveTeardownTest race on async fatal error reporting (#4970)
priyankatiwari08 Nov 3, 2026
b714187
Validate TDS parser prerequisites and invalidate malformed responses …
paulmedynski Nov 3, 2026
9e75b11
Verify the VBS enclave key binding on the async attestation path (#4798)
virzak Nov 3, 2026
c444140
[Scheduled Run] Localized resource files from OneLocBuild (#4984)
cheenamalhotra Nov 3, 2026
45dbe19
Fix perf baseline builds and enable nightly runs (#4976)
cheenamalhotra Nov 4, 2026
944d9fc
Add failure diagnostics for transaction-scope pool reassertion (#4882)
cheenamalhotra Nov 4, 2026
6dd7ae4
Bound default LOB performance workloads (#4986)
cheenamalhotra Nov 4, 2026
600f92c
Bound cancellation tests and verify attention with simulated server
cheenamalhotra Nov 4, 2026
74a1cb7
Fix stale TVP column boundary baselines (#4967)
priyankatiwari08 Nov 4, 2026
f8ededd
Retry SqlSchemaInfoTest DataTypes schema read on deadlock (1205) (#4968)
priyankatiwari08 Nov 4, 2026
f072438
AOT 3: Move authentication registration to an AOT-safe Abstractions r…
paulmedynski Nov 4, 2026
025a3ea
Publish auto-triage summaries when labels are queued first (#4992)
priyankatiwari08 Nov 4, 2026
f0fe93c
Use the governed SqlClient feed for PowerShell module installs (#4932)
mdaigle Nov 4, 2026
848448b
Quarantine intermittent simulator lifecycle disposal test (#4996)
mdaigle Nov 4, 2026
1e579cb
[Scheduled Run] Localized resource files from OneLocBuild (#5004)
cheenamalhotra Nov 5, 2026
0c5503b
Quarantine intermittent TransactionScope session reuse theory (#5006)
mdaigle Nov 5, 2026
7f47e9e
Fix active connection pools being retired during creation (#4754)
priyankatiwari08 Nov 5, 2026
8d6b0a5
Add option to skip symbol publishing polling (#5012)
paulmedynski Nov 5, 2026
b87ca6e
Update SNI dependencies to 8.0.0-preview1.26309.4 (#5011)
paulmedynski Nov 5, 2026
92aa2a1
Allow report-only validation in official OneBranch builds (#5015)
paulmedynski Nov 6, 2026
f57988e
Remove label management from issue triage (#5013)
cheenamalhotra Nov 6, 2026
9ba277e
Label PRs that change Strings.resx for localization (#5017)
cheenamalhotra Nov 6, 2026
66f3ea9
Docs: prepare 8.0.0-preview1 release notes (#4999)
paulmedynski Nov 6, 2026
e3f84ae
Assign backport PRs to the original change author (#5018)
cheenamalhotra Nov 6, 2026
5aaa9ef
[Scheduled Run] Localized resource files from OneLocBuild (#5019)
cheenamalhotra Nov 6, 2026
8afc016
Quarantine intermittent pool instrumentation checkout theory (#5020)
mdaigle Nov 9, 2026
203697e
Quarantine intermittent vector schema collection tests (#5024)
mdaigle Nov 9, 2026
dcf8195
Quarantine intermittent reclaimed-connection metrics theory (#5016)
mdaigle Nov 9, 2026
346ce48
Address sqlclient-pr Pipeline Gaps (#5005)
benrr101 Nov 9, 2026
1892268
Docs: update 8.0.0-preview1 release date to November 9 (#5023)
paulmedynski Nov 9, 2026
d3c58ee
Schema metadata transition tests (#4751)
tetolv Nov 9, 2026
618c7af
Quarantine intermittent Azure pool-blocking theory (#4980)
mdaigle Nov 10, 2026
930db48
Agent Host changes for agents/update-sqlclient-version-800 (#5026)
paulmedynski Nov 10, 2026
9940aa2
Serialize simulator transport startup with disposal (#5000)
mdaigle Nov 10, 2026
e16417f
Quarantine intermittent certificate NIC connection test (#5021)
mdaigle Nov 10, 2026
047589d
:robot: Remove old PR pipelines and clean up the remaining references…
benrr101 Nov 10, 2026
bb2ec6b
Use governed feed for PackageCompatibility restores (#5032)
paulmedynski Nov 11, 2026
90c9566
vBumpo (#5033)
benrr101 Nov 11, 2026
97df8fb
Quarantine intermittent schema collection theories (#5028)
mdaigle Nov 11, 2026
a2d1583
Perf | Reduce SqlBulkCopy destination metadata query cost (#4988)
cheenamalhotra Nov 11, 2026
d8a60de
Connection encryption info – Slice A: public API surface (#4830)
priyankatiwari08 Nov 11, 2026
6ff1bbd
Update compatible dependencies for SqlClient 8.0.0 (#5031)
mdaigle Nov 11, 2026
dfa1967
Localize authentication errors in Abstractions (#4852)
paulmedynski Nov 12, 2026
8527b16
Enable overall connect timeout for pool waits by default (#5030)
mdaigle Nov 12, 2026
045c261
Add XML documentation validation to sqlclient-pr (#5025)
paulmedynski Nov 12, 2026
457ed73
Fix SqlTransaction.Dispose racing the close of a broken connection (#…
MaceWindu Nov 12, 2026
8d330f1
Connection encryption info – Slice A review follow-up (#5043)
priyankatiwari08 Nov 12, 2026
45aacd8
Quarantine intermittent split-packet full-header test (#5047)
mdaigle Nov 12, 2026
17bef7b
Release notes for SqlClient 7.1.2 and 7.0.4 (#5054)
cheenamalhotra Nov 13, 2026
0386d84
Merge remote-tracking branch 'origin/dev/cheena/fix-async-cancel-atte…
cheenamalhotra Nov 13, 2026
ba09800
Fix cancellation simulator framing and listener shutdown
cheenamalhotra Nov 13, 2026
3cf5c21
Capture protocol progress on cancellation test failures
cheenamalhotra Nov 13, 2026
1a3f10c
Allow attention acknowledgement while its send is completing
cheenamalhotra Nov 13, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
6 changes: 5 additions & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -197,4 +197,8 @@ dotnet_diagnostic.CA1416.severity = silent

dotnet_code_quality.CA2100.excluded_type_names_with_derived_types = Microsoft.Data.SqlClient.ManualTesting.Tests.*
dotnet_diagnostic.xUnit1031.severity=none
dotnet_diagnostic.xUnit1030.severity=none
dotnet_diagnostic.xUnit1030.severity=none

# Pool pruning leases must be disposed or explicitly handed off.
[src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/ConnectionPool/**/*.cs]
dotnet_diagnostic.CA2000.severity = warning
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug-report.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name: Bug report
about: Create a report to help us improve
title: ""
labels: [":new: Triage Needed", ":bug: Bug!"]
type: Bug
assignees: []

---
Expand Down
88 changes: 88 additions & 0 deletions .github/ISSUE_TEMPLATE/code_review_skill_drift.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
name: Code Review Skill Drift
description: Record something a review learned that the sqlclient-code-review skill got wrong, missed, or no longer matches
title: "[review-skill] "
labels: ["Area\\Engineering"]
body:
- type: markdown
attributes:
value: |
For observations about `.github/skills/sqlclient-code-review/` itself, not about the code under review.
File one issue per observation so each can be judged on its own evidence.

**Redact** connection strings, passwords, tokens, customer data, and non-public source from every field, including commands, output, and diff excerpts.

**Security vulnerabilities:** do not report them here, even redacted. Use the private MSRC process in [SECURITY.md](https://github.com/dotnet/SqlClient/blob/main/SECURITY.md).

- type: dropdown
id: class
attributes:
label: Drift class
options:
- Wrong finding - raised, then retracted or downgraded after checking
- Missed defect - the skill should have caught it and did not
- Stale fact - a path, check, filter, or policy in the skill no longer matches the repo
- Wasted step - cost review time without changing the outcome
- Mechanizable - a recurring finding a lint, analyzer, test, or CI check could catch
validations:
required: true

- type: input
id: source
attributes:
label: Where it happened
description: PR, review thread, or comment URL. For a local review, give base and head commit IDs.
validations:
required: true

- type: textarea
id: says
attributes:
label: What the skill says today
description: Quote the line or section, or say that nothing covers this.
validations:
required: true

- type: textarea
id: observed
attributes:
label: What actually turned out to be true
description: The observation, in terms a future reviewer would need.
validations:
required: true

- type: textarea
id: evidence
attributes:
label: Evidence
description: Redacted `file:line`, command and output, spec section, or the thread where it was settled.
validations:
required: true

- type: dropdown
id: cost
attributes:
label: What it cost
options:
- A retracted P1 or P2 finding
- A retracted or downgraded P3 finding or question
- A defect reached a shipped branch
- Review time only
- Nothing yet - noticed before it mattered
validations:
required: true

- type: textarea
id: recurrence
attributes:
label: Prior occurrences
description: Links to earlier instances, if known. Recurrence is what promotes an entry.
validations:
required: false

- type: textarea
id: proposal
attributes:
label: Proposed change
description: Optional. Name the section and what it replaces. If a check would catch it instead, name the check.
validations:
required: false
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name: Feature request
about: Suggest an idea for this project
title: ""
labels: [":new: Triage Needed", ":bulb: Enhancement"]
type: Feature
assignees: []

---
Expand Down
32 changes: 24 additions & 8 deletions .github/copilot-instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@

## 📚 Project Overview
This project is a .NET data provider for SQL Server, enabling .NET applications to interact with SQL Server databases. It supports various features like connection pooling, transaction management, and asynchronous operations.
The project builds from a **single unified project** at `src/Microsoft.Data.SqlClient/src/Microsoft.Data.SqlClient.csproj`. It targets `net8.0` and `net9.0` on all supported hosts, and adds `net462` only when building on Windows. The legacy `netfx/` and `netcore/` directories are being phased out — only their `ref/` folders (which define the public API surface) remain active.
The project builds from a **single unified project** at `src/Microsoft.Data.SqlClient/src/Microsoft.Data.SqlClient.csproj`, targeting `net462;net10.0` (minimum runtime compatibility: .NET Framework 4.6.2 and .NET 10). Public API declarations are unified under `src/Microsoft.Data.SqlClient/ref/`; reference and unsupported-platform projects additionally preserve `netstandard2.0`. The legacy `netfx/` and `netcore/` directories are no longer used.
The project includes:
- **Public APIs**: Defined in `netcore/ref/` and `netfx/ref/` directories.
- **Public APIs**: Defined by `src/Microsoft.Data.SqlClient/ref/Microsoft.Data.SqlClient.csproj` and the reference source files beside it.
- **Implementations**: All source code in `src/Microsoft.Data.SqlClient/src/`.
- **Tests**: Located in the `tests/` directory, covering unit and integration tests.
- **Unit Tests**: Located in `src/Microsoft.Data.SqlClient/tests/UnitTests/`.
Expand Down Expand Up @@ -51,12 +51,12 @@ This project includes several key products and libraries that facilitate SQL Ser
- **Logging and Diagnostics**: Provides event source tracing diagnostic capabilities for troubleshooting.
- **Failover Support**: Handles automatic failover scenarios for high availability.
- Compatibility switch: `Switch.Microsoft.Data.SqlClient.UseLegacyFailoverAlternationOnLoginSqlErrors` (default `false`) can restore legacy alternation behavior in `LoginWithFailover` for login-phase SQL errors.
- **Cross-Platform Support**: Compatible with both .NET Framework and .NET Core, allowing applications to run on Windows, Linux, and macOS.
- **Cross-Platform Support**: Compatible with .NET Framework 4.6.2+ on Windows and .NET 10+ on Windows, Linux, and macOS.
- **Column Encryption AKV Provider**: Supports Azure Key Vault (AKV) provider for acquiring keys from Azure Key Vault to be used for encryption and decryption.

## 🧩 SNI Implementations
There are two implementations of the SQL Server Network Interface (SNI) layer used in this project:
- **Managed SNI**: A managed implementation of SNI that is used in .NET Core and .NET 5+ environments. It provides cross-platform support for SQL Server connectivity.
- **Managed SNI**: A managed implementation of SNI that is used in .NET 10+ environments. It provides cross-platform support for SQL Server connectivity.
- **Native SNI**: A native implementation of SNI that is used in .NET Framework and .NET Core environments on Windows. It's shipped as part of the `Microsoft.Data.SqlClient.SNI` and `Microsoft.Data.SqlClient.SNI.Runtime` packages.
- **Microsoft.Data.SqlClient.SNI**: This package provides the native SNI layer for .NET Framework applications.
- **Microsoft.Data.SqlClient.SNI.Runtime**: This package provides the native SNI layer for .NET Core applications on Windows.
Expand Down Expand Up @@ -104,7 +104,22 @@ When a new issue is created, follow these steps:
- Follow a test-driven approach: write failing tests before implementing fixes.
- **Cover both sync and async code paths** where the API exposes both variants (e.g., `Open`/`OpenAsync`, `ExecuteReader`/`ExecuteReaderAsync`). Sync and async implementations often differ internally.
- Use the existing test framework in the `tests/` directory.
- Follow the naming conventions and structure of existing tests.
- Read and follow the [test authoring rules](instructions/testing.instructions.md#writing-tests).
They are mandatory for unit tests and strongly recommended for manual and functional tests;
older neighboring tests do not override them.
- Use commented Arrange, Act, Assert, Cleanup sections in order; Act and Assert are required.
Include Arrange only for needed setup and Cleanup only for special teardown. Comment each group
of steps within a section to explain what happens and, when unclear, why.
- Use `[MemberData]` with a declared `TheoryData<...>` return type for non-constant theory data;
never use `[ClassData]` for it.
- Keep `{ClassName}Tests.cs` focused on that class and mirror its source folder under `UnitTests/`.
Name tests `{MethodName}_{Input}_{ExpectedOutput}` without the tested class name.
- Put unit-only utilities in `tests/UnitTests/Utilities/` and utilities shared across test projects
in TestCommon (`tests/Common/`), excluding fuzz, stress, and performance projects from this rule.
- Split separate scenarios into separate tests; do not select behavior with switches or flags,
including sync/async switches. Use theories only to vary inputs for the same behavior.
- Verify that tests exercise the intended behavior and assert outcomes that detect regressions.
Confirm the intended tests actually ran; skipped tests or zero matches do not establish coverage.
- Ensure tests are comprehensive and cover edge cases.
- If the issue involves changes to public APIs, update the corresponding `ref/` projects to reflect those changes.
- Add sample code snippets in the 'doc/samples/' directory to demonstrate the new or fixed functionality and link them in the documentation in `doc/` folder.
Expand Down Expand Up @@ -132,12 +147,13 @@ When a new issue is created, follow these steps:
- Tag reviewers based on `CODEOWNERS` file

## 🌿 Branch Naming
- All branches created by AI agents **must** use the `dev/automation/` prefix (e.g. `dev/automation/fix-connection-timeout`).
- Do **not** create branches directly under `main`, `dev/`, or any other top-level prefix.
- **Interactive agents**, working under direct human guidance, may create and use branches under `dev/<name>/` when the human specifies or approves the namespace and branch name (e.g., `dev/paul/aot/phase-1.1`).
- **Autonomous agents**, working without interactive human direction, **must** create branches under `dev/automation/` (e.g., `dev/automation/fix-connection-timeout`).
- Do **not** create branches outside these namespaces or directly under `dev/`.

## 🧠 Contextual Awareness
- All source code is in `src/Microsoft.Data.SqlClient/src/`. Do NOT add code to legacy `netfx/src/` or `netcore/src/` directories.
- Only `ref/` folders in `netcore/ref/` and `netfx/ref/` remain active for defining the public API surface.
- Public API changes must update the unified `src/Microsoft.Data.SqlClient/ref/` sources for each affected target framework.
- Check for platform-specific differences using file suffixes (`.netfx.cs`, `.netcore.cs`, `.windows.cs`, `.unix.cs`) and conditional compilation (`#if NETFRAMEWORK`, `#if NET`, `#if _WINDOWS`, `#if _UNIX`).
- Respect API compatibility rules across .NET versions
- Do not introduce breaking changes without proper justification and documentation
Expand Down
32 changes: 15 additions & 17 deletions .github/instructions/3rd-party-package-versions.instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@ applyTo: "**/Directory.Packages.props,**/*.csproj,**/Directory.Build.props,**/*.
---
# Choosing Third-Party Package Dependency Versions

Guidance for choosing versions of **external (third-party) NuGet package dependencies** in multi-targeted projects (e.g. `net462;net8.0;net9.0`).
Guidance for choosing versions of **external (third-party) NuGet package dependencies** in multi-targeted projects (e.g. `net462;net10.0`).

> **Scope:** This document covers dependencies consumed from NuGet — packages the SqlClient repo does NOT own. For versioning of SqlClient's own inter-sibling packages (Logging, Abstractions, SqlClient, Azure, AKV Provider, SqlServer.Server), see `sqlclient-package-versions.instructions.md`.

## Rule
For runtime-aligned packages, **the package major must match the target runtime major**: 8.x on `net8.0`, 9.x on `net9.0`, 10.x on `net10.0`, and so on. TFMs that aren't tied to a specific runtime major (`net462`, `netstandard2.0`) get the major of the floor LTS. Other categories are versioned as described below.
For runtime-aligned packages, **the package major must match the target runtime major**: 10.x on `net10.0` in this branch. TFMs that aren't tied to a specific runtime major (`net462`, `net481`, `netstandard2.0`) get the major of the floor LTS. Other categories are versioned as described below.

Split package references into three categories:

Expand All @@ -22,21 +22,19 @@ Packages whose major version ships with (or is tightly coupled to) a specific .N
- `System.Text.Json`, `System.Memory`, `System.IO.Pipelines`, `System.Formats.Asn1`, `System.Security.Cryptography.Pkcs`
- `Microsoft.Bcl.*`

Use the major version that matches the TFM. For TFMs without a corresponding runtime major (`net462`, `netstandard2.0`, etc.), use the major of the **lowest supported modern TFM** — typically the floor LTS (e.g. `8.x` while net8 is supported). This keeps the legacy targets on a long-lived, well-patched band and avoids dragging in transitive deps from a newer major:
Use the major version that matches the TFM. For TFMs without a corresponding runtime major (`net462`, `net481`, `netstandard2.0`, etc.), use the major of the **lowest supported modern TFM** — currently .NET 10. This keeps the legacy targets on a long-lived, well-patched band and avoids dragging in transitive deps from a newer major:

```xml
<!-- Defaults: lowest supported runtime band (e.g. net8 LTS); also applies to net462 / netstandard2.0 -->
<!-- Defaults: .NET 10 LTS; also applies to net462 / net481 / netstandard2.0 -->
<ItemGroup>
<PackageVersion Include="Microsoft.Extensions.Logging" Version="8.0.1" />
<PackageVersion Include="System.Text.Json" Version="8.0.5" />
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)' == 'net9.0'">
<PackageVersion Update="Microsoft.Extensions.Logging" Version="9.0.0" />
<PackageVersion Update="System.Text.Json" Version="9.0.0" />
<PackageVersion Include="Microsoft.Extensions.Logging" Version="10.0.0" />
<PackageVersion Include="System.Text.Json" Version="10.0.0" />
</ItemGroup>
```

The versions above illustrate the runtime band; use the current stable servicing versions from
`Directory.Packages.props`. No per-modern-TFM override is needed when only `net10.0` is targeted.

When the floor LTS drops out of support, bump the default block to the new floor LTS major and drop any conditional block that becomes redundant.

### 2. Independent packages — **single version across all TFMs**
Expand All @@ -52,15 +50,15 @@ Reference one (latest stable) version unconditionally:

```xml
<PackageVersion Include="Newtonsoft.Json" Version="13.0.4" />
<PackageVersion Include="Azure.Identity" Version="1.17.1" />
<PackageVersion Include="Azure.Core" Version="1.62.0" />
```

### 3. Polyfills — **conditional presence, single version**

Packages that only exist (or are only needed) on older TFMs. The polyfill major doesn't have to match any runtime band (older TFMs have no in-box equivalent), so pick the latest stable available:

```xml
<ItemGroup Condition="'$(TargetFramework)' == 'netstandard2.0' OR '$(TargetFramework)' == 'net462'">
<ItemGroup Condition="'$(TargetFramework)' == 'netstandard2.0' OR '$(TargetFramework)' == 'net462' OR '$(TargetFramework)' == 'net481'">
<PackageReference Include="Microsoft.Bcl.AsyncInterfaces" Version="10.0.0" />
</ItemGroup>
```
Expand Down Expand Up @@ -96,7 +94,7 @@ Look at the "Frameworks" tab on nuget.org or open the `.nupkg`:

### 4. Functional test — remove the reference and rebuild

The decisive test for the polyfill-vs-runtime-aligned boundary: remove the `PackageReference` on a modern TFM (e.g. net8) and build.
The decisive test for the polyfill-vs-runtime-aligned boundary: remove the `PackageReference` on the modern TFM (`net10.0`) and build.

- Builds clean → package was acting as a polyfill on that TFM. Confirm category 3.
- Fails with `CS0246`/`CS1061` (missing type or method) → the package contributes API the in-box BCL doesn't have. Treat as runtime-aligned (category 1), even if the description sounds polyfill-ish.
Expand Down Expand Up @@ -143,13 +141,13 @@ The reverse (customer's direct version higher than your transitive) resolves cle
| 10.x | 10.x or higher | Clean |
| 8.x | 8.x or higher | Clean |

Pinning runtime-aligned packages to the **band matching each TFM** means a net8 consumer transitively gets 8.x (no friction with their own 8.x reference), and a net10 consumer transitively gets 10.x.
For libraries supporting multiple modern runtimes, pinning runtime-aligned packages to the **band matching each TFM** means, for example, a net8 consumer transitively gets 8.x (no friction with their own 8.x reference), and a net10 consumer transitively gets 10.x.

Pinning everything to the latest major (e.g. `10.x` unconditionally) forces every net8 customer to roll their direct references forward or hit NU1605.
In that example, pinning everything to the latest major (e.g. `10.x` unconditionally) forces every net8 customer to roll their direct references forward or hit NU1605. This branch no longer targets net8; its only modern band is `net10.0`, so the current default is 10.x.

### Independent packages don't have this problem

`Newtonsoft.Json 13.x`, `Azure.Identity 1.17.x`, etc. aren't tied to a runtime version. Customers don't have a "matching" version in mind, and the package's own multi-targeted assets handle TFM selection internally. One version is simpler and avoids needless conditional blocks.
`Newtonsoft.Json 13.x`, `Azure.Core 1.62.x`, etc. aren't tied to a runtime version. Customers don't have a "matching" version in mind, and the package's own multi-targeted assets handle TFM selection internally. One version is simpler and avoids needless conditional blocks.

### Framework-provided assemblies win at runtime anyway

Expand Down
Loading
Loading