[🚀 Feature]: do not copy unneccesary `selenium-manager` binaries via `Selenium.WebDriver` NuGet
Description
build\Selenium.WebDriver.targets just includes all selemium-manager binaries in the build regardless of (target) OS. It would be nice, if one could somehow control which ones are copied.
Our tests (currently) only run on windows, so the linux and macos binaries are never used and are just "bloat". Some Applications/Tests may have the <RuntimeIdentifier> or similar MsBuild-Properties set. However I guess it is not always present, if the package is included in e.g a "plain net8.0" project
So a dedicated property (that can be set in .csproj or Directory.Build.props)? (Empty=Default="copy all" to be non-breaking)
Have you considered any alternatives or workarounds?
manually delete unneeded binaries after dotnet publish
@LukasGelke, thank you for creating this issue. We will troubleshoot it as soon as we can.
Selenium Triage Team: remember to follow the Triage Guide
It will be resolved implicitly by https://github.com/SeleniumHQ/selenium/issues/15355
Seems that issue is on long shelf. But we can do something to be step closer.
Here I propose to start resolving this particular issue. We can consider selenium-manager.exe as "native library" and pack it appropriately. Meaning that nuget will deal with it as with native library. Then at runtime we will find the path to selenium-manager.exe.
Before re-packing nuget package, I ask help to test it in different environments like console app, test app, asp.net, anything else? Who is ready? Special case is the project who has packages.json file (I even don't know how to create new project in old style).
So I propose to pack SM in different way, meaning:
-
dotnet buildwill copy all SM binaries to output (it is OK, because I can build on Windows, and run on Linux) -
dotnet publishwill consume only necessary required SM binary per target OS; It allows users to publish theirs applications without "bloat", even as single file!
Let's do it!..
Well done, will be available in the next nightly release here: https://github.com/SeleniumHQ/selenium/pkgs/nuget/Selenium.WebDriver
This issue has been automatically locked since there has not been any recent activity since it was closed. Please open a new issue for related bugs.