Skip to content

Fix AKV Provider ref project reference propagating ref assembly to downstream outputs#4025

Merged
paulmedynski merged 2 commits intodev/paul/akv-netstandardfrom
copilot/sub-pr-4016
Mar 10, 2026
Merged

Fix AKV Provider ref project reference propagating ref assembly to downstream outputs#4025
paulmedynski merged 2 commits intodev/paul/akv-netstandardfrom
copilot/sub-pr-4016

Conversation

Copy link
Contributor

Copilot AI commented Mar 10, 2026

When ReferenceType=Project, the AKV Provider referenced the MDS ref project (src/Microsoft.Data.SqlClient/ref/) without Private="false", causing the ref-only Microsoft.Data.SqlClient.dll to be copied into downstream outputs (e.g. ManualTests). This conflicts with the real implementation assembly at runtime.

Description

  • Bug fix: Added Private="false" to the MDS ref ProjectReference in AzureKeyVaultProvider.csproj.
<ProjectReference Include="$(RepoRoot)/src/Microsoft.Data.SqlClient/ref/Microsoft.Data.SqlClient.csproj"
                  Condition="'$(ReferenceType)' != 'Package'"
                  Private="false" />

The ref assembly is still used for compilation (MDS types resolve correctly), but is no longer copied to the AKV Provider's output or propagated transitively to consuming projects. This matches the pattern used in the notsupported project.

Issues

Triggered by review comment on #4016.

Testing

No automated tests added — the fix prevents a build/runtime conflict that would manifest as a duplicate-assembly error in downstream outputs. The CI project-reference build path exercises this scenario.

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.

…ref assembly from being copied to outputs

Co-authored-by: paulmedynski <31868385+paulmedynski@users.noreply.github.com>
Copilot AI changed the title [WIP] Update feedback on AKV Provider targeting .NET Standard 2.0 Fix AKV Provider ref project reference propagating ref assembly to downstream outputs Mar 10, 2026
@paulmedynski paulmedynski marked this pull request as ready for review March 10, 2026 12:27
@paulmedynski paulmedynski requested a review from a team as a code owner March 10, 2026 12:27
Copilot AI review requested due to automatic review settings March 10, 2026 12:27
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes a build/runtime conflict where the AKV Provider's reference to the MDS ref project (src/Microsoft.Data.SqlClient/ref/) was inadvertently causing the ref-only Microsoft.Data.SqlClient.dll to be copied into downstream outputs (e.g., ManualTests). When a project simultaneously references both the real MDS implementation and the AKV Provider (which transitively brought the ref-only DLL along), two conflicting copies of Microsoft.Data.SqlClient.dll could end up in the output directory. The fix follows the same pattern already used in the notsupported project.

Changes:

  • Added Private="false" to the MDS ref ProjectReference in the AKV Provider csproj, preventing the ref-only assembly from being copied to local output and propagated transitively to downstream consumers.

You can also share your feedback on Copilot code review. Take the survey.

@paulmedynski paulmedynski merged commit 0bbf5df into dev/paul/akv-netstandard Mar 10, 2026
26 of 161 checks passed
@paulmedynski paulmedynski deleted the copilot/sub-pr-4016 branch March 10, 2026 12:46
@github-project-automation github-project-automation bot moved this from To triage to Done in SqlClient Board Mar 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants