5 ms·
> Fair enough; perhaps it'd be worthwhile to throw a compiler error if both reflection and trimming were attempted. The tooling already generates warnings for
by MStrehovsky 3y ago
> Fair enough; perhaps it'd be worthwhile to throw a compiler error if both reflection and trimming were attempted.
The tooling already generates warnings for any spot in the program that uses reflection _in a way that cannot be statically analyzed_. Fixing code to make it work with trimming is equivalent to fixing warnings. Here are a couple case studies: https://devblogs.microsoft.com/dotnet/creating-aot-compatible-libraries/ https://devblogs.microsoft.com/dotnet/creating-aot-compatibl...