From bdf71ae0a3d45390ea561f3197afbd241a707e52 Mon Sep 17 00:00:00 2001
From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com>
Date: Fri, 24 Apr 2026 19:45:08 +0000
Subject: [PATCH] Add XA0119 warning for Debug builds with PublishReadyToRun
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>
---
Documentation/docs-mobile/messages/xa0119.md | 3 +++
.../Properties/Resources.Designer.cs | 9 +++++++++
.../Properties/Resources.resx | 4 ++++
.../Xamarin.Android.Common.targets | 4 ++++
4 files changed, 20 insertions(+)
diff --git a/Documentation/docs-mobile/messages/xa0119.md b/Documentation/docs-mobile/messages/xa0119.md
index ad186cd0dc9..a4fed4e974a 100644
--- a/Documentation/docs-mobile/messages/xa0119.md
+++ b/Documentation/docs-mobile/messages/xa0119.md
@@ -22,6 +22,8 @@ Remove the following options from `Debug` configurations:
* `Full`
* AOT
* `True`
+* ReadyToRun
+ * `True`
* Code Shrinker
* `True`
* `True`
@@ -43,6 +45,7 @@ Remove the following from `Release` configurations:
* `True`
* `True` or in .NET 6 `True`
+* `True` (for CoreCLR)
Consider submitting a [bug][bug] if you are getting one of these
warnings under normal circumstances.
diff --git a/src/Xamarin.Android.Build.Tasks/Properties/Resources.Designer.cs b/src/Xamarin.Android.Build.Tasks/Properties/Resources.Designer.cs
index 03e8aa2ea48..1ff99963a95 100644
--- a/src/Xamarin.Android.Build.Tasks/Properties/Resources.Designer.cs
+++ b/src/Xamarin.Android.Build.Tasks/Properties/Resources.Designer.cs
@@ -447,6 +447,15 @@ public static string XA0119_Interpreter {
}
}
+ ///
+ /// Looks up a localized string similar to Using fast deployment and ReadyToRun at the same time is not recommended. Use fast deployment for Debug configurations and ReadyToRun for Release configurations..
+ ///
+ public static string XA0119_ReadyToRun {
+ get {
+ return ResourceManager.GetString("XA0119_ReadyToRun", resourceCulture);
+ }
+ }
+
///
/// Looks up a localized string similar to Using fast deployment and the linker at the same time is not recommended. Use fast deployment for Debug configurations and the linker for Release configurations..
///
diff --git a/src/Xamarin.Android.Build.Tasks/Properties/Resources.resx b/src/Xamarin.Android.Build.Tasks/Properties/Resources.resx
index bdfc38d26bc..66dca6c1457 100644
--- a/src/Xamarin.Android.Build.Tasks/Properties/Resources.resx
+++ b/src/Xamarin.Android.Build.Tasks/Properties/Resources.resx
@@ -306,6 +306,10 @@ The term "lock file" comes from NuGet. For example, search for "UnauthorizedLock
Disabling the interpreter; using the interpreter and AOT at the same time is not supported. Use the interpreter for hot reload support in Debug configurations and AOT for Release configurations.
The following are literal names and should not be translated: AOT, Debug, Release.
+
+ Using fast deployment and ReadyToRun at the same time is not recommended. Use fast deployment for Debug configurations and ReadyToRun for Release configurations.
+ The following are literal names and should not be translated: ReadyToRun, Debug, Release.
+
Assembly '{0}' is using '[assembly: {1}]', which is no longer supported. Use a newer version of this NuGet package or notify the library author.
The following are literal names and should not be translated: [assembly: {1}], NuGet
diff --git a/src/Xamarin.Android.Build.Tasks/Xamarin.Android.Common.targets b/src/Xamarin.Android.Build.Tasks/Xamarin.Android.Common.targets
index d8d09f7aee4..f820e0e3616 100644
--- a/src/Xamarin.Android.Build.Tasks/Xamarin.Android.Common.targets
+++ b/src/Xamarin.Android.Build.Tasks/Xamarin.Android.Common.targets
@@ -533,6 +533,10 @@ Copyright (C) 2011-2012 Xamarin. All rights reserved.
ResourceName="XA0119_Interpreter"
Condition=" '$(AndroidUseInterpreter)' == 'True' And '$(AotAssemblies)' == 'True' "
/>
+