Skip to main content
Source: Al0102AvoidTypeGetTypeAnalyzer.cs

Description

Type.GetType() with a dynamically constructed type name prevents the AOT compiler from performing static analysis, potentially trimming required types.

Bad Code

Good Code

Properties

  • Category: AOT Testing
  • Severity: Warning
  • Enabled by default: True
  • Code fix available: False

Configuration