Skip to content

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

@AlexanderEgorov

Description

@AlexanderEgorov

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

Metadata

Metadata

Labels

Area: App+Library BuildIssues when building Library projects or Application projects.

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions