Skip to content

[dotnet] Strongly signed assemblies#17397

Merged
nvborisenko merged 4 commits into
SeleniumHQ:trunkfrom
nvborisenko:dotnet-strong-name
Apr 27, 2026
Merged

[dotnet] Strongly signed assemblies#17397
nvborisenko merged 4 commits into
SeleniumHQ:trunkfrom
nvborisenko:dotnet-strong-name

Conversation

@nvborisenko

@nvborisenko nvborisenko commented Apr 26, 2026

Copy link
Copy Markdown
Member

Finally getting strongly named assemblies.

🔗 Related Issues

So many through the history. Fixes #12315 - don't wait v5, we don't follow SemVer.

💡 Additional Considerations

We should be loud, most likely blog post saying "Now we are strongly signed, that's it."

🔄 Types of changes

  • Breaking change (fix or feature that would cause existing functionality to change)

Copilot AI review requested due to automatic review settings April 26, 2026 21:16
@selenium-ci selenium-ci added C-dotnet .NET Bindings B-build Includes scripting, bazel and CI integrations B-support Issue or PR related to support classes labels Apr 26, 2026
@qodo-code-review

Copy link
Copy Markdown
Contributor

Review Summary by Qodo

Consolidate .NET assemblies with strong naming enabled by default

✨ Enhancement

Grey Divider

Walkthroughs

Description
• Consolidate strong naming into single assembly variant
• Remove separate StrongNamed NuGet packages and build targets
• Enable strong signing by default for all .NET assemblies
• Simplify build configuration and release process

Grey Divider

File Changes

1. dotnet/src/support/BUILD.bazel ⚙️ Configuration changes +1/-42

Remove separate strong-named support library variant

• Add keyfile parameter to support library build target
• Remove separate support-strongnamed library and support-strongnamed-pack targets
• Eliminate Selenium.WebDriver.Support.StrongNamed.nuspec packaging configuration

dotnet/src/support/BUILD.bazel


2. dotnet/src/webdriver/BUILD.bazel ⚙️ Configuration changes +2/-114

Remove separate strong-named webdriver library variants

• Add keyfile parameter to all webdriver library targets (net462, netstandard2.0, net8.0)
• Remove separate webdriver-*-strongnamed library variants for all frameworks
• Remove webdriver-strongnamed-pack NuGet packaging target
• Eliminate strong-named specific build configuration

dotnet/src/webdriver/BUILD.bazel


3. dotnet/src/support/Selenium.WebDriver.Support.csproj ⚙️ Configuration changes +2/-0

Enable strong assembly signing in project file

• Add SignAssembly property set to true
• Add AssemblyOriginatorKeyFile pointing to Selenium.snk
• Enable strong naming for all builds

dotnet/src/support/Selenium.WebDriver.Support.csproj


View more (5)
4. dotnet/src/webdriver/Selenium.WebDriver.csproj ⚙️ Configuration changes +2/-0

Enable strong assembly signing in project file

• Add SignAssembly property set to true
• Add AssemblyOriginatorKeyFile pointing to Selenium.snk
• Enable strong naming for all builds

dotnet/src/webdriver/Selenium.WebDriver.csproj


5. dotnet/BUILD.bazel ⚙️ Configuration changes +0/-11

Remove separate strong-named release package

• Remove strongnamed pkg_zip target that bundled strong-named assemblies
• Keep only single release pkg_zip target for distribution

dotnet/BUILD.bazel


6. rake_tasks/dotnet.rake ⚙️ Configuration changes +0/-2

Remove strong-named package distribution logic

• Remove copy and chmod operations for strongnamed.zip file
• Simplify package task to only handle single release artifact

rake_tasks/dotnet.rake


7. dotnet/src/support/Selenium.WebDriver.Support.StrongNamed.nuspec ⚙️ Configuration changes +0/-40

Remove strong-named support nuspec file

• Delete entire NuGet specification file for strong-named support package
• No longer needed as strong naming is now default

dotnet/src/support/Selenium.WebDriver.Support.StrongNamed.nuspec


8. dotnet/src/webdriver/Selenium.WebDriver.StrongNamed.nuspec ⚙️ Configuration changes +0/-67

Remove strong-named webdriver nuspec file

• Delete entire NuGet specification file for strong-named webdriver package
• No longer needed as strong naming is now default

dotnet/src/webdriver/Selenium.WebDriver.StrongNamed.nuspec


Grey Divider

Qodo Logo

@qodo-code-review

qodo-code-review Bot commented Apr 26, 2026

Copy link
Copy Markdown
Contributor

Code Review by Qodo

🐞 Bugs (0) 📘 Rule violations (0) 📎 Requirement gaps (1)

Grey Divider


Action required

1. Removed Selenium.WebDriver.StrongNamed pack 📎 Requirement gap ≡ Correctness
Description
This PR deletes the Selenium.WebDriver.StrongNamed NuGet packaging rules and its .nuspec, so a
strong-named package variant is no longer produced for publication to NuGet.org. This violates the
requirement that strong-named variants (at least Selenium.WebDriver.StrongNamed) be installable
via normal NuGet restore.
Code

dotnet/src/webdriver/BUILD.bazel[L283-308]

-nuget_pack(
-    name = "webdriver-strongnamed-pack",
-    files = {
-        "//common/images:selenium_logo_small.png": "icon.png",
-        "//common/manager:selenium-manager-linux": "manager/linux/selenium-manager",
-        "//common/manager:selenium-manager-macos": "manager/macos/selenium-manager",
-        "//common/manager:selenium-manager-windows": "manager/windows/selenium-manager.exe",
-        ":assets-nuget-readme": "README.md",
-        ":assets-nuget-build-props": "build/Selenium.WebDriver.StrongNamed.props",
-        ":assets-nuget-buildtransitive-props": "buildTransitive/Selenium.WebDriver.StrongNamed.props",
-    },
-    id = "Selenium.WebDriver.StrongNamed",
-    libs = {
-        ":webdriver-net462-strongnamed": "WebDriver.StrongNamed",
-        ":webdriver-net8.0-strongnamed": "WebDriver.StrongNamed",
-        ":webdriver-netstandard2.0-strongnamed": "WebDriver.StrongNamed",
-    },
-    nuspec_template = "Selenium.WebDriver.StrongNamed.nuspec",
-    tags = [
-        "block-network",
-    ],
-    version = SE_VERSION,
-    visibility = [
-        "//dotnet:__subpackages__",
-    ],
-)
Evidence
PR Compliance ID 1 requires strong-named/signed package variants (explicitly including
Selenium.WebDriver.StrongNamed) to be published and installable from NuGet.org. The diff removes
the nuget_pack target with id = "Selenium.WebDriver.StrongNamed" and deletes the corresponding
.nuspec, eliminating the packaging path for that strong-named variant.

Publish StrongNamed Selenium .NET packages to NuGet.org
dotnet/src/webdriver/BUILD.bazel[283-308]
dotnet/src/webdriver/Selenium.WebDriver.StrongNamed.nuspec[1-67]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
The PR removes the build packaging for the `Selenium.WebDriver.StrongNamed` NuGet package (and deletes its `.nuspec`). Compliance requires that strong-named variants (at least `Selenium.WebDriver.StrongNamed`) remain available and installable from NuGet.org.

## Issue Context
The current diff deletes the `nuget_pack` rule for `Selenium.WebDriver.StrongNamed`, which prevents producing/publishing that package via the standard NuGet workflow.

## Fix Focus Areas
- dotnet/src/webdriver/BUILD.bazel[283-308]
- dotnet/src/webdriver/Selenium.WebDriver.StrongNamed.nuspec[1-67]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


2. Selenium.WebDriver now signed📘 Rule violation ≡ Correctness
Description
The PR enables strong-name signing on existing user-facing assemblies, changing .NET assembly
identity (strong-name) and risking ABI incompatibilities for consumers during upgrade. This violates
the requirement to maintain API/ABI compatibility such that upgrades should not require user code
changes.
Code

dotnet/src/webdriver/Selenium.WebDriver.csproj[R9-10]

+    <SignAssembly>true</SignAssembly>
+    <AssemblyOriginatorKeyFile>..\..\Selenium.snk</AssemblyOriginatorKeyFile>
Evidence
PR Compliance ID 2 requires avoiding breaking API/ABI changes. The diff explicitly turns on assembly
signing (SignAssembly) and sets an originator key file for existing packages, which changes the
resulting assembly strong-name identity and can break existing references/load behavior when
upgrading.

AGENTS.md
dotnet/src/webdriver/Selenium.WebDriver.csproj[9-10]
dotnet/src/support/Selenium.WebDriver.Support.csproj[10-11]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
Enabling strong-name signing on existing user-facing assemblies changes the assembly identity/ABI for consumers. Compliance requires upgrades not to require user code changes due to API/ABI incompatibilities.

## Issue Context
The diff adds `SignAssembly` and `AssemblyOriginatorKeyFile` to existing `.csproj` files, which will produce strongly named assemblies under the same package identity.

## Fix Focus Areas
- dotnet/src/webdriver/Selenium.WebDriver.csproj[9-10]
- dotnet/src/support/Selenium.WebDriver.Support.csproj[10-11]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


Grey Divider

Qodo Logo

@selenium-ci

Copy link
Copy Markdown
Member

Thank you, @nvborisenko for this code suggestion.

The support packages contain example code that many users find helpful, but they do not necessarily represent
the best practices for using Selenium, and the Selenium team is not currently merging changes to them.

After reviewing the change, unless it is a critical fix or a feature that is needed for Selenium
to work, we will likely close the PR.

We actively encourage people to add the wrapper and helper code that makes sense for them to their own frameworks.
If you have any questions, please contact us

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 updates the .NET build and packaging pipeline so the primary Selenium .NET assemblies are strong-name signed by default, removing the separate “StrongNamed” artifacts/packages and aligning the release output around a single signed set of NuGet packages.

Changes:

  • Enable strong-name signing for Selenium.WebDriver and Selenium.Support in the SDK-style .csproj builds via Selenium.snk.
  • Configure Bazel csharp_library targets to sign the produced assemblies with the same key.
  • Remove StrongNamed-specific Bazel packaging targets, nuspec templates, and release zip staging.

Reviewed changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated no comments.

Show a summary per file
File Description
rake_tasks/dotnet.rake Stops staging the now-removed strongnamed.zip release artifact.
dotnet/src/webdriver/Selenium.WebDriver.csproj Enables strong-name signing for the main WebDriver assembly.
dotnet/src/webdriver/Selenium.WebDriver.StrongNamed.nuspec Removes the StrongNamed nuspec template (package no longer built).
dotnet/src/webdriver/BUILD.bazel Signs the main WebDriver Bazel outputs and removes StrongNamed build/pack targets.
dotnet/src/support/Selenium.WebDriver.Support.csproj Enables strong-name signing for the main Support assembly.
dotnet/src/support/Selenium.WebDriver.Support.StrongNamed.nuspec Removes the StrongNamed nuspec template (package no longer built).
dotnet/src/support/BUILD.bazel Signs the main Support Bazel outputs and removes StrongNamed build/pack targets.
dotnet/BUILD.bazel Removes the StrongNamed zip packaging target; release zip now contains only the signed primary packages.

Comment thread dotnet/src/webdriver/Selenium.WebDriver.csproj
Comment thread dotnet/src/webdriver/BUILD.bazel
Comment thread dotnet/src/webdriver/BUILD.bazel
Comment thread dotnet/src/support/BUILD.bazel
Copilot AI review requested due to automatic review settings April 27, 2026 10:09

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

Comments suppressed due to low confidence (1)

dotnet/src/webdriver/Selenium.WebDriver.csproj:14

  • With <AssemblyName> removed, this project will now emit Selenium.WebDriver.dll, but the AssemblyTitle metadata is still set to WebDriver. This can be confusing in file properties/logging and when diagnosing binding redirects; consider updating AssemblyTitle to match the new assembly identity/name (e.g., Selenium WebDriver).
  <PropertyGroup>
    <AssemblyTitle>WebDriver</AssemblyTitle>
    <Company>Selenium Committers</Company>

@nvborisenko nvborisenko merged commit d7c7abf into SeleniumHQ:trunk Apr 27, 2026
19 of 20 checks passed
@nvborisenko nvborisenko deleted the dotnet-strong-name branch April 27, 2026 17:05
@nvborisenko

Copy link
Copy Markdown
Member Author

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

Labels

B-build Includes scripting, bazel and CI integrations B-support Issue or PR related to support classes C-dotnet .NET Bindings

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[🚀 Feature]: Publish StrongNamed builds to nuget feed

3 participants