Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
mattleibow opened this issue Aug 5, 2024 · 0 comments
Labels
enhancement The issue or pull request is an enhancement
Milestone

Comments

@mattleibow
Copy link
Contributor

mattleibow commented Aug 5, 2024

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:

<!-- Include everything in the project's Resources folder (as represented by the _ResourcePrefix property, which is set from the IPhoneResourcePrefix/XamMacResourcePrefix properties),

Set by

<_ResourcePrefix Condition="'$(_PlatformName)' != 'macOS'">$(IPhoneResourcePrefix)</_ResourcePrefix>

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.

@rolfbjarne rolfbjarne added the enhancement The issue or pull request is an enhancement label Aug 5, 2024
@rolfbjarne rolfbjarne added this to the .NET 9 milestone Aug 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement The issue or pull request is an enhancement
Projects
Status: Other
Development

No branches or pull requests

2 participants