Skip to content

Released 0.14.5 AOT tool fails to rewrite NEST: cannot resolve System.Diagnostics.Debug #35

Open

Description

@Mpdreamz

The released 0.14.5 native AOT tool fails a plain rewrite of NEST and Elasticsearch.Net 6.2.0 (netstandard1.3): it cannot resolve the System.Diagnostics.Debug facade. The managed net8.0/net10.0 builds rewrite the same packages correctly. Not investigated further.

Found while bumping dependencies; not fixed there.

🤖 Generated with Claude Code

Activity

  1. Mpdreamz commented on Nov 12, 2026

    @Mpdreamz
    CollaboratorAuthor

    Broader than NEST: the native-AOT binary fails every real rewrite tried (netstandard1.3, net46, net10.0 inputs) with AssemblyResolutionException, with or without -r <framework dir>. main's AOT binary fails the same way.

    Cause:

    • Cecil's DefaultAssemblyResolver finds framework assemblies through TRUSTED_PLATFORM_ASSEMBLIES, which native AOT does not set.
    • AssemblyResolver reads the files it finds through -r without passing itself on as their resolver, so facades that forward to another assembly fail to resolve.

    This matters because the AOT binary is what the ghcr.io/nullean/assembly-rewriter container runs, and that container is what action.yml uses. The managed builds are fine.

    🤖 Generated with Claude Code

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

    bugA defect fixed (patch)

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions