Closed baronfel closed 1 day ago
Going to close this because ReflectionFree isn't the right approach here - Reflection can be used with AOT if property annotated, and @KevinRansom has broadly done that in the compiler and corelib already. Any gaps should be treated as bugs to address and users can use ReflectionFree as a temporary workaround for those specific scenarios.
Is your feature request related to a problem? Please describe.
Most docs for doing AOT say "Set PublishTrimmed or PublishAOT and then you're all set". That's not quite the case for F# - currently you also have to set ReflectionFree to true to tell the compiler to codegen without using reflection where possible.
Describe the solution you'd like
This is a pain, and we should condition ReflectionFree on these two properties so it Just Works.