Skip to content

Conversation

nvborisenko
Copy link
Member

@nvborisenko nvborisenko commented Oct 9, 2025

User description

🔗 Related Issues

Fixes #16400

🔄 Types of changes

  • Bug fix (backwards compatible)

PR Type

Bug fix


Description

  • Remove RuntimeIdentifiers condition check in MSBuild targets

  • Enable Selenium Manager binary copying for more .NET Framework projects


Diagram Walkthrough

flowchart LR
  A["MSBuild Condition"] -- "Remove RuntimeIdentifiers check" --> B["More Projects Supported"]
  B --> C["Selenium Manager Binaries Copied"]
Loading

File Walkthrough

Relevant files
Bug fix
Selenium.WebDriver.targets
Simplify MSBuild condition for binary copying                       

dotnet/src/webdriver/assets/nuget/build/Selenium.WebDriver.targets

  • Remove RuntimeIdentifiers empty check from MSBuild condition
  • Simplify condition to only check RuntimeIdentifier and target
    framework
+1/-1     

@selenium-ci selenium-ci added the C-dotnet .NET Bindings label Oct 9, 2025
Copy link
Contributor

qodo-merge-pro bot commented Oct 9, 2025

PR Compliance Guide 🔍

Below is a summary of compliance checks for this PR:

Security Compliance
🟢
No security concerns identified No security vulnerabilities detected by AI analysis. Human verification advised for critical code.
Ticket Compliance
🟡
🎫 #16400
🟢 Modify build/packaging so that absence of RuntimeIdentifiers does not block copying the
Selenium Manager binary.
Maintain backward compatibility and not affect projects that explicitly set a
RuntimeIdentifier.
Ensure Selenium Manager binary (selenium-manager.exe) is copied/deployed for .NET
Framework projects using ClickOnce/VSTO after updating to v4.36.0+ (regression from
4.35.0).
Codebase Duplication Compliance
Codebase context is not defined

Follow the guide to enable codebase context checks.

Custom Compliance
No custom compliance provided

Follow the guide to enable custom compliance check.

Compliance status legend 🟢 - Fully Compliant
🟡 - Partial Compliant
🔴 - Not Compliant
⚪ - Requires Further Human Verification
🏷️ - Compliance label

Copy link
Contributor

qodo-merge-pro bot commented Oct 9, 2025

PR Code Suggestions ✨

Explore these optional code suggestions:

CategorySuggestion                                                                                                                                    Impact
Learned
best practice
Reintroduce multi-RID empty check

Restore the $(RuntimeIdentifiers) empty check to ensure the copy runs only when
both single and multiple RIDs are unset, preventing missed copies for multi-RID
projects.

dotnet/src/webdriver/assets/nuget/build/Selenium.WebDriver.targets [6-10]

-<ItemGroup Condition="'$(RuntimeIdentifier)' == '' and '$(TargetFrameworkIdentifier)' == '.NETFramework'">
+<ItemGroup Condition="'$(RuntimeIdentifier)' == '' and '$(RuntimeIdentifiers)' == '' and '$(TargetFrameworkIdentifier)' == '.NETFramework'">
   <Content Include="$(MSBuildThisFileDirectory)..\runtimes\win\native\selenium-manager.exe">
     <Link>runtimes\win\native\%(Filename)%(Extension)</Link>
     <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
     <Visible>False</Visible>
  • Apply / Chat
Suggestion importance[1-10]: 6

__

Why:
Relevant best practice - Validate inputs and states early to prevent logic errors; avoid narrowing conditions that can skip necessary behavior for valid configurations.

Low
  • More

@cgoldberg cgoldberg changed the title [dotnet] Help more .NETFramework projects to copy SM bineries to output [dotnet] Help more .NETFramework projects to copy SM binaries to output Oct 9, 2025
@nvborisenko nvborisenko merged commit 6dcb5a6 into SeleniumHQ:trunk Oct 9, 2025
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[🐛 Bug]: [dotnet] C# VSTO + ClickOnce: error message "selenium-manager.exe not found" (NuGet update v4.35.0 -> v4.36.0)
3 participants