Remove XA1024 warning for .config files#11263
Conversation
The XA1024 warning fired for any `.config` file in publish output, causing false positives for files like `nuget.config`. Since .config files are already excluded from publish output and the .NET 6 transition is long past, this warning is no longer necessary. Fixes #10122 Agent-Logs-Url: https://github.com/dotnet/android/sessions/544b704c-92b2-4c05-a9d4-c5b582c74e47 Co-authored-by: jonathanpeppers <840039+jonathanpeppers@users.noreply.github.com>
.config files
….NET 11" Agent-Logs-Url: https://github.com/dotnet/android/sessions/c5db2e6c-0570-4b44-8e11-41291a3ce67c Co-authored-by: jonathanpeppers <840039+jonathanpeppers@users.noreply.github.com>
|
@copilot I think the NativeAOT case may have trimmer warnings, and we should skip the assertion: |
Agent-Logs-Url: https://github.com/dotnet/android/sessions/2a573bbb-4e38-406d-ad4a-9404cc9f1e0a Co-authored-by: jonathanpeppers <840039+jonathanpeppers@users.noreply.github.com>
... Wrapped the assertion with |
There was a problem hiding this comment.
Pull request overview
Removes the XA1024 warning that was emitted for any .config file during publish item computation, since these files are already excluded from publish output and the warning was producing false positives (e.g., nuget.config). This aligns the SDK behavior and tests/docs with the removal of XA1024 for .NET 11.
Changes:
- Removed the XA1024
<AndroidWarning>emission fromMicrosoft.Android.Sdk.AssemblyResolution.targets. - Deleted the XA1024 resource entry and generated accessor.
- Updated tests and docs to reflect that XA1024 no longer exists.
Reviewed changes
Copilot reviewed 6 out of 7 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| src/Xamarin.Android.Build.Tasks/Microsoft.Android.Sdk/targets/Microsoft.Android.Sdk.AssemblyResolution.targets | Removes the XA1024 warning emission from the publish item pipeline. |
| src/Xamarin.Android.Build.Tasks/Properties/Resources.resx | Removes the XA1024 localized resource string (en-US). |
| src/Xamarin.Android.Build.Tasks/Properties/Resources.Designer.cs | Removes the generated Resources.XA1024 accessor. |
| src/Xamarin.Android.Build.Tasks/Tests/Xamarin.Android.Build.Tests/BuildTest2.cs | Updates BuildBasicApplicationCheckConfigFiles to no longer expect XA1024. |
| Documentation/docs-mobile/TOC.yml | Removes XA1024 from the docs navigation TOC. |
| Documentation/docs-mobile/messages/xa1024.md | Reworks the XA1024 page to state the warning is removed in .NET 11. |
| Documentation/docs-mobile/messages/index.md | Updates the XA1024 entry to indicate it’s removed in .NET 11. |
Files not reviewed (1)
- src/Xamarin.Android.Build.Tasks/Properties/Resources.Designer.cs: Language not supported
XA1024 fires for any file with a
.configextension, producing false positives for files likenuget.config. The warning is also redundant —.configfiles are already removed from publish output by the<ResolvedFileToPublish Remove="..."/>above it. The .NET 6 transition period is long past.Changes
Microsoft.Android.Sdk.AssemblyResolution.targets— Remove the<AndroidWarning>block for XA1024Resources.resx/Resources.Designer.cs— Remove the XA1024 resource stringBuildTest2.cs— FlipBuildBasicApplicationCheckConfigFilesassertion to verify XA1024 is not emittedxa1024.md/index.md/TOC.yml— Mark XA1024 as removed