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
NativeAOT in .NET 9 is getting better trimming when using delegates (specifically, allowing delegate targets to not be considered reflection visible, see dotnet/runtime#96166). But, this is currently completely blocked because we're accessing Delegate.Method in our EventRegistrationTokenTable<T> type, which completely disables this optimization (as it could otherwise break):
We need to drop that Delegate.Method use to allow saving a fair amount of binary size with NativeAOT builds.
With a minimal WinRT component, doing so saves over 200 KB:
Overview
NativeAOT in .NET 9 is getting better trimming when using delegates (specifically, allowing delegate targets to not be considered reflection visible, see dotnet/runtime#96166). But, this is currently completely blocked because we're accessing
Delegate.Method
in ourEventRegistrationTokenTable<T>
type, which completely disables this optimization (as it could otherwise break):CsWinRT/src/cswinrt/strings/WinRT.cs
Lines 1132 to 1144 in ae69551
We need to drop that
Delegate.Method
use to allow saving a fair amount of binary size with NativeAOT builds.With a minimal WinRT component, doing so saves over 200 KB:
See: dotnet/runtime#96947.
The text was updated successfully, but these errors were encountered: