Add assembly signing for Microsoft.Data.SqlClient.Extensions.Abstractions - #4568
Draft
paulmedynski wants to merge 1 commit into
Draft
Add assembly signing for Microsoft.Data.SqlClient.Extensions.Abstractions#4568paulmedynski 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 extends the SqlClient build/test pipeline and the Extensions.Abstractions projects to support strong-name signing for internal (ADO.NET) package-mode builds, ensuring InternalsVisibleTo (IVT) continues to function when assemblies are signed.
Changes:
- Updated Abstractions test TFMs to build
net462only on Windows, matching the Abstractions build availability. - Added signed-assembly IVT handling in
Abstractions.csproj(public-key-qualified IVT when signing in Package mode). - Plumbed internal-build signing support through CI templates (download signing keys, pass signing properties, and propagate
isInternalBuild).
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| src/Microsoft.Data.SqlClient.Extensions/Abstractions/test/Abstractions.Test.csproj | Makes net462 conditional on Windows and adds test-assembly signing when a test key is provided. |
| src/Microsoft.Data.SqlClient.Extensions/Abstractions/src/Abstractions.csproj | Adds IVT configuration for signed Package-mode builds using a public-key-qualified entry. |
| eng/pipelines/stages/build-abstractions-package-ci-stage.yml | Adds isInternalBuild parameter plumbing and passes computed package version into test jobs. |
| eng/pipelines/jobs/test-abstractions-package-ci-job.yml | Adds internal-build signing support and package-mode dependency download for Logging artifacts. |
| eng/pipelines/jobs/pack-abstractions-package-ci-job.yml | Adds internal-build signing support when packing Abstractions in Package mode. |
| eng/pipelines/dotnet-sqlclient-ci-core.yml | Threads isInternalBuild into the Abstractions build stage. |
| build.proj | Enables Abstractions tests to run in Package mode and supports signing arguments for internal builds. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
+148
to
+152
| packagesToPack: $(project) | ||
| configurationToPack: ${{ parameters.buildConfiguration }} | ||
| packDirectory: $(dotnetPackagesDir) | ||
| verbosityToPack: ${{ parameters.dotnetVerbosity }} | ||
| buildProperties: SqlClientPackageVersion=${{ parameters.packageVersion }};ReferenceType=Package;BuildNumber=$(Build.BuildNumber);SigningKeyPath=$(driverKeyFile.secureFilePath) |
Comment on lines
+125
to
+130
| # Signing arguments — only set for internal Package-mode builds. | ||
| - ${{ if and(eq(parameters.isInternalBuild, true), ne(parameters.referenceType, 'Project')) }}: | ||
| - name: signingArguments | ||
| value: >- | ||
| -p:SigningKeyPath=$(driverKeyFile.secureFilePath) | ||
| -p:TestSigningKeyPath=$(testKeyFile.secureFilePath) |
…ions Sign the Abstractions package and its test assembly on internal Package-mode builds, and make the Abstractions CI jobs actually honour Package mode. - Thread isInternalBuild through the Abstractions stage into the pack and test jobs, downloading the driver and test signing keys as needed. - Add a signed InternalsVisibleTo grant for the test assembly, and sign the test assembly when a test key is supplied. - Pass packageVersion, loggingArtifactsName and referenceType into the test jobs, and download the Logging artifacts, so Package mode is exercised. - Correct the pack job to use the canonical SqlClientPackageVersion and BuildNumber properties instead of undeclared per-package parameters. - Thread signing and reference-type arguments into the build.proj TestAbstractions target. - Build the Abstractions test project for net462 only on Windows hosts.
paulmedynski
force-pushed
the
dev/paul/assembly-signing-abstractions
branch
from
August 21, 2026 15:33
329c000 to
73cd48a
Compare
Comment on lines
+7
to
+11
| <!-- | ||
| The Abstractions project is not built for net462 unless it is built for Windows. Thus, we | ||
| will not be able to fulfill the Abstractions for net462 reference unless we are building on | ||
| Windows. | ||
| --> |
Comment on lines
+23
to
+27
| # The version to apply to the SqlClient family packages. This is used when | ||
| # referenceType is 'Package'. | ||
| - name: packageVersion | ||
| type: string | ||
|
|
Comment on lines
884
to
889
| <!-- TestAbstractions: Runs Microsoft.Data.SqlClient.Extensions.Abstractions.Tests --> | ||
| <Target Name="TestAbstractions"> | ||
| <PropertyGroup> | ||
| <!-- | ||
| Note: This test exclusively uses project references, so neither ReferenceType nor any | ||
| package version arguments are specified in this command. | ||
| --> | ||
| <LogFilePrefix>AbstractionsTests-$(OS)</LogFilePrefix> | ||
| <LogFilePrefix Condition="'$(TestFramework)' != ''">$(LogFilePrefix)-$(TestFramework)</LogFilePrefix> | ||
|
|
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: