Skip to content
This repository was archived by the owner on Nov 13, 2026. It is now read-only.
This repository was archived by the owner on Nov 13, 2026. It is now read-only.

Enum.IsDefined does not work in reflection-free mode #8216

Closed

Description

@Thealexbarney

Enum.IsDefined doesn't work in reflection-mode. This means that some APIs like Environment.GetFolderPath don't work.

A quick look in a debugger shows that the EnumInfo passed to GetEnumName has an empty Values array.

Activity

  1. MichalStrehovsky commented on Jun 27, 2020

    @MichalStrehovsky
    Member

    Enum APIs don't currently work: https://github.com/dotnet/corert/blob/master/Documentation/using-corert/reflection-free-mode.md#reflection-apis-that-are-up-for-discussion

    I would like to fix that for the next incarnation of the reflection free mode that would make type metadata available, but still not allow reflection on fields and methods. It's likely such mode would be more practical. The current reflection-free mode (where nothing works) was just much cheaper to bring up.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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