Description
openedon Mar 23, 2021
Trimming a .NET Core application is expected to give size wins without compromising correctness. However, there are some coding patterns, largely centered around arbitrary use of reflections, that make it challenging for the Trimmer to reason about correctness. Serializers (such as XML and DataContractSerilaizers), feature area like EventSource, and other make heavy use of such patterns. The trimmer does a good job of warning in these cases but for scenarios where these warnings are incorrectly suppressed, trimmed applications can fail in production environment that will be hard to root cause.
We should provide a runtime diagnostic feature that can be leveraged in opt-in scenario testing mode that will warn developers of potential problems in their app. Such a feature should have the following:
-
Metadata in trimmed assemblies on trimmed types. This issue tracks the request in the mono repo
-
Library support to query the trimmed assemblies to get trimmed metadata
-
Showcase this feature using a trim-problematic component
-
Developer Experience to leverage this feature including a mechanism for make problematic types trim safe
Metadata
Assignees
Type
Projects
Status
No status