Add assembly signing for Microsoft.Data.SqlClient and the AKV Provider - #4569
Draft
paulmedynski wants to merge 1 commit into
Draft
Add assembly signing for Microsoft.Data.SqlClient and the AKV Provider#4569paulmedynski wants to merge 1 commit into
paulmedynski wants to merge 1 commit into
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR wires up internal CI support for strong-name signing of Microsoft.Data.SqlClient and the AKV provider by threading an isInternalBuild flag through pipeline templates, downloading signing keys from ADO secure files, and passing signing-related MSBuild properties into build.proj-driven build/test steps.
Changes:
- Plumbs a new
isInternalBuildparameter through core/stage templates so internal builds can enable extra steps (assembly signing). - Adds secure-file download + parameter plumbing to pass signing key paths into build/test template invocations (including separate test signing key support).
- Updates
build.projtest targetdotnet testinvocations to include signing-related MSBuild arguments (with review feedback about unintended signing of test assemblies).
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| eng/pipelines/stages/build-sqlclient-package-ci-stage.yml | Adds isInternalBuild parameter and forwards it to the SqlClient package build job. |
| eng/pipelines/dotnet-sqlclient-ci-core.yml | Threads isInternalBuild into the SqlClient package stage and test stage template calls. |
| eng/pipelines/common/templates/steps/run-all-tests-step.yml | Adds signingKeyPath / testSigningKeyPath parameters and passes them through to build.proj test targets. |
| eng/pipelines/common/templates/steps/ci-project-build-step.yml | Adds signingKeyPath parameter and forwards it to build.proj for MDS/AKV builds. |
| eng/pipelines/common/templates/stages/ci-run-tests-stage.yml | Adds isInternalBuild parameter and forwards it into the test job template. |
| eng/pipelines/common/templates/jobs/ci-run-tests-job.yml | Downloads driver/test signing keys (internal + Package mode) and forwards their paths to the test step template. |
| eng/pipelines/common/templates/jobs/ci-build-nugets-job.yml | Downloads the driver signing key (internal + Package mode) and forwards it to the build step template for package builds. |
| build.proj | Threads signing-related properties into dotnet test commands; also uses SigningKeyPath to include/exclude category=signed tests. |
Suppressed comments (2)
build.proj:694
- Forwarding
SigningKeyPathinto the functional/manual test project build will strong-name sign those test assemblies with the driver key viasrc/Directory.Build.props. This is likely unnecessary (and potentially undesirable) if only UnitTests needs signing (withTestSigningKeyPath) to satisfyInternalsVisibleTofor signed packages.
<!-- Build arguments -->
-p:Configuration=$(Configuration)
$(SigningKeyPathArgument)
<!-- Test arguments -->
build.proj:728
- For UnitTests,
TestSigningKeyPathis the mechanism intended to sign the test assembly for IVT when the driver is signed in Package mode. ForwardingSigningKeyPathhere additionally signs the test assembly with the driver key (unless overridden) and enablesSTRONG_NAME_SIGNINGfor the test build, which seems outside the stated goal of signing tests only with the test key.
<!-- Build arguments -->
-p:Configuration=$(Configuration)
$(SigningKeyPathArgument)
$(TestSigningKeyPathArgument)
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
+641
to
+645
| <!-- Build arguments --> | ||
| -p:Configuration=$(Configuration) | ||
| $(SigningKeyPathArgument) | ||
|
|
||
| <!-- Test arguments --> |
Sign the SqlClient and AKV Provider assemblies, and the SqlClient test assemblies, on internal Package-mode CI builds. SqlClient references Abstractions, Logging and SqlServer.Server, so those packages must already be signed for this to build; a strong-named assembly referencing a weak-named one fails with CS8002. - Thread isInternalBuild from the CI core into the SqlClient package stage and the test stage, and download the driver and test signing keys in the build and test jobs. - Pass signingKeyPath to the project build step and both signing key paths to the test steps. - Thread SigningKeyPath into the build.proj TestSqlClientFunctional and TestSqlClientManual targets, and both key arguments into TestSqlClientUnit.
paulmedynski
force-pushed
the
dev/paul/assembly-signing-sqlclient
branch
from
August 21, 2026 15:33
ca6b9db to
bd2f4a9
Compare
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.
Description
Provide a summary of the changes being introduced. Important topics to cover
include:
High quality descriptions will lead to a smoother review experience.
Issues
Link to any relevant issues, bugs, or discussions (e.g.,
Closes #123,Fixes issue #456).Testing
Describe the automated tests (unit, integration) you created or modified.
Provide justification for any gap in automated testing. List any manual testing
steps that were performed to ensure the changes work.
Guidelines
Please review the contribution guidelines before submitting a pull request: