Skip to content

Change AKV Provider to target .NET Standard 2.0#4016

Open
paulmedynski wants to merge 16 commits intomainfrom
dev/paul/akv-netstandard
Open

Change AKV Provider to target .NET Standard 2.0#4016
paulmedynski wants to merge 16 commits intomainfrom
dev/paul/akv-netstandard

Conversation

@paulmedynski
Copy link
Contributor

@paulmedynski paulmedynski commented Mar 6, 2026

Description

This PR changes the AKV Provider to target .NET Standard 2.0 since it doesn't contain any code specific to .NET or .NET Framework. Changes include:

  • AKV Provider Changes:
    • Explicitly set <TargetFramework> to netstandard2.0 in the AKV Provider project.
    • Removed the add-ons/Directory.Build.props.
    • Absorbed the AKV Provider nuspec into the csproj.
  • Build Changes:
    • Added new BuildAkvProvider and PackAkvProvider targets to build.proj.
    • Removed all of the obsolete AKV Provider build targets.
    • Removed the GenerateAkvPackage target and all references to it.
    • Added BuildAllPackages and PackAllPackages targets.
    • Added BuildSqlClient and PackSqlClient targets to help fix the Docs-Build-Pack-Publish pipeline.
  • Pipeline Changes:
    • Updated pipelines to pack the AKV Provider directly.

Testing

Copilot AI review requested due to automatic review settings March 6, 2026 15:52
@paulmedynski paulmedynski added the Area\AKV Provider Use this label to tag issues that are targeted for AKV Provider codebase. label Mar 6, 2026
@github-project-automation github-project-automation bot moved this to To triage in SqlClient Board Mar 6, 2026
@paulmedynski paulmedynski moved this from To triage to In progress in SqlClient Board Mar 6, 2026
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 updates the Always Encrypted Azure Key Vault (AKV) Provider to target .NET Standard 2.0 and modernizes its packaging flow by moving from a standalone .nuspec/custom MSBuild target to SDK-style dotnet pack driven by the AKV Provider .csproj. It also updates build/pipeline wiring to use the new BuildAkvProvider/PackAkvProvider targets.

Changes:

  • Removed the legacy AKV .nuspec and GenerateAkvPackage MSBuild target infrastructure.
  • Updated the AKV Provider project to netstandard2.0 and embedded NuGet metadata into the .csproj.
  • Updated build and pipeline steps to build/pack the AKV Provider directly via dotnet pack and new build.proj targets.

Reviewed changes

Copilot reviewed 13 out of 13 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
tools/targets/add-ons/GenerateAkvPackage.targets Removes the legacy GenerateAkvPackage target.
tools/specs/add-ons/Microsoft.Data.SqlClient.AlwaysEncrypted.AzureKeyVaultProvider.nuspec Deletes the old AKV Provider .nuspec (packaging now via .csproj).
tools/specs/Microsoft.Data.SqlClient.nuspec Adds a header comment documenting required nuget pack properties (contains a small typo).
src/Microsoft.Data.SqlClient/add-ons/Directory.Build.props Removes add-ons-specific props file (AKV now uses standard props chain).
src/Microsoft.Data.SqlClient/add-ons/AzureKeyVaultProvider/Microsoft.Data.SqlClient.AlwaysEncrypted.AzureKeyVaultProvider.csproj Sets netstandard2.0 and absorbs NuGet package metadata/config into the project.
eng/pipelines/onebranch/variables/common-variables.yml Removes akvNuspecPath variable (no longer applicable).
eng/pipelines/onebranch/steps/roslyn-analyzers-akv-step.yml Updates build target from BuildAkv to BuildAkvProvider.
eng/pipelines/onebranch/steps/compound-build-akv-step.yml Updates build target naming/usage to BuildAkvProvider.
eng/pipelines/onebranch/jobs/build-akv-official-job.yml Switches AKV packaging step from nuspec-based to dotnet pack on the .csproj.
eng/pipelines/common/templates/steps/ci-project-build-step.yml Replaces old AKV build targets with BuildAkvProvider (but introduces a Windows gating issue).
eng/pipelines/common/templates/jobs/ci-build-nugets-job.yml Switches AKV packaging from nuspec-based step to dotnet pack on the .csproj.
build.proj Removes GenerateAkvPackage.targets import; adds BuildAkvProvider/PackAkvProvider; updates BuildSqlClient deps.
BUILDGUIDE.md Documents the new BuildAkvProvider/PackAkvProvider targets and removes obsolete AKV targets.
Comments suppressed due to low confidence (1)

src/Microsoft.Data.SqlClient/add-ons/AzureKeyVaultProvider/Microsoft.Data.SqlClient.AlwaysEncrypted.AzureKeyVaultProvider.csproj:78

  • Switching AKV Provider packaging from a nuspec to SDK-style dotnet pack means the project’s PackageReferences/ProjectReferences now flow into the produced NuGet dependency graph. This project currently references Microsoft.Data.SqlClient.Extensions.Logging, which the removed nuspec did not list, so this change will add/alter external package dependencies for consumers. If the AKV provider doesn’t actually use Logging APIs, remove that reference or mark it as PrivateAssets=all to avoid changing the published dependency set.
  <!-- References ====================================================== -->
  <!-- MDS Reference -->
  <ItemGroup>
    <ProjectReference Include="$(RepoRoot)/src/Microsoft.Data.SqlClient/ref/Microsoft.Data.SqlClient.csproj"
                      Condition="'$(ReferenceType)' != 'Package'" />
    <PackageReference Include="Microsoft.Data.SqlClient"
                      Condition="'$(ReferenceType)' == 'Package'" />
  </ItemGroup>

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

Copilot AI review requested due to automatic review settings March 6, 2026 19: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

Copilot reviewed 17 out of 17 changed files in this pull request and generated 3 comments.


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

@codecov
Copy link

codecov bot commented Mar 6, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 65.36%. Comparing base (326a242) to head (467ec7d).
⚠️ Report is 3 commits behind head on main.

❗ There is a different number of reports uploaded between BASE (326a242) and HEAD (467ec7d). Click for more details.

HEAD has 1 upload less than BASE
Flag BASE (326a242) HEAD (467ec7d)
CI-SqlClient 1 0
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4016      +/-   ##
==========================================
- Coverage   72.65%   65.36%   -7.29%     
==========================================
  Files         287      275      -12     
  Lines       43134    65809   +22675     
==========================================
+ Hits        31337    43017   +11680     
- Misses      11797    22792   +10995     
Flag Coverage Δ
CI-SqlClient ?
PR-SqlClient-Project 65.36% <ø> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copilot AI review requested due to automatic review settings March 6, 2026 20:53
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

Copilot reviewed 18 out of 18 changed files in this pull request and generated 2 comments.


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

Copilot AI review requested due to automatic review settings March 9, 2026 11:47
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

Copilot reviewed 22 out of 22 changed files in this pull request and generated 2 comments.


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

@paulmedynski paulmedynski added this to the 7.0.0 milestone Mar 9, 2026
Copilot AI review requested due to automatic review settings March 9, 2026 15:44
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

Copilot reviewed 28 out of 28 changed files in this pull request and generated 1 comment.


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

@paulmedynski paulmedynski marked this pull request as ready for review March 9, 2026 19:10
@paulmedynski paulmedynski requested a review from a team as a code owner March 9, 2026 19:10
Copilot AI review requested due to automatic review settings March 9, 2026 19:10
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

Copilot reviewed 29 out of 29 changed files in this pull request and generated 1 comment.


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

Copilot AI review requested due to automatic review settings March 10, 2026 11:59
@paulmedynski paulmedynski force-pushed the dev/paul/akv-netstandard branch from 30d23f5 to 39a9974 Compare March 10, 2026 11:59
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

Copilot reviewed 34 out of 34 changed files in this pull request and generated 2 comments.


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

Copy link
Contributor

Copilot AI commented Mar 10, 2026

@paulmedynski I've opened a new pull request, #4025, to work on those changes. Once the pull request is ready, I'll request review from you.

Copy link
Contributor

Copilot AI commented Mar 10, 2026

@paulmedynski I've opened a new pull request, #4026, to work on those changes. Once the pull request is ready, I'll request review from you.

Copilot AI and others added 2 commits March 10, 2026 09:46
Co-authored-by: paulmedynski <31868385+paulmedynski@users.noreply.github.com>
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
…wnstream outputs (#4025)

Co-authored-by: paulmedynski <31868385+paulmedynski@users.noreply.github.com>
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings March 10, 2026 12:46
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

Copilot reviewed 35 out of 35 changed files in this pull request and generated 1 comment.


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

mdaigle
mdaigle previously approved these changes Mar 10, 2026
Copilot AI review requested due to automatic review settings March 10, 2026 19:23
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

Copilot reviewed 36 out of 36 changed files in this pull request and generated 3 comments.


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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area\AKV Provider Use this label to tag issues that are targeted for AKV Provider codebase.

Projects

Status: In progress

Development

Successfully merging this pull request may close these issues.

4 participants