Skip to content

NativeAOT: Investigate whether we can narrow down the list of assemblies to look for UnmanagedCallersOnly entry points #18484

Open

Description

@rolfbjarne

Ref: #17374 (comment)

We currently look for UnmanagedCallersOnly entry points in all assemblies:

<!-- Process UnmanagedCallersOnly attributes from every assembly -->
<UnmanagedEntryPointsAssembly Remove="System.Private.CoreLib" />
<UnmanagedEntryPointsAssembly Include="@(_UpdatedManagedAssemblyToLink->'%(Filename)')" />

We must to do this for all assemblies we've modified using the managed static registrar, but it might not be necessary for any other assemblies.

So we need to look into whether we can shrink this list of assemblies.

Activity

  1. added
    enhancement
    on Jun 21, 2023
  2. added this to the .NET 8 milestone on Jun 21, 2023
  3. modified the milestones: .NET 8, .NET 9 on Sep 12, 2023
  4. jkurdek commented on Jan 9, 2024

    @jkurdek
    Contributor

    @ivanpovazan I would like to pick this up

  5. modified the milestones: .NET 9, .NET 10 on Sep 27, 2024
  6. MichalStrehovsky commented on Dec 11, 2024

    @MichalStrehovsky
    Member

    This was hit in dotnet/runtime#110608. It would be nice to do something about this. Generating this for random assemblies risks running into issues described in dotnet/docs#39362 (comment).

  7. modified the milestones: .NET 10, .NET 11 on Oct 16, 2025
  8. modified the milestones: .NET 11, .NET 12 on Aug 28, 2026
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

    enhancementnativeaot

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions