C
C#14mo ago
Hanprogramer

❔ C# native aot reflections

Does runtime reflections work at all in native aot? Or does it work but with some limitations?
4 Replies
Henkypenky
Henkypenky14mo ago
it will never work, native aot is compiles to native code, there is not JIT, so you will have a bunch of instructions, for what it was compiled for, example x86
reflectronic
reflectronic14mo ago
System.Reflection.Emit doesn't work, yes System.Reflection works almost entirely without issue the biggest limitation on that is that you need to make sure that your reflection is trimmable
Henkypenky
Henkypenky14mo ago
thanks reflectronic, this was a bit out of my scope, still researching it
Accord
Accord14mo ago
Was this issue resolved? If so, run /close - otherwise I will mark this as stale and this post will be archived until there is new activity.