Skip to content

Move hardcoded error strings in RemoveRegisterAttribute and GenerateCompressedAssembliesNativeSourceFiles to Properties.Resources#11470

Draft
Copilot wants to merge 2 commits into
mainfrom
copilot/fix-log-error-strings
Draft

Move hardcoded error strings in RemoveRegisterAttribute and GenerateCompressedAssembliesNativeSourceFiles to Properties.Resources#11470
Copilot wants to merge 2 commits into
mainfrom
copilot/fix-log-error-strings

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented May 24, 2026

Two MSBuild tasks used Log.LogError with hardcoded, non-localized strings and no XA error codes. This replaces them with Log.LogCodedError using Properties.Resources entries.

Changes

  • New error codes XA2024 / XA2025 added to Resources.resx and Resources.Designer.cs
  • RemoveRegisterAttribute.cs and GenerateCompressedAssembliesNativeSourceFiles.cs — replaced Log.LogError with Log.LogCodedError
  • Documentation — added xa2024.md, xa2025.md, and updated index.md
// Before
Log.LogError ($"Unable to load assembly '{mono_android}'");
Log.LogError ($"Assembly {assembly.ItemSpec} does not exist");

// After
Log.LogCodedError ("XA2024", Properties.Resources.XA2024, mono_android);
Log.LogCodedError ("XA2025", Properties.Resources.XA2025, assembly.ItemSpec);

…XA2025 codes

Agent-Logs-Url: https://github.com/dotnet/android/sessions/e77e9808-9097-433d-bd71-ba569aa3f6eb

Co-authored-by: jonathanpeppers <840039+jonathanpeppers@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix hardcoded error strings in MSBuild tasks Move hardcoded error strings in RemoveRegisterAttribute and GenerateCompressedAssembliesNativeSourceFiles to Properties.Resources May 24, 2026
Copilot AI requested a review from jonathanpeppers May 24, 2026 02:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants