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

Open
wants to merge 11 commits into
base: main
Choose a base branch
from

Conversation

Copilot
Copy link
Contributor

@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
Contributor 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
Contributor 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
Contributor 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
Contributor 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
Contributor 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
Contributor 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
Contributor 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
Contributor 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
Contributor 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
Contributor 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
Contributor Author

Copilot AI commented Jun 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: 88f25dd1-e859-4fc9-9561-090f1cd9f196

Sorry for the inconvenience!

@vs-mobiletools-engineering-service2

This comment has been minimized.

Copy link
Contributor Author

Copilot AI commented Jun 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: ad2e9af5-c50e-43d9-bb52-593315429e40

Sorry for the inconvenience!

@vs-mobiletools-engineering-service2

This comment has been minimized.

Copy link
Contributor Author

Copilot AI commented Jun 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: 7a77223b-47f5-4fad-acf9-443dcdead15d

Sorry for the inconvenience!

@rolfbjarne rolfbjarne marked this pull request as ready for review July 10, 2025 11:05
@rolfbjarne rolfbjarne requested review from emaf and mauroa as code owners July 10, 2025 11:05
@vs-mobiletools-engineering-service2
Copy link
Collaborator

✅ [PR Build #60406bc] Build passed (Detect API changes) ✅

Pipeline on Agent
Hash: 60406bc2e1241310e614faeea9bfadc0002db442 [PR build]

Copy link
Contributor Author

Copilot AI commented Jul 10, 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: 7f3ac477-7ebe-4627-8658-afcb35d684cf

Sorry for the inconvenience!

@vs-mobiletools-engineering-service2
Copy link
Collaborator

✅ API diff for current PR / commit

.NET ( No breaking changes )

✅ API diff vs stable

.NET ( No breaking changes )

ℹ️ Generator diff

Generator Diff: vsdrops (html) vsdrops (raw diff) gist (raw diff) - Please review changes)

Pipeline on Agent
Hash: 60406bc2e1241310e614faeea9bfadc0002db442 [PR build]

Copy link
Contributor Author

Copilot AI commented Jul 10, 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: d436e07c-e31d-462e-9c1c-55b1cb25199f

Sorry for the inconvenience!

@vs-mobiletools-engineering-service2
Copy link
Collaborator

✅ [CI Build #60406bc] Build passed (Build packages) ✅

Pipeline on Agent
Hash: 60406bc2e1241310e614faeea9bfadc0002db442 [PR build]

Copy link
Contributor Author

Copilot AI commented Jul 10, 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: 4e96b398-14f9-42b0-88e6-f14bf875ea86

Sorry for the inconvenience!

@vs-mobiletools-engineering-service2
Copy link
Collaborator

✅ [CI Build #60406bc] Build passed (Build macOS tests) ✅

Pipeline on Agent
Hash: 60406bc2e1241310e614faeea9bfadc0002db442 [PR build]

Copy link
Contributor Author

Copilot AI commented Jul 10, 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: 48bae836-bc8c-44d2-be44-f47e9ccf1f4a

Sorry for the inconvenience!

@vs-mobiletools-engineering-service2
Copy link
Collaborator

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

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

Pipeline on Agent
Hash: 60406bc2e1241310e614faeea9bfadc0002db442 [PR build]

Copy link
Contributor Author

Copilot AI commented Jul 10, 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: 58352909-2980-4cbe-8a87-b7c6395c2b24

Sorry for the inconvenience!

@vs-mobiletools-engineering-service2
Copy link
Collaborator

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

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

Pipeline on Agent
Hash: 60406bc2e1241310e614faeea9bfadc0002db442 [PR build]

Copy link
Contributor Author

Copilot AI commented Jul 10, 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: 75d6ba25-6631-4ff6-9cce-281987604af0

Sorry for the inconvenience!

@vs-mobiletools-engineering-service2
Copy link
Collaborator

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

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

Pipeline on Agent
Hash: 60406bc2e1241310e614faeea9bfadc0002db442 [PR build]

Copy link
Contributor Author

Copilot AI commented Jul 10, 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: 653da6d8-4296-4290-9a75-538dab64b6e8

Sorry for the inconvenience!

@vs-mobiletools-engineering-service2
Copy link
Collaborator

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

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

Pipeline on Agent
Hash: 60406bc2e1241310e614faeea9bfadc0002db442 [PR build]

Copy link
Contributor Author

Copilot AI commented Jul 10, 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: 427fdeb5-44ff-4403-862c-3ea4f11db2b2

Sorry for the inconvenience!

@vs-mobiletools-engineering-service2
Copy link
Collaborator

🚀 [CI Build #60406bc] Test results 🚀

Test results

✅ All tests passed on VSTS: test results.

🎉 All 117 tests passed 🎉

Tests counts

✅ cecil: All 1 tests passed. Html Report (VSDrops) Download
✅ dotnettests (iOS): All 1 tests passed. Html Report (VSDrops) Download
✅ dotnettests (MacCatalyst): All 1 tests passed. Html Report (VSDrops) Download
✅ dotnettests (macOS): All 1 tests passed. Html Report (VSDrops) Download
✅ dotnettests (Multiple platforms): All 1 tests passed. Html Report (VSDrops) Download
✅ dotnettests (tvOS): 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 4 tests passed. Html Report (VSDrops) Download
✅ linker: All 44 tests passed. Html Report (VSDrops) Download
✅ monotouch (iOS): All 8 tests passed. Html Report (VSDrops) Download
✅ monotouch (MacCatalyst): All 11 tests passed. Html Report (VSDrops) Download
✅ monotouch (macOS): All 9 tests passed. Html Report (VSDrops) Download
✅ monotouch (tvOS): All 10 tests passed. Html Report (VSDrops) Download
✅ msbuild: All 2 tests passed. Html Report (VSDrops) Download
✅ windows: All 3 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: 60406bc2e1241310e614faeea9bfadc0002db442 [PR build]

Copy link
Contributor Author

Copilot AI commented Jul 10, 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: 00550572-93ed-45d2-9c7d-d2df5c491f72

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
4 participants