Skip to content

Could not find core Assembly in MetadataLoadContext #90009

@msedi

Description

@msedi

Description

I was switching to the preview of .NET 8 to try out the behavior of the framework.
Everything worked before so that switch to .NET 8 causes the problem. The code is simply Following:

            PathAssemblyResolver resolver = new(SearchFileNames);
            var ctx = new MetadataLoadContext(resolver);

has something changed here?

Thanks

Reproduction Steps

I'm not sure if this is a known problem, and the core assembly needs to be handed over now.

Expected behavior

Core assembly should not be needed.

Actual behavior

It simply works.

Regression?

Yes, in .NET7 it worked, now in .NET8 it doesn't work anymore.

Known Workarounds

Switch back to .NET7

Configuration

.NET8 / win-x64
Windows 10

Other information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-System.Reflectionneeds-further-triageIssue has been initially triaged, but needs deeper consideration or reconsiderationquestionAnswer questions and provide assistance, not an issue with source code or documentation.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions