Skip to content

Is it possible to check IsPInvokeImpl on a method without needing to resolve the MethodReference? #969

Open
@StupidRepo

Description

@StupidRepo

I'm trying to make this scanner which blocks the use of external code in BepInEx mods. Due to it being run before any assemblies have been resolved, there is a time where calling Resolve() on a MethodReference may throw a AssemblyResolutionException.

I was wondering if it was possible to get IsPInvokeImpl (or something similar that can tell me if it's an extern method), without resolving the MethodReference 🤔

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions