Skip to content

Which warnings should be enforced as errors for AOT? #1992

@ghost1372

Description

@ghost1372

I'd like to start a discussion around which trimming and AOT-related warnings we should enforce as build errors by default.

When targeting Native AOT or enabling trimming, there are several warning categories—particularly ILxxxx, WMCxxxx, and CsWinRTxxxx—that indicate potential runtime issues (e.g. unsafe reflection, dynamic access, unsupported marshalling, or trimming-incompatible patterns).

⚠️ Candidate Warnings

The following warnings should be enforced as errors:
WMC1500, WMC1510, CsWinRT1028.

However, I'm uncertain about the ILXXXX warnings, as there are too many of them (~40), and it's unclear whether we should include all of them.

IL2000;IL2001;IL2002;IL2003;...;IL2123;
IL3000;...;IL3057;

FYI @marcelwgn

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions