Skip to content

Link away calls to Runtime.RegisterEntryAssembly when the dynamic registrar has been optimized awayΒ #10457

Closed

Description

@rolfbjarne

As the description says: link away calls to Runtime.RegisterEntryAssembly when building for device the dynamic registrar has been optimized away.

And enable link all's Runtime_RegisterEntryAssembly test.

Ref: #12330.
Ref: #11858.

Activity

  1. added
    enhancementThe issue or pull request is an enhancement
    iOSIssues affecting iOS
    dotnetAn issue or pull request related to .NET
    on Jan 18, 2021
  2. added this to the .NET 6 milestone on Jan 18, 2021
  3. self-assigned this
    on May 31, 2021
  4. changed the title [-][.NET 6] Link away calls to Runtime.RegisterEntryAssembly when building for device[/-] [+][.NET 6] Link away calls to Runtime.RegisterEntryAssembly when the dynamic registrar has been optimized away[/+] on Aug 4, 2021
  5. removed their assignment
    on Sep 14, 2021
  6. modified the milestones: .NET 6, .NET 7 on Jan 25, 2022
  7. modified the milestones: .NET 7, .NET 8 on Aug 26, 2022
  8. 2 remaining items

  9. added this to the .NET 9 milestone on Sep 12, 2023
  10. moved this to Technical Debt in .NET 9on Aug 27, 2024
  11. modified the milestones: .NET 9, .NET 10 on Sep 27, 2024
  12. added and removed
    iOSIssues affecting iOS
    dotnetAn issue or pull request related to .NET
    on Sep 27, 2024
  13. rolfbjarne commented on Oct 13, 2025

    @rolfbjarne
    MemberAuthor

    This might be done like this:

    1. In a pre-trimmer build step ([meta] Replace the custom linker steps with different solutionsΒ #17693) we determine if the dynamic registrar is needed (or it's set by a optimization flag).
    2. We set a trimmer feature flag, and check for this flag in Runtime.RegisterEntryAssembly(IntPtr).
    3. The trimmer should automatically remove the call to Runtime.RegisterEntryAssembly(Assembly).
  14. modified the milestones: .NET 10, .NET 11 on Oct 21, 2025
  15. added a commit that references this issue on Jul 24, 2026
    66311e4
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

    app-sizeenhancementThe issue or pull request is an enhancement

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions