-
Notifications
You must be signed in to change notification settings - Fork 564
Fix build warnings in multiple projects by removing _AllowProjectWarnings entries #10280
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Co-authored-by: jonathanpeppers <[email protected]>
Copilot
AI
changed the title
[WIP] Fix build warnings in this repo
Fix build warnings in multiple projects by removing _AllowProjectWarnings entries
Jul 10, 2025
src/Xamarin.Android.Build.Tasks/Linker/External/Linker/LinkContext.cs
Outdated
Show resolved
Hide resolved
src/Xamarin.Android.Build.Tasks/Tests/Xamarin.ProjectTools/Android/MSBuildSdkExtrasProject.cs
Outdated
Show resolved
Hide resolved
… code, clean formatting Co-authored-by: jonathanpeppers <[email protected]>
Co-authored-by: jonathanpeppers <[email protected]>
jonathanpeppers
approved these changes
Jul 11, 2025
grendello
reviewed
Jul 11, 2025
src/Xamarin.Android.Build.Tasks/Utilities/CompressedAssembliesNativeAssemblyGenerator.cs
Outdated
Show resolved
Hide resolved
Co-authored-by: grendello <[email protected]>
jonathanpeppers
approved these changes
Jul 11, 2025
grendello
approved these changes
Jul 11, 2025
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR addresses build warnings in several projects by removing
_AllowProjectWarningsentries fromDirectory.Build.propsand fixing the resulting warnings.Changes Made
Successfully Fixed Projects
Removed
_AllowProjectWarningsentries and fixed warnings for:Warning Types Fixed
GetAotArguments.csFileResourceParser.csoverridekeywords for virtual method inheritance in linker classesnewkeywords for intentional member hiding inMSBuildLinkContext.csandJavaToolTask.csModuleDefinition.FullyQualifiedName→ModuleDefinition.FileNameModuleDefinition.Import()→ModuleDefinition.ImportReference()Assembly.CodeBaseusage toAssembly.Locationin ProjectToolsProjects with Restored Lines
SetAndroidSupportedAbis). Fixing would require updating test framework and ensuring test coverage remains intact.Technical Details
The linker-related fixes use conditional compilation to handle the difference between the local build context and the ILLink context:
Fields used in native code generation are suppressed with appropriate pragma warnings rather than removed, as they are populated by the build system or native marshaling.
Build Verification
The 4 successfully fixed projects now build cleanly with
TreatWarningsAsErrors=trueenabled. The remaining projects retain their_AllowProjectWarningsentries due to the complexity of the required fixes.Fixes #10279.
💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.