You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a private SafeHandle ctor that is being trimmed, despite me using it in a delegate type passed to Marshal.GetDelegateForFunctionPointer, which has an out MySafeHandle parameter.
I have a private SafeHandle ctor that is being trimmed, despite me using it in a delegate type passed to Marshal.GetDelegateForFunctionPointer, which has an
out MySafeHandleparameter.My code is failing on this line:
https://github.com/scalablecory/runtime/blob/720f3d7c3c60506f70123149c1a67a4a71aa81fc/src/libraries/System.Net.Quic/src/System/Net/Quic/Implementations/MsQuic/Internal/MsQuicApi.cs#L60-L62
With the delegate looking like:
https://github.com/scalablecory/runtime/blob/720f3d7c3c60506f70123149c1a67a4a71aa81fc/src/libraries/System.Net.Quic/src/System/Net/Quic/Implementations/MsQuic/Interop/MsQuicNativeMethods.cs#L76-L79
And the safe handle's private ctor:
https://github.com/scalablecory/runtime/blob/720f3d7c3c60506f70123149c1a67a4a71aa81fc/src/libraries/System.Net.Quic/src/System/Net/Quic/Implementations/MsQuic/Interop/SafeMsQuicRegistrationHandle.cs#L12-L14
Current workaround is to use
DynamicDependency.