Skip to content

IPhoneResourcePrefix maybe supports multiple prefixes, but not all the logic does #20968

Closed

Description

@mattleibow

Steps to Reproduce

In theory, you can have multiple resource prefixes with IPhoneResourcePrefix, separated by a semi-colon:

<IPhoneResourcePrefix>Resources;Platforms/iOS/Resources</IPhoneResourcePrefix>

It looks like our code supports this (that's the intention at least), but I've never seen it done, and we don't have tests for this, so YMMV... but if it works, it would be a much simpler solution.

But, I see this:
https://github.com/xamarin/xamarin-macios/blob/76769f17d50768e9c0ed77ad5b6f202753083e32/dotnet/targets/Microsoft.Sdk.DefaultItems.template.props#L62

Set by https://github.com/xamarin/xamarin-macios/blob/76769f17d50768e9c0ed77ad5b6f202753083e32/msbuild/Xamarin.Shared/Xamarin.Shared.props#L115

Hm yeah, using _ResourcePrefix in an Include like that won't work as expected with multiple resource prefixes.

You could try updating _ResourcePrefix just before CollectBundleResources to see if that works. I'd want to implement a proper fix though, probably make that Include work with multiple resource prefixes, so the idea would for it to be a temporary workaround.

Activity

  1. added
    enhancement
    on Aug 5, 2024
  2. added this to the .NET 9 milestone on Aug 5, 2024
  3. modified the milestones: .NET 9, .NET 10 on Sep 27, 2024
  4. modified the milestones: .NET 10, .NET 11 on Oct 22, 2025
  5. added a commit that references this issue on Sep 2, 2026
    108ea61
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

    enhancement

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions