dotnet / dotnet/android

Building a Maui App for Android is extremely slow when EmbedAssembliesIntoApk is enabled (net9)

Open
#9,455 13 comments 6 reactions 2 assignees Claimed by @dellis1972 View on GitHub
Area: App+Library Build
Dominant language
C#
Stars
2.1k
Forks
579
Avg merge
1d 20h
Merged PRs (30d)
257

Description

### Description

Building a MAUI project targeting net9.0-android is much slower when EmbedAssembliesIntoApk is enabled compared to building under net8.0-android (500s in net9 vs 90s in net8). Most of the time is spent on the _BuildApkEmbed process.

### Steps to Reproduce

1. Create a new application with `dotnet new maui -n MauiBlankApp` targeting net9.
2. Build it with the following command:
`dotnet build MauiBlankApp.csproj -p:Configuration=Debug -p:TargetFramework=net9.0-android -p:EmbedAssembliesIntoApk=true -p:AndroidSdkDirectory=...`

### Link to public reproduction project repository

_No response_

### Version with bug

9.0.0-rc.2.24503.2

### Is this a regression from previous behavior?

Yes, this used to work in .NET MAUI

### Last version that worked well

8.0.92 SR9.2

### Affected platforms

Android

### Affected platform versions

_No response_

### Did you find any workaround?

_No response_

### Relevant log output

_No response_

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.