Problem
MergeRemapXml.cs has three Log.LogWarning() calls with hardcoded interpolated strings instead of using coded warnings from Properties.Resources. This makes the warnings harder to discover in documentation and inconsistent with the rest of the build tasks.
Location
- File:
src/Xamarin.Android.Build.Tasks/Tasks/MergeRemapXml.cs
- Lines: 56, 68, 79
Current Code
// Line 56
Log.LogWarning ($"Specified input file `{file}` does not exist. Ignoring.");
// Line 68
Log.LogWarning ($"Input file `{file}` does not start with `<replacements/>`. Skipping.");
// Line 79
Log.LogWarning ($"Input file `{file}` could not be read: {e.Message} Skipping.");
Suggested Fix
-
Add three new warning codes to src/Xamarin.Android.Build.Tasks/Properties/Resources.resx (and Resources.Designer.cs). Use codes XA4316, XA4317, and XA4318 (next available in the XA43xx range):
XA4316: Specified input file '{0}' does not exist. Ignoring.
XA4317: Input file '{0}' does not start with '<replacements/>'. Skipping.
XA4318: Input file '{0}' could not be read: {1}. Skipping.
-
Replace the three Log.LogWarning(...) calls with Log.LogCodedWarning("XA4316", ...) etc., using the resource strings.
-
Create documentation files for each new code:
Documentation/docs-mobile/messages/xa4316.md
Documentation/docs-mobile/messages/xa4317.md
Documentation/docs-mobile/messages/xa4318.md
Follow the existing format (see xa4315.md for reference): frontmatter with title, description, ms.date, f1_keywords, then sections for Example messages, Issue explanation, and Solution.
-
Add the new codes to the table of contents in Documentation/docs-mobile/messages/index.md.
Guidelines
- Use
Log.LogCodedWarning ("XA4316", Properties.Resources.XA4316, file) pattern
- Only modify the English
Resources.resx — never modify *.lcl or non-English *.resx files
- Follow Mono code style (tabs, space before parentheses)
- Check
xa4315.md for documentation format reference
Acceptance Criteria
Generated by Nightly Fix Finder · ● 10.1M · ◷
Problem
MergeRemapXml.cshas threeLog.LogWarning()calls with hardcoded interpolated strings instead of using coded warnings fromProperties.Resources. This makes the warnings harder to discover in documentation and inconsistent with the rest of the build tasks.Location
src/Xamarin.Android.Build.Tasks/Tasks/MergeRemapXml.csCurrent Code
Suggested Fix
Add three new warning codes to
src/Xamarin.Android.Build.Tasks/Properties/Resources.resx(andResources.Designer.cs). Use codesXA4316,XA4317, andXA4318(next available in the XA43xx range):XA4316:Specified input file '{0}' does not exist. Ignoring.XA4317:Input file '{0}' does not start with '<replacements/>'. Skipping.XA4318:Input file '{0}' could not be read: {1}. Skipping.Replace the three
Log.LogWarning(...)calls withLog.LogCodedWarning("XA4316", ...)etc., using the resource strings.Create documentation files for each new code:
Documentation/docs-mobile/messages/xa4316.mdDocumentation/docs-mobile/messages/xa4317.mdDocumentation/docs-mobile/messages/xa4318.mdFollow the existing format (see
xa4315.mdfor reference): frontmatter withtitle,description,ms.date,f1_keywords, then sections for Example messages, Issue explanation, and Solution.Add the new codes to the table of contents in
Documentation/docs-mobile/messages/index.md.Guidelines
Log.LogCodedWarning ("XA4316", Properties.Resources.XA4316, file)patternResources.resx— never modify*.lclor non-English*.resxfilesxa4315.mdfor documentation format referenceAcceptance Criteria
Log.LogWarningcalls inMergeRemapXml.csare replaced withLog.LogCodedWarningusing resource stringsResources.resx(XA4316, XA4317, XA4318)Documentation/docs-mobile/messages/Documentation/docs-mobile/messages/index.md