Ara
Download

Search or run a command

Jump to a section or open an Ara link.

Diagnostic code · ARA0503

Reflection or dynamic code

The profile forbids a reflection or dynamic-code API that is not already reported by ARA0400. Such access can bypass generated registration and break reload or NativeAOT. The edit is rejected; the last good code keeps running.

Common causes

  • Reflective member discovery or delegate invocation, such as Type.GetFields or Delegate.DynamicInvoke.
  • Access to disallowed reflection, loader, expression-tree or dynamic-runtime APIs.

Fixes

  • Use generated registration and serializers, static references and direct typed calls.

  • Replace reflective dispatch with an explicit typed interface or a generated dispatch table.

  • Code: ARA0503

  • Constant: cs::API_REFLECTION

  • Reported by: Ara.Analyzers