Thanks Tom, you got me to rethink the problem.
Normally in the .NET 8 runtime dependencies should be loaded from *.deps.json file in the same folder.
My net8.0 Revit 2025 plugin works like that.
Self contained will include all dependencies for NET Core. It will be duplicated and potentially dangerous if you provide it with your plugin, since Rhino comes with NET 8 itself (but in a different minor version). However you can try to use -p:PublishTrimmed=true (or as an option in the csproj) to only get the relevant parts of NET 8 used in your plugin. You just need to be aware not to use Reflection. In this case its dangerous to publish trimmed.
Oddly using --self-contained does not include the full net8 runtime. When I building locally. And using PublishTrimmed fails to build in F#. It complains about a missing assembly entry point. Fair enough, Rhino plugins are libraries, they don’t have an entry point like standalone exe apps. That missing entry point might also be the reason why --self-contained does not include the full runtime. I didn’t test. At least I have a working solution. I had to do some copying of files to get the right directory structure for Rhino YAK. The build process is here: release.yml