Skip to content

[wasi][R2R] MetadataLoadContext tests cannot find assembly IL #134946

Description

@lewing

Description

With CoreCLR WASI ReadyToRun, 482 of 606 test cases in System.Reflection.MetadataLoadContext.Tests fail:

System.Exception : Could not find the IL for assembly System.Reflection.MetadataLoadContext.Tests, Version=11.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ff...
   at System.Reflection.Tests.TestUtils.Project(Type type)

A further 54 report the same for System.Private.CoreLib. The tests locate the IL image of a loaded assembly on disk and load it into a MetadataLoadContext.

The suite passes in the non-R2R CoreCLR WASI lane, so this is specific to ReadyToRun. In the WASI R2R layout, the app loads its assemblies from the composite stubs under managed/comp/ and keeps the IL copies in managed/. The location the tests derive no longer points at an IL image.

Possible directions: make the tests find the IL copies in the ReadyToRun layout, or make the runtime report the IL file location for composite-backed assemblies.

Seen on #134813 in a local trimmed ReadyToRun run.

Note

This issue was drafted with the help of GitHub Copilot.

Activity

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

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions