Fix AKV Provider ref project reference propagating ref assembly to downstream outputs#4025
Merged
paulmedynski merged 2 commits intodev/paul/akv-netstandardfrom Mar 10, 2026
Merged
Conversation
…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
approved these changes
Mar 10, 2026
Contributor
There was a problem hiding this comment.
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 refProjectReferencein 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.
0bbf5df
into
dev/paul/akv-netstandard
26 of 161 checks passed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When
ReferenceType=Project, the AKV Provider referenced the MDS ref project (src/Microsoft.Data.SqlClient/ref/) withoutPrivate="false", causing the ref-onlyMicrosoft.Data.SqlClient.dllto be copied into downstream outputs (e.g. ManualTests). This conflicts with the real implementation assembly at runtime.Description
Private="false"to the MDS refProjectReferenceinAzureKeyVaultProvider.csproj.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
notsupportedproject.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.