Editorial question25.8K views2,119 votes1 answer1,270 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