Backport PR #4063 to release/7.0: Add missing System.Data.Common package reference#4074
Backport PR #4063 to release/7.0: Add missing System.Data.Common package reference#4074Copilot wants to merge 3 commits intorelease/7.0from
Conversation
Co-authored-by: mdaigle <4722049+mdaigle@users.noreply.github.com> Agent-Logs-Url: https://github.com/dotnet/SqlClient/sessions/1252dab5-81b0-4f0e-8e0a-3399d448fd96
|
@copilot Please document why we are explicitly depending on the NuGet package version of System.Data.Common for .NET Framework, even though it is included with the base common libraries. |
…on .NET Framework Co-authored-by: paulmedynski <31868385+paulmedynski@users.noreply.github.com> Agent-Logs-Url: https://github.com/dotnet/SqlClient/sessions/a5fab7d4-0f66-4552-98b9-4635fa63c441
Added XML comments in commit The explanation: |
|
@copilot When this PR merges, please apply the XML documentation you generated to the main branch in a new PR. |
Noted. The |
There was a problem hiding this comment.
Pull request overview
Backport to release/7.0 to ensure net462 consumers get an explicit System.Data.Common NuGet dependency, preventing CS0012 compile errors when public APIs (e.g., IDbColumnSchemaGenerator) are referenced.
Changes:
- Added central package version for
System.Data.Common4.3.0. - Added
System.Data.CommonPackageReferencefor thenet462build (implementation) and for thenetfxreference-assembly project. - Added a
net462-onlySystem.Data.Commondependency to the.nuspecso the published package declares it for consumers.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| Directory.Packages.props | Centrally pins System.Data.Common to 4.3.0. |
| src/Microsoft.Data.SqlClient/src/Microsoft.Data.SqlClient.csproj | Adds System.Data.Common package reference for net462 build output. |
| src/Microsoft.Data.SqlClient/netfx/ref/Microsoft.Data.SqlClient.csproj | Adds System.Data.Common package reference so ref assembly build has the required metadata. |
| tools/specs/Microsoft.Data.SqlClient.nuspec | Declares System.Data.Common 4.3.0 as a net462 dependency for consumers. |
|
@copilot bring this branch up to date with the target branch |
…rt-pr-4063-to-release-7-0
Done — merged |
|
/azp run |
|
Azure Pipelines successfully started running 2 pipeline(s). |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## release/7.0 #4074 +/- ##
==============================================
Coverage ? 65.70%
==============================================
Files ? 275
Lines ? 65825
Branches ? 0
==============================================
Hits ? 43249
Misses ? 22576
Partials ? 0
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Description
Backports #4063 to the
release/7.0branch.Adds the missing
System.Data.Common(v4.3.0) NuGet package reference that was omitted from therelease/7.0branch.System.Data.Commonships as an inbox assembly on .NET Framework, but the inbox version predates newer APIs such asIDbColumnSchemaGenerator. Without this explicit NuGet dependency, consumers encounterCS0012compilation errors when using types likeIDbColumnSchemaGeneratorexposed throughMicrosoft.Data.SqlClient's public API.Files changed
Directory.Packages.props— added central package version entry forSystem.Data.Commonv4.3.0src/Microsoft.Data.SqlClient/netfx/ref/Microsoft.Data.SqlClient.csproj— addedPackageReferenceforSystem.Data.Commonwith explanatory XML commentsrc/Microsoft.Data.SqlClient/src/Microsoft.Data.SqlClient.csproj— addedPackageReferenceforSystem.Data.Commonwith explanatory XML commenttools/specs/Microsoft.Data.SqlClient.nuspec— addedSystem.Data.Commonv4.3.0 dependency with explanatory XML commentThe XML comments in each file document why the NuGet package must be declared explicitly even though the assembly ships inbox on .NET Framework: the inbox version predates APIs such as
IDbColumnSchemaGenerator, and declaring the NuGet package ensures consumers receive the updated assembly (which type-forwards to the inbox assembly when the runtime already provides a newer version) and avoidCS0012errors.The branch has also been merged with
release/7.0to incorporate the latest pipeline and workflow changes from that branch.Issues
Testing
No automated tests were added or modified — this is a package reference and documentation fix only. The change ensures
System.Data.Commonv4.3.0 is declared as an explicit NuGet dependency fornet462consumers so that they receive the updated assembly and are not required to add a manual reference to avoidCS0012errors.Guidelines
Please review the contribution guidelines before submitting a pull request:
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.