Fix slow Android debug startup caused by unbundled assembly lookups#472
Merged
StuartFerguson merged 2 commits intomainfrom Mar 5, 2026
Merged
Fix slow Android debug startup caused by unbundled assembly lookups#472StuartFerguson merged 2 commits intomainfrom
StuartFerguson merged 2 commits intomainfrom
Conversation
Co-authored-by: StuartFerguson <16325469+StuartFerguson@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Investigate slow application startup and bundled assembly errors
Fix slow Android debug startup caused by unbundled assembly lookups
Mar 5, 2026
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
On debug builds, the .NET Android runtime attempts to load each assembly from the APK bundle first, fails (Fast Deployment places them outside the APK), then falls back to the deployed location. With 100+ assemblies, this double-lookup adds 20+ seconds to startup and can trigger ANR warnings on the emulator.
Change
EmbedAssembliesIntoApk=trueto the Debug AndroidPropertyGroupinTransactionProcessor.Mobile.csproj, embedding assemblies directly in the APK and eliminating the failed-lookup fallback entirely.Release builds are unaffected.
Original prompt
This section details on the original issue you should resolve
<issue_title>Slow Application Startup</issue_title>
<issue_description>App takes a long time to load when debugging. Somtimes the emulator thinks the app has hung.
Looking at the logs there are a lot of error loading bundled assemblies, can this be investigated please.
Here are the errors I captured:
03-05 11:24:38.355 W/monodroid-assembly(20967): open_from_bundles: failed to load bundled assembly TransactionProcessor.Mobile.dll
03-05 11:24:38.356 W/monodroid-assembly(20967): open_from_bundles: failed to load bundled assembly Mono.Android.dll
03-05 11:24:38.363 W/monodroid-assembly(20967): open_from_bundles: failed to load bundled assembly System.Runtime.dll
03-05 11:24:38.367 W/monodroid-assembly(20967): open_from_bundles: failed to load bundled assembly Java.Interop.dll
03-05 11:24:38.375 W/monodroid-assembly(20967): open_from_bundles: failed to load bundled assembly System.Runtime.InteropServices.dll
03-05 11:24:39.210 W/monodroid-assembly(20967): open_from_bundles: failed to load bundled assembly Mono.Android.Runtime.dll
03-05 11:24:39.240 W/monodroid-assembly(20967): open_from_bundles: failed to load bundled assembly System.Collections.dll
03-05 11:24:39.240 W/monodroid-assembly(20967): open_from_bundles: failed to load bundled assembly System.Collections.Concurrent.dll
03-05 11:24:39.241 W/monodroid-assembly(20967): open_from_bundles: failed to load bundled assembly System.Threading.dll
03-05 11:24:40.637 W/monodroid-assembly(20967): open_from_bundles: failed to load bundled assembly System.Threading.Thread.dll
03-05 11:24:40.642 W/monodroid-assembly(20967): open_from_bundles: failed to load bundled assembly System.Diagnostics.StackTrace.dll
03-05 11:24:41.015 W/monodroid-assembly(20967): open_from_bundles: failed to load bundled assembly Microsoft.Maui.dll
03-05 11:24:41.222 W/monodroid-assembly(20967): open_from_bundles: failed to load bundled assembly System.Memory.dll
03-05 11:24:42.532 W/monodroid-assembly(20967): open_from_bundles: failed to load bundled assembly Microsoft.Maui.Essentials.dll
03-05 11:24:42.534 W/monodroid-assembly(20967): open_from_bundles: failed to load bundled assembly Xamarin.AndroidX.Core.dll
03-05 11:24:43.026 W/monodroid-assembly(20967): open_from_bundles: failed to load bundled assembly System.Console.dll
03-05 11:24:43.477 W/monodroid-assembly(20967): open_from_bundles: failed to load bundled assembly System.ComponentModel.dll
03-05 11:24:43.711 W/monodroid-assembly(20967): open_from_bundles: failed to load bundled assembly Microsoft.VisualStudio.DesignTools.MobileTapContracts.dll
03-05 11:24:43.844 W/monodroid-assembly(20967): open_from_bundles: failed to load bundled assembly netstandard.dll
03-05 11:24:44.780 W/monodroid-assembly(20967): open_from_bundles: failed to load bundled assembly Microsoft.VisualStudio.DesignTools.TapContract.dll
03-05 11:24:45.069 W/monodroid-assembly(20967): open_from_bundles: failed to load bundled assembly Microsoft.Extensions.DependencyInjection.Abstractions.dll
03-05 11:24:45.591 W/monodroid-assembly(20967): open_from_bundles: failed to load bundled assembly Microsoft.Extensions.Hosting.Abstractions.dll
03-05 11:24:45.592 W/monodroid-assembly(20967): open_from_bundles: failed to load bundled assembly Microsoft.Maui.Controls.dll
03-05 11:24:45.598 W/monodroid-assembly(20967): open_from_bundles: failed to load bundled assembly System.ObjectModel.dll
03-05 11:24:45.634 W/monodroid-assembly(20967): open_from_bundles: failed to load bundled assembly Microsoft.Maui.Controls.Xaml.dll
03-05 11:24:45.989 W/monodroid-assembly(20967): open_from_bundles: failed to load bundled assembly CommunityToolkit.Maui.dll
03-05 11:24:46.124 W/monodroid-assembly(20967): open_from_bundles: failed to load bundled assembly CommunityToolkit.Maui.Core.dll
03-05 11:24:46.177 W/monodroid-assembly(20967): open_from_bundles: failed to load bundled assembly Microsoft.Extensions.Configuration.dll
03-05 11:24:46.363 W/monodroid-assembly(20967): open_from_bundles: failed to load bundled assembly Microsoft.Extensions.Configuration.Abstractions.dll
03-05 11:24:46.389 W/monodroid-assembly(20967): open_from_bundles: failed to load bundled assembly Microsoft.Extensions.Diagnostics.Abstractions.dll
03-05 11:24:46.397 W/monodroid-assembly(20967): open_from_bundles: failed to load bundled assembly Microsoft.Extensions.Logging.Abstractions.dll
03-05 11:24:46.680 W/monodroid-assembly(20967): open_from_bundles: failed to load bundled assembly TransactionProcessor.Mobile.BusinessLogic.dll
03-05 11:24:46.809 W/monodroid-assembly(20967): open_from_bundles: failed to load bundled assembly Microsoft.Extensions.Caching.Memory.dll
03-05 11:24:46.812 W/monodroid-assembly(20967): open_from_bundles: failed to load bundled assembly Microsoft.Extensions.Logging.dll
03-05 11:24:47.187 W/monodroid-assembly(20967): open_from_bundles: failed to load bundled assembly Microsoft.Extensions.Primitives.dll
03-05 11:24:47.351 ...
🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.