Editorial question25.8K views4,794 votes0 answers2,772 following
AI-generatedILLinker Trimming Configuration Missing Constraint for Generic Type Reflection Metadata
The goal is to retain reflection metadata for generic types when using ILLinker trimming with PublishTrimmed=true in .NET 5+ SDKs. The default trimming configuration does not include a rule to preserve System.Reflection.MetadataLoadContext and related generic type metadata, which can cause MissingMethodException or InvalidProgramException at runtime. Develop