Skip to content

Add assembly signing for Microsoft.Data.SqlClient.Extensions.Abstractions - #4568

Draft
paulmedynski wants to merge 1 commit into
dev/paul/assembly-signing-loggingfrom
dev/paul/assembly-signing-abstractions
Draft

Add assembly signing for Microsoft.Data.SqlClient.Extensions.Abstractions#4568
paulmedynski wants to merge 1 commit into
dev/paul/assembly-signing-loggingfrom
dev/paul/assembly-signing-abstractions

Conversation

@paulmedynski

Copy link
Copy Markdown
Contributor

Description

Provide a summary of the changes being introduced. Important topics to cover
include:

  • Description of the functionality.
  • API changes, backwards compatibility, deprecations, etc.
  • Documentation, localization.
  • Bug fixes.
  • Code hygiene, refactoring, improvements.
  • Engineering processes (CI, pipelines, test coverage)

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:

Copilot AI lite review requested due to automatic review settings August 21, 2026 14:38
@github-project-automation github-project-automation Bot moved this to To triage in SqlClient Board Aug 21, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 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 net462 only 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.
Copilot AI review requested due to automatic review settings August 21, 2026 15:33
@paulmedynski
paulmedynski force-pushed the dev/paul/assembly-signing-abstractions branch from 329c000 to 73cd48a Compare August 21, 2026 15:33
@paulmedynski paulmedynski added this to the 8.0.0-preview1 milestone Aug 21, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 7 out of 7 changed files in this pull request and generated 3 comments.

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 thread build.proj
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>

@paulmedynski paulmedynski added Area\Engineering Use this for issues that are targeted for changes in the 'eng' folder or build systems. Area\Azure Connectivity Use this to tag issues that are related to Azure connectivity. labels Aug 21, 2026
@paulmedynski paulmedynski moved this from To triage to In progress in SqlClient Board Aug 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area\Azure Connectivity Use this to tag issues that are related to Azure connectivity. Area\Engineering Use this for issues that are targeted for changes in the 'eng' folder or build systems.

Projects

Status: In progress

Development

Successfully merging this pull request may close these issues.

2 participants