diff --git a/Documentation/docs-mobile/messages/index.md b/Documentation/docs-mobile/messages/index.md
index 95da6f0074e..d072096d78b 100644
--- a/Documentation/docs-mobile/messages/index.md
+++ b/Documentation/docs-mobile/messages/index.md
@@ -246,6 +246,7 @@ Either change the value in the AndroidManifest.xml to match the $(SupportedOSPla
+ [XA5300](xa5300.md): The Android/Java SDK Directory could not be found.
+ [XA5301](xa5301.md): Failed to generate Java type for class: {managedType} due to MAX_PATH: {exception}
+ [XA5302](xa5302.md): Two processes may be building this project at once. Lock file exists at path: {path}
++ [XA5303](xa5303.md): Failed to parse 'DescriptorIndex' metadata value '{value}' for assembly '{assembly}'.
## XA6xxx: Internal tools
diff --git a/Documentation/docs-mobile/messages/xa5303.md b/Documentation/docs-mobile/messages/xa5303.md
new file mode 100644
index 00000000000..3fe9996bf78
--- /dev/null
+++ b/Documentation/docs-mobile/messages/xa5303.md
@@ -0,0 +1,23 @@
+---
+title: .NET for Android error XA5303
+description: XA5303 error code
+ms.date: 05/20/2026
+f1_keywords:
+ - "XA5303"
+---
+
+# .NET for Android error XA5303
+
+## Example messages
+
+```
+error XA5303: Failed to parse 'DescriptorIndex' metadata value 'abc' for assembly 'MyAssembly.dll'.
+```
+
+## Issue
+
+The `DescriptorIndex` metadata on an assembly item passed to the `CompressAssemblies` MSBuild task could not be parsed as an unsigned integer. This metadata is required for LZ4 assembly compression.
+
+## Solution
+
+This is typically an internal build system error. If you encounter this error, please file a [bug report](https://github.com/dotnet/android/issues/new).
diff --git a/src/Xamarin.Android.Build.Tasks/Properties/Resources.Designer.cs b/src/Xamarin.Android.Build.Tasks/Properties/Resources.Designer.cs
index f91bf212cd5..0b939e58fc0 100644
--- a/src/Xamarin.Android.Build.Tasks/Properties/Resources.Designer.cs
+++ b/src/Xamarin.Android.Build.Tasks/Properties/Resources.Designer.cs
@@ -1856,6 +1856,15 @@ public static string XA5302 {
}
}
+ ///
+ /// Looks up a localized string similar to Failed to parse 'DescriptorIndex' metadata value '{0}' for assembly '{1}'..
+ ///
+ public static string XA5303 {
+ get {
+ return ResourceManager.GetString("XA5303", resourceCulture);
+ }
+ }
+
///
/// Looks up a localized string similar to Could not find Android Resource '{0}'. Please update @(AndroidResource) to add the missing resource..
///
diff --git a/src/Xamarin.Android.Build.Tasks/Properties/Resources.resx b/src/Xamarin.Android.Build.Tasks/Properties/Resources.resx
index 176461e6d71..e872cdea50c 100644
--- a/src/Xamarin.Android.Build.Tasks/Properties/Resources.resx
+++ b/src/Xamarin.Android.Build.Tasks/Properties/Resources.resx
@@ -924,6 +924,12 @@ To use a custom JDK path for a command line build, set the 'JavaSdkDirectory' MS
Two processes may be building this project at once. Lock file exists at path: {0}
+
+ Failed to parse 'DescriptorIndex' metadata value '{0}' for assembly '{1}'.
+
+{0} - The DescriptorIndex metadata value that could not be parsed
+{1} - The assembly ItemSpec
+
This code was generated by a tool.
diff --git a/src/Xamarin.Android.Build.Tasks/Tasks/CompressAssemblies.cs b/src/Xamarin.Android.Build.Tasks/Tasks/CompressAssemblies.cs
index f2730a732d2..039cfc0626c 100644
--- a/src/Xamarin.Android.Build.Tasks/Tasks/CompressAssemblies.cs
+++ b/src/Xamarin.Android.Build.Tasks/Tasks/CompressAssemblies.cs
@@ -35,7 +35,7 @@ public override bool RunTask ()
break;
if (!uint.TryParse (descriptor_index_string, out var descriptor_index)) {
- Log.LogError ($"Failed to parse 'DescriptorIndex' metadata value '{descriptor_index_string}' for assembly '{assembly.ItemSpec}'");
+ Log.LogCodedError ("XA5303", Properties.Resources.XA5303, descriptor_index_string, assembly.ItemSpec);
break;
}