Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Jul 24, 2025

This PR removes the legacy Xamarin.Android.Bindings.targets file and all usage of the private $(_AndroidIsBindingProject) MSBuild property, as these are only relevant for legacy Xamarin.Android binding projects and are not used in .NET 6+ projects.

Changes Made

Removed Legacy Files

  • Deleted Xamarin.Android.Bindings.targets (172 lines) - This file was the entry point for legacy binding projects and is not imported by .NET 6+ projects
  • Removed reference to the targets file from Xamarin.Android.Build.Tasks.targets

Inlined $(_AndroidIsBindingProject) Logic

Since $(_AndroidIsBindingProject) can never be true in .NET 6+, the logic has been simplified by:

  • Removing conditions that check == 'True' - These blocks would never execute
  • Removing conditions that check != 'True' - These blocks would always execute, so the condition was removed
  • Keeping the logic that runs when the property is false/empty

Files Updated:

  • Xamarin.Android.DesignTime.targets - Simplified MakeDir condition
  • Xamarin.Android.Tooling.targets - Inlined dependency targets and simplified ResolveJdkJvmPath condition
  • Xamarin.Android.EmbeddedResource.targets - Kept non-binding project logic (includes _AddMultiDexDependencyJars)
  • Xamarin.Android.AvailableItems.targets - Removed condition on item group

Preserved Compatibility

  • Legacy binding test projects in tests/ that still import Xamarin.Android.Bindings.targets are left unchanged as intended

Verification

  • Confirmed no references to $(_AndroidIsBindingProject) remain in source files
  • Confirmed no references to Xamarin.Android.Bindings.targets remain in source files (excluding expected test projects)
  • Initial build verification shows no errors related to the changes

Fixes #10336.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI changed the title [WIP] Cleanup: remove src\Xamarin.Android.Build.Tasks\Xamarin.Android.Bindings.targets Cleanup: remove Xamarin.Android.Bindings.targets and _AndroidIsBindingProject usage Jul 24, 2025
Copilot AI requested a review from jonathanpeppers July 24, 2025 19:51
@jonathanpeppers
Copy link
Member

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@jonathanpeppers jonathanpeppers marked this pull request as ready for review July 24, 2025 21:30
@jonathanpeppers jonathanpeppers merged commit 1c14614 into main Jul 24, 2025
60 checks passed
@jonathanpeppers jonathanpeppers deleted the copilot/fix-10336 branch July 24, 2025 21:32
@github-actions github-actions bot locked and limited conversation to collaborators Aug 24, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Cleanup: remove src\Xamarin.Android.Build.Tasks\Xamarin.Android.Bindings.targets

2 participants