Skip to content

System.CommandLine needs reflection to work? #1608

Open
@tomrus88

Description

@tomrus88

I've tried to compile my little app (~400 lines of C#, zero use of reflection) that references and makes use of latest System.CommandLine (2.0.0-beta3.22101.1 at the time of writing) with NativeAOT and reflection disabled (IlcDisableReflection=true) and app stopped working. Enabling reflection makes it work again. Then I tried to remove usage of System.CommandLine from the app, but keep reflection disabled and app works fine. This leads me to believe that something in System.CommandLine needs that reflection so bad? Why?

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions