Rename STRONG_NAME_SIGNING to ASSEMBLY_SIGNING - #4383
Conversation
…stractions Bare-minimum changes to produce and test signed assemblies in the CI Package pipeline, plus the Abstractions strong-name verification of the SqlClient assembly. - Add the download-assembly-signing-key pipeline step and thread SigningKeyPath / TestSigningKeyPath through the CI Package build, pack, and test jobs so the SqlClient package and its tests are produced and run signed. - Thread isInternalBuild through the SqlClient and Abstractions package stages. - In SqlAuthenticationProvider (Abstractions), verify the loaded Microsoft.Data.SqlClient assembly's public key token when STRONG_NAME_SIGNING is defined, with defense-in-depth post-load verification on .NET Core. - Add conditional signed InternalsVisibleTo and test-assembly signing for the Abstractions project and its tests.
Rename the conditional-compilation constant from STRONG_NAME_SIGNING to ASSEMBLY_SIGNING and align comments, log messages, and documentation from "strong name" to "assembly signing" terminology across the shared build configuration, SqlClient source, and tests.
There was a problem hiding this comment.
Pull request overview
Terminology-only rename across the repo to standardize on ASSEMBLY_SIGNING (replacing STRONG_NAME_SIGNING) and to update surrounding “strong name” wording to “assembly signing” / “strong-name identity” phrasing, covering MSBuild props, source, project files, tests, and pipeline docs.
Changes:
- Rename conditional compilation constant
STRONG_NAME_SIGNING→ASSEMBLY_SIGNINGand update call sites. - Update MSBuild/pipeline/project comments to “Assembly signing” terminology.
- Update test comments around the
signedtrait to avoid “strong-name signed” phrasing.
Reviewed changes
Copilot reviewed 17 out of 17 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| src/Microsoft.Data.SqlClient/tests/UnitTests/Microsoft.Data.SqlClient.UnitTests.csproj | Rename signing section comment to “Assembly signing”. |
| src/Microsoft.Data.SqlClient/tests/tools/Microsoft.Data.SqlClient.TestUtilities/Microsoft.Data.SqlClient.TestUtilities.csproj | Rename signing section comment to “Assembly signing”. |
| src/Microsoft.Data.SqlClient/tests/ManualTests/SQL/UdtTest/SqlServerTypesTest.cs | Update signed category comments to “signed assembly” wording. |
| src/Microsoft.Data.SqlClient/tests/FunctionalTests/SqlDataRecordTest.cs | Update signed category comments to “signed assembly” wording. |
| src/Microsoft.Data.SqlClient/tests/Common/Microsoft.Data.SqlClient.TestCommon.csproj | Rename signing section comment to “Assembly signing”. |
| src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/SqlAuthenticationProviderManager.cs | Switch #if guard to ASSEMBLY_SIGNING and adjust log/comment wording. |
| src/Microsoft.Data.SqlClient/src/Microsoft.Data.SqlClient.csproj | Rename signing section header to “Assembly signing”. |
| src/Microsoft.Data.SqlClient/ref/Microsoft.Data.SqlClient.csproj | Rename signing section header to “Assembly signing”. |
| src/Microsoft.Data.SqlClient/notsupported/Microsoft.Data.SqlClient.csproj | Rename signing section header to “Assembly signing”. |
| src/Microsoft.Data.SqlClient.Extensions/Abstractions/test/Abstractions.Test.csproj | Rename signing section header to “Assembly signing”. |
| src/Microsoft.Data.SqlClient.Extensions/Abstractions/src/SqlAuthenticationProvider.Internal.cs | Switch #if guard to ASSEMBLY_SIGNING and adjust comments. |
| src/Microsoft.Data.SqlClient.Extensions/Abstractions/src/Abstractions.csproj | Rename signing section header to “Assembly signing”. |
| src/Microsoft.Data.SqlClient.AlwaysEncrypted.AzureKeyVaultProvider/src/Microsoft.Data.SqlClient.AlwaysEncrypted.AzureKeyVaultProvider.csproj | Rename signing section header to “Assembly signing”. |
| src/Directory.Build.props | Define ASSEMBLY_SIGNING when SigningKeyPath is set; update comments. |
| eng/pipelines/onebranch/steps/build-buildproj-step.yml | Update documentation comment to “always signs”. |
| eng/pipelines/ci/package/sqlclient-package.yml | Update documentation comment to “assembly signing key”. |
| build.proj | Update SigningKeyPath and signed-test filter documentation wording. |
|
|
||
| <!-- Strong name signing ============================================= --> | ||
| <!-- Assembly signing ============================================= --> | ||
| <!-- Strong naming is being done in Directory.Build.props --> |
| SigningKeyPath | ||
| Applies to: Build*, Pack* | ||
| Description: Path to the key to use to strong name sign binaries. If omitted, binaries | ||
| will not be strong name signed. | ||
| Description: Path to the key to use to sign driver assemblies. If omitted, driver | ||
| assemblies will not be signed. |
| Exclude tests in the "signed" category when building unsigned assemblies. We have some tests | ||
| that require signed assemblies, and they would fail with strong name validation exceptions on | ||
| that require signed assemblies, and they would fail with assembly validation exceptions on | ||
| .NET Framework. |
benrr101
left a comment
There was a problem hiding this comment.
I know it's not ready, so I won't outright reject it yet. But ... why?
To me, this changes the name from a specific kind of signing to a more general kind of signing. In my mind there's two kinds of signing:
- Strong-name signing - Signing the assembly with a key file at build time. This is what generates the "strong name" for the assembly, and it's a well-known signing method in the .NET ecosystem https://learn.microsoft.com/en-us/dotnet/standard/assembly/sign-strong-name
- ESRP Signing (which I think is also called Authenticode) - Signing that only happens during official builds. Applies to the assembly as well as the nuget package.
To rename this to "assembly signing" makes it more ambiguous, imo.
7ab93d0 to
b30d7ec
Compare
|
Moved this work to stack #4571 rooted at #4566. |
Summary
Pure terminology rename:
STRONG_NAME_SIGNING→ASSEMBLY_SIGNING(and related "strong name" wording → "assembly signing" / "strong-name identity") acrosssrc/Directory.Build.props, source files, csproj files, and pipeline YAML.No functional change — this only renames the conditional-compilation constant and aligns comments/wording.
🔗 PR Stack
Part of a 6-PR stack — current PR marked 👉. Indentation shows the branch base.
mainSTRONG_NAME_SIGNING→ASSEMBLY_SIGNINGMicrosoft.SqlServer.Serverassembly & CIflowchart TD main([main]) PR1["🏗️ #4382<br/>signing-core"] AOT["✂️ #4348<br/>aot"] PR2["🏷️ #4383<br/>rename"] PR3["🪵 #4384<br/>logging-tests"] PR4["☁️ #4385<br/>azure-signing"] PR5["🧩 #4386<br/>sqlserver.server"] main --> PR1 PR1 --> AOT PR1 --> PR2 PR2 --> PR3 PR2 --> PR4 PR2 --> PR5 click PR1 "https://github.com/dotnet/SqlClient/pull/4382" _blank click AOT "https://github.com/dotnet/SqlClient/pull/4348" _blank click PR2 "https://github.com/dotnet/SqlClient/pull/4383" _blank click PR3 "https://github.com/dotnet/SqlClient/pull/4384" _blank click PR4 "https://github.com/dotnet/SqlClient/pull/4385" _blank click PR5 "https://github.com/dotnet/SqlClient/pull/4386" _blank classDef current fill:#1f6feb,stroke:#1f6feb,color:#fff; class PR2 current;Checklist
STRONG_NAME_SIGNINGreferences remain