Skip to content

Commit 864f666

Browse files
Copilotmdaiglepaulmedynski
authored
Backport PR #4063 to release/7.0: Add missing System.Data.Common package reference (#4074)
* Backport PR #4063: Add missing System.Data.Common package reference Co-authored-by: mdaigle <4722049+mdaigle@users.noreply.github.com> Agent-Logs-Url: https://github.com/dotnet/SqlClient/sessions/1252dab5-81b0-4f0e-8e0a-3399d448fd96 * Document why System.Data.Common NuGet package is explicitly required 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 --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: mdaigle <4722049+mdaigle@users.noreply.github.com> Co-authored-by: paulmedynski <31868385+paulmedynski@users.noreply.github.com>
1 parent 10d2a55 commit 864f666

4 files changed

Lines changed: 21 additions & 0 deletions

File tree

Directory.Packages.props

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,7 @@
9494
<PackageVersion Include="Microsoft.IdentityModel.JsonWebTokens" Version="8.16.0" />
9595
<PackageVersion Include="Microsoft.IdentityModel.Protocols.OpenIdConnect" Version="8.16.0" />
9696
<PackageVersion Include="System.Buffers" Version="4.6.1" />
97+
<PackageVersion Include="System.Data.Common" Version="4.3.0" />
9798
<PackageVersion Include="System.Diagnostics.DiagnosticSource" Version="10.0.3" />
9899
<PackageVersion Include="System.Memory" Version="4.6.3" />
99100
<PackageVersion Include="System.Runtime.InteropServices.RuntimeInformation" Version="4.3.0" />

src/Microsoft.Data.SqlClient/netfx/ref/Microsoft.Data.SqlClient.csproj

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,13 @@
4343
<PackageReference Include="Microsoft.IdentityModel.JsonWebTokens" />
4444
<PackageReference Include="Microsoft.IdentityModel.Protocols.OpenIdConnect" />
4545
<PackageReference Include="System.Buffers" />
46+
<!-- System.Data.Common ships as an inbox assembly on .NET Framework, but the
47+
inbox version predates APIs such as IDbColumnSchemaGenerator. Declaring
48+
an explicit dependency on the NuGet package (which type-forwards to the
49+
inbox assembly when the runtime already provides a newer version) ensures
50+
that consumers also receive the updated assembly and avoid CS0012 errors
51+
when referencing types like IDbColumnSchemaGenerator via our public API. -->
52+
<PackageReference Include="System.Data.Common" />
4653
<PackageReference Include="System.Diagnostics.DiagnosticSource" />
4754
<PackageReference Include="System.Runtime.InteropServices.RuntimeInformation" />
4855
<PackageReference Include="System.Security.Cryptography.Pkcs" />

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

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,13 @@
117117
<PackageReference Include="Microsoft.IdentityModel.JsonWebTokens" />
118118
<PackageReference Include="Microsoft.IdentityModel.Protocols.OpenIdConnect" />
119119
<PackageReference Include="System.Buffers" />
120+
<!-- System.Data.Common ships as an inbox assembly on .NET Framework, but the
121+
inbox version predates APIs such as IDbColumnSchemaGenerator. Declaring
122+
an explicit dependency on the NuGet package (which type-forwards to the
123+
inbox assembly when the runtime already provides a newer version) ensures
124+
that consumers also receive the updated assembly and avoid CS0012 errors
125+
when referencing types like IDbColumnSchemaGenerator via our public API. -->
126+
<PackageReference Include="System.Data.Common" />
120127
<PackageReference Include="System.Diagnostics.DiagnosticSource" />
121128
<PackageReference Include="System.Memory" />
122129
<PackageReference Include="System.Runtime.InteropServices.RuntimeInformation" />

tools/specs/Microsoft.Data.SqlClient.nuspec

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,12 @@
4444
<dependency id="Microsoft.IdentityModel.JsonWebTokens" version="8.16.0" />
4545
<dependency id="Microsoft.IdentityModel.Protocols.OpenIdConnect" version="8.16.0" />
4646
<dependency id="System.Buffers" version="4.6.1" />
47+
<!-- System.Data.Common ships as an inbox assembly on .NET Framework, but
48+
the inbox version predates APIs such as IDbColumnSchemaGenerator.
49+
This explicit dependency ensures consumers receive the updated NuGet
50+
package version and avoid CS0012 errors when using types like
51+
IDbColumnSchemaGenerator exposed through our public API. -->
52+
<dependency id="System.Data.Common" version="4.3.0" />
4753
<dependency id="System.Diagnostics.DiagnosticSource" version="10.0.3" />
4854
<dependency id="System.Memory" version="4.6.3" />
4955
<dependency id="System.Runtime.InteropServices.RuntimeInformation" version="4.3.0" />

0 commit comments

Comments
 (0)