Skip to content

Remove support for device-specific builds? #23846

Open

Description

@rolfbjarne

Device-specific builds were originally implemented for two reasons:

  1. Building for a single architecture when we knew which device the app was going to be installed on (for example: there's no reason to build for armv7 if the app will be installed on an arm64 device).
  2. Speed up resource compilation a bit by filtering resource compilation to the target device.

However, the first reason is not applicable anymore (arm64 is the only architecture).

The support for device-specific builds also has a few downsides:

  1. It complicates our code.
  2. It increases the path length of the contents in the bin directory, which can be a problem for Windows (due to MAX_PATH limitations).

So the question remains: is the resource compilation build speed decrease worth it for the downsides?

One option could be to disable it by default + add telemetry, and if nobody complains + telemetry shows nobody turns it back on again, then we can remove it.

CC @emaf @mauroa @dalexsoto

Activity

  1. added this to the .NET 11 milestone on Sep 18, 2025
  2. dalexsoto commented on Sep 18, 2025

    @dalexsoto
    Member

    If we ever do arm64e, would this still be helpful to have? I guess if you can hide it behind a feature flag for the time being is fine and remove later as you propose, Today I don't see real advantages to keep this feature alive unless resource compilation build speed is really bad.

  3. rolfbjarne commented on Sep 19, 2025

    @rolfbjarne
    MemberAuthor

    If we ever do arm64e, would this still be helpful to have?

    Yes, it probably would.

  4. rolfbjarne commented on Jul 8, 2026

    @rolfbjarne
    MemberAuthor

    If we ever do arm64e, would this still be helpful to have?

    Yes, it probably would.

    Apple introduced the arm64e architecture with iOS 12 in 2018 (8 years ago), so I'm not sure we should hold our breath for arm64e ever becoming a separate architecture at this point.

    At this point I think we can just remove support for device-specific builds (and it should be easy enough to add it back with help from Copilot if we ever needed it again). Lowering the chance of hitting MAX_PATH on Windows is a rather tangible benefit...

  5. rolfbjarne commented on Jul 9, 2026

    @rolfbjarne
    MemberAuthor

    In PR #26005 I'm:

    • Turning device-specific builds off by default
    • Disable them completely starting in .NET 11, but with a private override to get it back if needed.

    The next step would be to remove any device-specific build code, which should wait until .NET 12.

  6. modified the milestones: .NET 11, .NET 12 on Jul 9, 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

    enhancementThe issue or pull request is an enhancementwindows-onlyThe issue only occur on Windows

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions