Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions Documentation/docs-mobile/messages/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,9 @@ Either change the value in the AndroidManifest.xml to match the $(SupportedOSPla
+ [XA4313](xa4313.md): Framework assembly has been deprecated.
+ [XA4314](xa4314.md): `$(Property)` is empty. A value for `$(Property)` should be provided.
+ [XA4315](xa4315.md): Ignoring {file}. Manifest does not have the required 'package' attribute on the manifest element.
+ [XA4316](xa4316.md): Specified input file '{file}' does not exist. Ignoring.
+ [XA4317](xa4317.md): Input file '{file}' does not start with `<replacements/>`. Skipping.
+ [XA4318](xa4318.md): Input file '{file}' could not be read: {message}. Skipping.

## XA5xxx: GCC and toolchain

Expand Down
25 changes: 25 additions & 0 deletions Documentation/docs-mobile/messages/xa4316.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
---
title: .NET for Android warning XA4316
description: XA4316 warning code
ms.date: 05/22/2026
f1_keywords:
- "XA4316"
---

# .NET for Android warning XA4316

## Example messages

```
warning XA4316: Specified input file '{file}' does not exist. Ignoring.
```

## Issue

A remap XML input file specified via the `InputRemapXmlFiles` item group does
not exist on disk. The file is ignored and the build continues.

## Solution

Verify that the file path is correct and that the file exists. Remove the
reference if the file is no longer needed.
31 changes: 31 additions & 0 deletions Documentation/docs-mobile/messages/xa4317.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
---
title: .NET for Android warning XA4317
description: XA4317 warning code
ms.date: 05/22/2026
f1_keywords:
- "XA4317"
---

# .NET for Android warning XA4317

## Example messages

```
warning XA4317: Input file '{file}' does not start with '<replacements/>'. Skipping.
```

## Issue

A remap XML input file does not have `<replacements>` as its root element.
Files passed to the remap XML merge must use the `<replacements>` root element.

## Solution

Ensure the XML file has the correct format with `<replacements>` as the root
element:

```xml
<replacements>
<!-- replacement entries here -->
</replacements>
```
26 changes: 26 additions & 0 deletions Documentation/docs-mobile/messages/xa4318.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
---
title: .NET for Android warning XA4318
description: XA4318 warning code
ms.date: 05/22/2026
f1_keywords:
- "XA4318"
---

# .NET for Android warning XA4318

## Example messages

```
warning XA4318: Input file '{file}' could not be read: {message}. Skipping.
```

## Issue

A remap XML input file could not be read, for example because it contains
invalid XML or there is a permissions issue. The file is skipped and the build
continues.

## Solution

Verify that the file contains valid XML and that the build process has
permission to read it.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 16 additions & 0 deletions src/Xamarin.Android.Build.Tasks/Properties/Resources.resx
Original file line number Diff line number Diff line change
Expand Up @@ -836,6 +836,22 @@ Remove the '{0}' reference from your project and add the '{1}' NuGet package ins
<data name="XA4315" xml:space="preserve">
<value>Ignoring `{0}`. Manifest does not have the required 'package' attribute on the manifest element.</value>
<comment>{0} - The path the the file.
</comment>
</data>
<data name="XA4316" xml:space="preserve">
<value>Specified input file '{0}' does not exist. Ignoring.</value>
<comment>{0} - The path to the file.
</comment>
</data>
<data name="XA4317" xml:space="preserve">
<value>Input file '{0}' does not start with '&lt;replacements/&gt;'. Skipping.</value>
<comment>{0} - The path to the file.
</comment>
</data>
<data name="XA4318" xml:space="preserve">
<value>Input file '{0}' could not be read: {1}. Skipping.</value>
<comment>{0} - The path to the file.
{1} - The exception message.
</comment>
</data>
<data name="XA5101" xml:space="preserve">
Expand Down
6 changes: 3 additions & 3 deletions src/Xamarin.Android.Build.Tasks/Tasks/MergeRemapXml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public override bool RunTask ()
void MergeInputFile (XmlWriter writer, string file)
{
if (!File.Exists (file)) {
Log.LogWarning ($"Specified input file `{file}` does not exist. Ignoring.");
Log.LogCodedWarning ("XA4316", Properties.Resources.XA4316, file);
return;
}
var settings = new XmlReaderSettings {
Expand All @@ -65,7 +65,7 @@ void MergeInputFile (XmlWriter writer, string file)
return;
}
if (reader.LocalName != "replacements") {
Log.LogWarning ($"Input file `{file}` does not start with `<replacements/>`. Skipping.");
Log.LogCodedWarning ("XA4317", Properties.Resources.XA4317, file);
return;
}
while (reader.Read ()) {
Expand All @@ -76,7 +76,7 @@ void MergeInputFile (XmlWriter writer, string file)
}
}
catch (Exception e) {
Log.LogWarning ($"Input file `{file}` could not be read: {e.Message} Skipping.");
Log.LogCodedWarning ("XA4318", Properties.Resources.XA4318, file, e.Message);
Log.LogDebugMessage ($"Input file `{file}` could not be read: {e.ToString ()}");
}
}
Expand Down