Skip to content

Conversation

Copilot
Copy link
Contributor

@Copilot Copilot AI commented Aug 13, 2025

Fixes the Android NativeAOT build failure that occurs when CodegenType=NativeAOT is specified:

error : The PrivateSdkAssemblies ItemGroup is required for _ComputeAssembliesToCompileToNative

The issue was that the ".NET Android Default Template" scenario was missing the condition to exclude NativeAOT builds, while all other Android scenarios in the same project file already had this exclusion.

Android NativeAOT is experimental and not yet suitable for production use (as indicated by the warning in the build logs). The fix adds the same condition Condition="'$(CodegenType)' != 'NativeAOT'" to the netandroid scenario that was already applied to all other Android scenarios:

  • MAUI Android Default Template
  • MAUI Android Sample Content Template
  • MAUI Blazor Android Default Template

This ensures consistent behavior across all Android scenarios and prevents the MSBuild error by excluding Android scenarios from NativeAOT builds entirely.

Fixes #4904.


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copy link
Contributor Author

Copilot AI commented Aug 13, 2025

@LoopedBard3 👋 This repository doesn't have Copilot instructions. With Copilot instructions, I can understand the repository better, work faster and produce higher quality PRs.

I can generate a .github/copilot-instructions.md file for you automatically. Click here to open a pre-filled issue and assign it to me. I'll write the instructions, and then tag you for review.

@Copilot Copilot AI changed the title [WIP] Android NativeAOT builds failing to build Fix Android NativeAOT builds failing with PrivateSdkAssemblies error Aug 13, 2025
@Copilot Copilot AI requested a review from LoopedBard3 August 13, 2025 23:04
Copilot finished work on behalf of LoopedBard3 August 13, 2025 23:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Android NativeAOT builds failing to build
2 participants