dotnet / dotnet/command-line-api
Fix `IL2091` by annotating the `T` with `[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicConstructors)]`
Open
- Dominant language
- C#
- Stars
- 3.7k
- Forks
- 428
- PR merge metrics
- No merged PRs in 30d
Description
I don't understand why the referenced issue is justification for suppressing these warnings. It might be better if we wrote it out here.
I believe you could fix `IL2091` by annotating the `T` with `[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicConstructors)]`. See https://learn.microsoft.com/en-us/dotnet/core/deploying/trimming/fixing-warnings#dynamicallyaccessedmembers
_Originally posted by @eerhardt in https://github.com/dotnet/command-line-api/pull/2127#discussion_r1171504265_
Contributor guide
Assessment
This issue has not been assessed yet.