Skip to content

AssemblyGenerator fails when generating bytes for 'System.Private.CoreLib' in .NET 8.0 #178

@Heptagram64

Description

@Heptagram64

For as far as i have used this, AssemblyGenerator.GenerateAssemblyBytes() seems to work for most assemblies present in application memory, but unfortunately not for 'System.Private.CoreLib'.

It specifically throws;
System.ArgumentException: 'Type cannot be found: "System.Runtime.CompilerServices.RefSafetyRulesAttribute, System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e" Arg_ParamName_Name'

in GetTypeHandle() of AssemblyMetadata.cs

I suppose this is a bug?

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