Skip to content

.NET: Add AppBundleResourcePrefix property to unify resource prefix properties #22840

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

Draft
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

Copilot
Copy link

@Copilot Copilot AI commented May 20, 2025

This PR unifies the various resource prefix properties (IPhoneResourcePrefix, MonoMacResourcePrefix, and XamMacResourcePrefix) into a single property (AppBundleResourcePrefix) for use in .NET projects.

The implementation:

  1. Adds a new AppBundleResourcePrefix property in Xamarin.Shared.props with a default value of "Resources"
  2. Updates the property precedence to use AppBundleResourcePrefix first, then fall back to the platform-specific properties
  3. Maintains backward compatibility by having legacy properties default to the new property if they're not explicitly set
  4. Updates comments in MSBuild files to reflect the changes
  5. Updates documentation in build-properties.md to document the new property and add recommendations for using it instead of the legacy properties

Users can now specify a single resource prefix property that works across all platforms:

<PropertyGroup>
  <AppBundleResourcePrefix>Resources</AppBundleResourcePrefix>
</PropertyGroup>

Legacy properties will continue to work for backward compatibility, but the new property is recommended for new .NET projects.

Fixes #12808.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

@Copilot Copilot AI changed the title [WIP] .NET: Unify the MonoMacResourcePrefix, XamMacResourcePrefix and IPhoneResourcePrefix MSBuild properties .NET: Add AppBundleResourcePrefix property to unify resource prefix properties May 20, 2025
@Copilot Copilot AI requested a review from rolfbjarne May 20, 2025 06:26
Copilot finished work on behalf of rolfbjarne May 20, 2025 06:26
@vs-mobiletools-engineering-service2

This comment has been minimized.

Copy link
Author

Copilot AI commented May 20, 2025

@vs-mobiletools-engineering-service2 Unfortunately I hit an unexpected error while processing your comment. I've automatically reported this to GitHub.

You can ask me to try again later by mentioning me in a new comment.

If you want to contact GitHub about this error, please mention the following identifier so they can better serve you: adbbea8c-ae8f-4d37-855a-55e9081fdcaf

Sorry for the inconvenience!

@vs-mobiletools-engineering-service2

This comment has been minimized.

Copy link
Author

Copilot AI commented May 20, 2025

@vs-mobiletools-engineering-service2 Unfortunately I hit an unexpected error while processing your comment. I've automatically reported this to GitHub.

You can ask me to try again later by mentioning me in a new comment.

If you want to contact GitHub about this error, please mention the following identifier so they can better serve you: 34da11d9-8e7f-46c5-bba7-874e7121d44b

Sorry for the inconvenience!

@vs-mobiletools-engineering-service2

This comment has been minimized.

Copy link
Author

Copilot AI commented May 20, 2025

@vs-mobiletools-engineering-service2 Unfortunately I hit an unexpected error while processing your comment. I've automatically reported this to GitHub.

You can ask me to try again later by mentioning me in a new comment.

If you want to contact GitHub about this error, please mention the following identifier so they can better serve you: 50b8f969-af2e-4eb2-bc53-4d6971523d27

Sorry for the inconvenience!

@vs-mobiletools-engineering-service2

This comment has been minimized.

Copy link
Author

Copilot AI commented May 20, 2025

@vs-mobiletools-engineering-service2 Unfortunately I hit an unexpected error while processing your comment. I've automatically reported this to GitHub.

You can ask me to try again later by mentioning me in a new comment.

If you want to contact GitHub about this error, please mention the following identifier so they can better serve you: a9b37447-7b86-4830-a2b8-0bcd37973b2b

Sorry for the inconvenience!

@vs-mobiletools-engineering-service2

This comment has been minimized.

Copy link
Author

Copilot AI commented May 20, 2025

@vs-mobiletools-engineering-service2 Unfortunately I hit an unexpected error while processing your comment. I've automatically reported this to GitHub.

You can ask me to try again later by mentioning me in a new comment.

If you want to contact GitHub about this error, please mention the following identifier so they can better serve you: 370493be-7783-4567-8bc9-4ac2f3cbfdb9

Sorry for the inconvenience!

@vs-mobiletools-engineering-service2

This comment has been minimized.

Copy link
Author

Copilot AI commented May 20, 2025

@vs-mobiletools-engineering-service2 Unfortunately I hit an unexpected error while processing your comment. I've automatically reported this to GitHub.

You can ask me to try again later by mentioning me in a new comment.

If you want to contact GitHub about this error, please mention the following identifier so they can better serve you: 9042b1dd-9b8b-4544-af91-39c6b90ad995

Sorry for the inconvenience!

@vs-mobiletools-engineering-service2

This comment has been minimized.

Copy link
Author

Copilot AI commented May 20, 2025

@vs-mobiletools-engineering-service2 Unfortunately I hit an unexpected error while processing your comment. I've automatically reported this to GitHub.

You can ask me to try again later by mentioning me in a new comment.

If you want to contact GitHub about this error, please mention the following identifier so they can better serve you: 52262bc0-5eed-4327-8bd5-b582774803a8

Sorry for the inconvenience!

@vs-mobiletools-engineering-service2

This comment has been minimized.

Copy link
Author

Copilot AI commented May 20, 2025

@vs-mobiletools-engineering-service2 Unfortunately I hit an unexpected error while processing your comment. I've automatically reported this to GitHub.

You can ask me to try again later by mentioning me in a new comment.

If you want to contact GitHub about this error, please mention the following identifier so they can better serve you: 1931d688-99ea-4d07-92a6-87731e6e4648

Sorry for the inconvenience!

@vs-mobiletools-engineering-service2

This comment has been minimized.

Copy link
Author

Copilot AI commented May 20, 2025

@vs-mobiletools-engineering-service2 Unfortunately I hit an unexpected error while processing your comment. I've automatically reported this to GitHub.

You can ask me to try again later by mentioning me in a new comment.

If you want to contact GitHub about this error, please mention the following identifier so they can better serve you: 6455321f-0d08-492b-8995-7073e97a7b7d

Sorry for the inconvenience!

@vs-mobiletools-engineering-service2

This comment has been minimized.

Copy link
Author

Copilot AI commented May 20, 2025

@vs-mobiletools-engineering-service2 Unfortunately I hit an unexpected error while processing your comment. I've automatically reported this to GitHub.

You can ask me to try again later by mentioning me in a new comment.

If you want to contact GitHub about this error, please mention the following identifier so they can better serve you: aafb4e88-072a-4c4b-aa75-928f0908e14c

Sorry for the inconvenience!

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

Copy link
Author

Copilot AI commented May 27, 2025

@vs-mobiletools-engineering-service2 Unfortunately I hit an unexpected error while processing your comment. I've automatically reported this to GitHub.

You can ask me to try again later by mentioning me in a new comment.

If you want to contact GitHub about this error, please mention the following identifier so they can better serve you: 747be2b1-42d4-4bd2-9d4f-ce3954faad1b

Sorry for the inconvenience!

@vs-mobiletools-engineering-service2

This comment has been minimized.

Copy link
Author

Copilot AI commented May 27, 2025

@vs-mobiletools-engineering-service2 Unfortunately I hit an unexpected error while processing your comment. I've automatically reported this to GitHub.

You can ask me to try again later by mentioning me in a new comment.

If you want to contact GitHub about this error, please mention the following identifier so they can better serve you: 237eb3e3-8716-4c8c-a91a-ff96265e1553

Sorry for the inconvenience!

@vs-mobiletools-engineering-service2

This comment has been minimized.

Copy link
Author

Copilot AI commented May 27, 2025

@vs-mobiletools-engineering-service2 Unfortunately I hit an unexpected error while processing your comment. I've automatically reported this to GitHub.

You can ask me to try again later by mentioning me in a new comment.

If you want to contact GitHub about this error, please mention the following identifier so they can better serve you: 129ba981-e684-4652-8acc-454539a37d7f

Sorry for the inconvenience!

@vs-mobiletools-engineering-service2

This comment has been minimized.

Copy link
Author

Copilot AI commented May 27, 2025

@vs-mobiletools-engineering-service2 Unfortunately I hit an unexpected error while processing your comment. I've automatically reported this to GitHub.

You can ask me to try again later by mentioning me in a new comment.

If you want to contact GitHub about this error, please mention the following identifier so they can better serve you: be48826e-fc93-44a8-8326-2e7cfcc4ea1e

Sorry for the inconvenience!

@vs-mobiletools-engineering-service2

This comment has been minimized.

Copy link
Author

Copilot AI commented May 27, 2025

@vs-mobiletools-engineering-service2 Unfortunately I hit an unexpected error while processing your comment. I've automatically reported this to GitHub.

You can ask me to try again later by mentioning me in a new comment.

If you want to contact GitHub about this error, please mention the following identifier so they can better serve you: af6854df-9efc-4ac2-8a31-478e85009fd2

Sorry for the inconvenience!

@vs-mobiletools-engineering-service2

This comment has been minimized.

Copy link
Author

Copilot AI commented May 27, 2025

@vs-mobiletools-engineering-service2 Unfortunately I hit an unexpected error while processing your comment. I've automatically reported this to GitHub.

You can ask me to try again later by mentioning me in a new comment.

If you want to contact GitHub about this error, please mention the following identifier so they can better serve you: b3d822ef-7fcd-4d4d-84c7-01d81601f28a

Sorry for the inconvenience!

@vs-mobiletools-engineering-service2

This comment has been minimized.

Copy link
Author

Copilot AI commented May 27, 2025

@vs-mobiletools-engineering-service2 Unfortunately I hit an unexpected error while processing your comment. I've automatically reported this to GitHub.

You can ask me to try again later by mentioning me in a new comment.

If you want to contact GitHub about this error, please mention the following identifier so they can better serve you: b4e0b431-57dc-4264-8025-a8e28c0710f2

Sorry for the inconvenience!

@vs-mobiletools-engineering-service2

This comment has been minimized.

Copy link
Author

Copilot AI commented May 27, 2025

@vs-mobiletools-engineering-service2 Unfortunately I hit an unexpected error while processing your comment. I've automatically reported this to GitHub.

You can ask me to try again later by mentioning me in a new comment.

If you want to contact GitHub about this error, please mention the following identifier so they can better serve you: f6cf3a60-939c-4f81-99b6-adc08b59d851

Sorry for the inconvenience!

@vs-mobiletools-engineering-service2
Copy link
Collaborator

✅ [CI Build #727ad72] Build passed (Build macOS tests) ✅

Pipeline on Agent
Hash: 727ad72088b99dae44f8796a9f4777579951df2e [PR build]

Copy link
Author

Copilot AI commented May 27, 2025

@vs-mobiletools-engineering-service2 Unfortunately I hit an unexpected error while processing your comment. I've automatically reported this to GitHub.

You can ask me to try again later by mentioning me in a new comment.

If you want to contact GitHub about this error, please mention the following identifier so they can better serve you: 8aa493e6-6c10-497c-ad51-a78a43bae402

Sorry for the inconvenience!

@vs-mobiletools-engineering-service2
Copy link
Collaborator

💻 [CI Build #727ad72] Tests on macOS X64 - Mac Sonoma (14) passed 💻

All tests on macOS X64 - Mac Sonoma (14) passed.

Pipeline on Agent
Hash: 727ad72088b99dae44f8796a9f4777579951df2e [PR build]

Copy link
Author

Copilot AI commented May 27, 2025

@vs-mobiletools-engineering-service2 Unfortunately I hit an unexpected error while processing your comment. I've automatically reported this to GitHub.

You can ask me to try again later by mentioning me in a new comment.

If you want to contact GitHub about this error, please mention the following identifier so they can better serve you: 5bf47633-11df-416b-8b30-784cce3a9135

Sorry for the inconvenience!

@vs-mobiletools-engineering-service2
Copy link
Collaborator

💻 [CI Build #727ad72] Tests on macOS M1 - Mac Monterey (12) passed 💻

All tests on macOS M1 - Mac Monterey (12) passed.

Pipeline on Agent
Hash: 727ad72088b99dae44f8796a9f4777579951df2e [PR build]

Copy link
Author

Copilot AI commented May 27, 2025

@vs-mobiletools-engineering-service2 Unfortunately I hit an unexpected error while processing your comment. I've automatically reported this to GitHub.

You can ask me to try again later by mentioning me in a new comment.

If you want to contact GitHub about this error, please mention the following identifier so they can better serve you: f225b9d3-b622-4c3d-bbad-cc73bf1756ce

Sorry for the inconvenience!

@vs-mobiletools-engineering-service2
Copy link
Collaborator

💻 [CI Build #727ad72] Tests on macOS arm64 - Mac Sequoia (15) passed 💻

All tests on macOS arm64 - Mac Sequoia (15) passed.

Pipeline on Agent
Hash: 727ad72088b99dae44f8796a9f4777579951df2e [PR build]

@vs-mobiletools-engineering-service2
Copy link
Collaborator

💻 [CI Build #727ad72] Tests on macOS M1 - Mac Ventura (13) passed 💻

All tests on macOS M1 - Mac Ventura (13) passed.

Pipeline on Agent
Hash: 727ad72088b99dae44f8796a9f4777579951df2e [PR build]

Copy link
Author

Copilot AI commented May 27, 2025

@vs-mobiletools-engineering-service2 Unfortunately I hit an unexpected error while processing your comment. I've automatically reported this to GitHub.

You can ask me to try again later by mentioning me in a new comment.

If you want to contact GitHub about this error, please mention the following identifier so they can better serve you: cbaff147-bd05-4475-a8fd-9bddf37d6903

Sorry for the inconvenience!

Copy link
Author

Copilot AI commented May 27, 2025

@vs-mobiletools-engineering-service2 Unfortunately I hit an unexpected error while processing your comment. I've automatically reported this to GitHub.

You can ask me to try again later by mentioning me in a new comment.

If you want to contact GitHub about this error, please mention the following identifier so they can better serve you: 62b51785-d012-497f-8ab3-3b0083b82ae1

Sorry for the inconvenience!

@vs-mobiletools-engineering-service2

This comment has been minimized.

Copy link
Author

Copilot AI commented May 27, 2025

@vs-mobiletools-engineering-service2 Unfortunately I hit an unexpected error while processing your comment. I've automatically reported this to GitHub.

You can ask me to try again later by mentioning me in a new comment.

If you want to contact GitHub about this error, please mention the following identifier so they can better serve you: dcb5cc34-9c4c-4411-a311-bdd9eb066694

Sorry for the inconvenience!

@vs-mobiletools-engineering-service2
Copy link
Collaborator

🔥 [CI Build #8a845bb] Test results 🔥

Test results

❌ Tests failed on VSTS: test results

0 tests crashed, 7 tests failed, 114 tests passed.

Failures

❌ dotnettests tests (iOS)

1 tests failed, 0 tests passed.
  • DotNet tests: BuildFailure

Html Report (VSDrops) Download

❌ dotnettests tests (MacCatalyst)

1 tests failed, 0 tests passed.
  • DotNet tests: BuildFailure

Html Report (VSDrops) Download

❌ dotnettests tests (macOS)

1 tests failed, 0 tests passed.
  • DotNet tests: BuildFailure

Html Report (VSDrops) Download

❌ dotnettests tests (Multiple platforms)

1 tests failed, 0 tests passed.
  • DotNet tests: BuildFailure

Html Report (VSDrops) Download

❌ dotnettests tests (tvOS)

1 tests failed, 0 tests passed.
  • DotNet tests: BuildFailure

Html Report (VSDrops) Download

❌ linker tests

1 tests failed, 43 tests passed.
  • link all/iOS - simulator/Debug: Crashed

Html Report (VSDrops) Download

❌ windows tests

1 tests failed, 0 tests passed.

Html Report (VSDrops) Download

Successes

✅ cecil: All 1 tests passed. Html Report (VSDrops) Download
✅ framework: All 2 tests passed. Html Report (VSDrops) Download
✅ fsharp: All 4 tests passed. Html Report (VSDrops) Download
✅ generator: All 5 tests passed. Html Report (VSDrops) Download
✅ interdependent-binding-projects: All 4 tests passed. Html Report (VSDrops) Download
✅ introspection: All 6 tests passed. Html Report (VSDrops) Download
✅ monotouch (iOS): All 10 tests passed. Html Report (VSDrops) Download
✅ monotouch (MacCatalyst): All 15 tests passed. Html Report (VSDrops) Download
✅ monotouch (macOS): All 9 tests passed. Html Report (VSDrops) Download
✅ monotouch (tvOS): All 8 tests passed. Html Report (VSDrops) Download
✅ msbuild: All 2 tests passed. Html Report (VSDrops) Download
✅ xcframework: All 4 tests passed. Html Report (VSDrops) Download
✅ xtro: All 1 tests passed. Html Report (VSDrops) Download

Pipeline on Agent
Hash: 8a845bb20ab34f7811e2b8e9e2f12d38f2f29fe8 [PR build]

Copy link
Author

Copilot AI commented May 27, 2025

@vs-mobiletools-engineering-service2 Unfortunately I hit an unexpected error while processing your comment. I've automatically reported this to GitHub.

You can ask me to try again later by mentioning me in a new comment.

If you want to contact GitHub about this error, please mention the following identifier so they can better serve you: b5e554c3-971e-4d8b-9b73-e5b0e69a84c9

Sorry for the inconvenience!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

.NET: Unify the MonoMacResourcePrefix, XamMacResourcePrefix and IPhoneResourcePrefix MSBuild properties
3 participants