Skip to content

Add XA0119 warning for Debug builds with PublishReadyToRun#11213

Open
Copilot wants to merge 1 commit intomainfrom
copilot/add-warning-for-debug-builds
Open

Add XA0119 warning for Debug builds with PublishReadyToRun#11213
Copilot wants to merge 1 commit intomainfrom
copilot/add-warning-for-debug-builds

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 24, 2026

Summary

Adds a new XA0119 warning variant (XA0119_ReadyToRun) that fires when PublishReadyToRun is enabled in a Debug/fast-deployment configuration, matching the existing pattern for AotAssemblies/RunAOTCompilation.

The warning message is:

Using fast deployment and ReadyToRun at the same time is not recommended. Use fast deployment for Debug configurations and ReadyToRun for Release configurations.

Changes

  • Resources.resx — Added XA0119_ReadyToRun resource string
  • Resources.Designer.cs — Added corresponding XA0119_ReadyToRun property
  • Xamarin.Android.Common.targets — Added AndroidWarning in _CheckNonIdealAppConfigurations target with condition EmbedAssembliesIntoApk != 'True' And PublishReadyToRun == 'True'
  • xa0119.md — Updated documentation to list PublishReadyToRun in both the "remove from Debug" and "use for Release" sections

Add XA0119_ReadyToRun warning that fires when PublishReadyToRun is set
in a Debug/fast-deployment configuration, matching the existing pattern
for AotAssemblies. Update Resources.resx, Resources.Designer.cs,
Xamarin.Android.Common.targets, and xa0119.md documentation.

Agent-Logs-Url: https://github.com/dotnet/android/sessions/6cdbfb09-1398-4fbd-b5b5-111ce3992917

Co-authored-by: jonathanpeppers <840039+jonathanpeppers@users.noreply.github.com>
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a new XA0119 warning variant to discourage combining fast deployment with ReadyToRun, aligning this guidance with existing XA0119 checks for AOT/linking, and updates the corresponding docs/resources.

Changes:

  • Added XA0119_ReadyToRun localized resource and generated accessor.
  • Added a new AndroidWarning entry under _CheckNonIdealAppConfigurations to emit XA0119 when PublishReadyToRun is enabled with fast deployment.
  • Updated XA0119 documentation to mention PublishReadyToRun guidance for Debug vs Release.

Reviewed changes

Copilot reviewed 3 out of 4 changed files in this pull request and generated 2 comments.

File Description
src/Xamarin.Android.Build.Tasks/Xamarin.Android.Common.targets Adds XA0119 warning emission condition for PublishReadyToRun + fast deployment.
src/Xamarin.Android.Build.Tasks/Properties/Resources.resx Adds the XA0119_ReadyToRun warning message.
src/Xamarin.Android.Build.Tasks/Properties/Resources.Designer.cs Adds the generated property accessor for the new resource string.
Documentation/docs-mobile/messages/xa0119.md Documents PublishReadyToRun as non-ideal for Debug/fast deployment and recommended for Release (CoreCLR).
Files not reviewed (1)
  • src/Xamarin.Android.Build.Tasks/Properties/Resources.Designer.cs: Language not supported

Comment thread src/Xamarin.Android.Build.Tasks/Xamarin.Android.Common.targets
Comment thread src/Xamarin.Android.Build.Tasks/Xamarin.Android.Common.targets
@jonathanpeppers jonathanpeppers added the ready-to-review This PR is ready to review/merge, I think any CI failures are just flaky (ignorable). label Apr 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready-to-review This PR is ready to review/merge, I think any CI failures are just flaky (ignorable).

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants