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
looks like it should be safe, as both methods share the same annotation and one simply calls the other, yet it yields this warning:
Trim analysis warning IL2091: Trimmable.DoSomething.d__0.MoveNext(): 'T' generic argument does not satisfy 'DynamicallyAccessedMemberTypes.All' in 'Trimmable.DoSomething.With()'. The generic parameter 'T' of 'Trimmable.DoSomething.d__0' does not have matching annotations. The source value must declare at least the same requirements as those declared on the target location it is assigned to.
I am assuming the linker got lost in the compiler-generated async state machine code.
The text was updated successfully, but these errors were encountered:
This is a known limitation in .NET 6. We implemented only handling of RequiresUnreferencedCodeAttribute and warning suppression for async state machines. The data flow for annotations (DynamicallyAccessedMembersAttribute and friends) was not implemented in .NET 6.
This code:
looks like it should be safe, as both methods share the same annotation and one simply calls the other, yet it yields this warning:
I am assuming the linker got lost in the compiler-generated async state machine code.
The text was updated successfully, but these errors were encountered: