Issue Description
"C:\Program Files\dotnet\dotnet.exe" publish project --configuration Release --self-contained true --property:PublishReadyToRun=true --runtime osx-x64 --output artifacts\publish\osx-x64_v0.0.1

Steps to Reproduce
Publish ready to run to osx or linux with gsudo nuget in solution
dotnet add package gsudo --version 2.6.0
Build system
Windows 11 with dotnet 9
Expected
gsudo only included in universal publish and under windows.