.NET MAUI & C# Android Closed Testing Playbook: AAB Signing, ILLink Trimming & 16 KB NDK
Compile signed .NET 9 MAUI and Blazor Hybrid Android App Bundles (.aab) with RunAOTCompilation, R8/ILLink trimming safety, 16 KB runtime alignment, and 14-day Play Console testing.
dotnet publish -f net9.0-android -c Release -p:AndroidPackageFormat=aab -p:AndroidKeyStore=true<PropertyGroup Condition="$(TargetFramework.Contains('-android')) and '$(Configuration)' == 'Release'">
<ApplicationId>com.example.mauiapp</ApplicationId>
<ApplicationDisplayVersion>1.0.2</ApplicationDisplayVersion>
<ApplicationVersion>3</ApplicationVersion>
<SupportedOSPlatformVersion>24.0</SupportedOSPlatformVersion>
<TargetPlatformVersion>35.0</TargetPlatformVersion>
<AndroidPackageFormat>aab</AndroidPackageFormat>
<RunAOTCompilation>true</RunAOTCompilation>
<EnableLLVM>true</EnableLLVM>
<PublishTrimmed>true</PublishTrimmed>
<AndroidLinkTool>r8</AndroidLinkTool>
<AndroidKeyStore>true</AndroidKeyStore>
</PropertyGroup>Hardening `.csproj` Release Properties, ILLink Trimming & Startup AOT
Developers building cross-platform mobile apps in C# with .NET 9 MAUI (or .NET MAUI Blazor Hybrid) experience one of the sharpest Debug-versus-Release divergence curves in mobile engineering. In `Debug` configuration, Mono runs with JIT interpretation, `PublishTrimmed` is off, and R8 Java shrinking is bypassed. The moment you run `dotnet publish -f net9.0-android -c Release -p:AndroidPackageFormat=aab`, both the .NET Intermediate Language Linker (`ILLink`) and Android's `r8` shrinker prune types aggressively while Mono Ahead-of-Time (`RunAOTCompilation=true` with startup profiling) compiles hot C# assemblies into native `.so` modules.
To prevent first-launch `MissingMethodException` or blank CollectionView templates on closed testers' phones, adopt three .NET 9 MAUI practices before cutting `ApplicationVersion` `1`: annotate every XAML page and `DataTemplate` with `x:DataType` compiled bindings instead of string reflection bindings, replace runtime `JsonSerializer.Deserialize<T>()` reflection with `[JsonSerializable(typeof(T))]` source-generated contexts, and inspect trimmer warnings (`IL2026`, `IL2087`) during `dotnet publish` instead of suppressing them.
Pass signing secrets strictly through CLI or GitHub Actions environment parameters (`-p:AndroidSigningKeyStore=$KEYSTORE_PATH -p:AndroidSigningKeyAlias=upload -p:AndroidSigningKeyPass=$KEY_PASS -p:AndroidSigningStorePass=$STORE_PASS`) so keystore binaries and passwords never enter source control.
Validating Cold-Start Latency, SQLite-net & Blazor Hybrid WebViews
Cold-start Time to Initial Display (TTID) and startup ANRs deserve special focus on .NET MAUI Android apps. Initializing heavy DI containers (`MauiProgram.CreateMauiApp()`), running synchronous `sqlite-net-pcl` or EF Core migrations on the UI thread inside `App.xaml.cs`, or loading large uncompressed splash SVGs can push cold boot past 4–5 seconds on budget Snapdragon and MediaTek hardware. Defer database migrations and API token refresh calls to asynchronous background initialization after the initial shell frame renders.
For MAUI Blazor Hybrid apps (`BlazorWebView`), remember that Android renders Razor components inside the system Chromium WebView hosted at `https://0.0.0.0/` (or `appdir`). Verify Android 15/16 edge-to-edge safe-area padding across both native MAUI Shell bars and inner Blazor CSS layouts. GOOtester's Standard ($12, 15 human testers / 16 days) and Premium ($20, 25 human testers / 24 days) plans execute separate automated physical-device ARM64 ADB QA runs (`dumpsys meminfo` RAM PSS, `dumpsys gfxinfo` frame jank, cold-start crash/ANR telemetry) without ever counting automated ADB runs as human testers.
Replace legacy `CollectionView` nested `StackLayout` templates with flat `Grid` definitions and recycling `ItemSizingStrategy="MeasureFirstItem"` where uniform row heights apply, preventing layout thrashing and dropped frames on 60 Hz and 120 Hz Android screens.
Coordinating 14-Day Closed Testing & Multi-Version `.aab` Updates
Personal Google Play Console accounts must maintain at least 12 opted-in human testers continuously for 14 consecutive days on a Closed Testing track. Once your initial `.aab` passes Play Console track review and you link `testers@gootester.com` under Closed Testing -> Testers -> Google Groups (and publish any held changes in Publishing Overview), GOOtester verifies your opt-in URL and starts your local service clock.
Increment `<ApplicationVersion>` (`1` -> `2` -> `3`) in `MyApp.csproj` to publish two targeted bugfix bundles during your 14-to-24-day campaign, syncing version metadata via GOOtester's `/api/v1/ci/release` webhook (`gt_live_example_token_12345`). While Google Play alone decides Production Access, demonstrating multi-release C# stability improvements alongside steady human tester retention provides verifiable engineering rigor.
Wire `AppDomain.CurrentDomain.UnhandledException` and `TaskScheduler.UnobservedTaskException` crash breadcrumbing to Sentry or Firebase Crashlytics during closed testing so asynchronous `Task` faults on OEM Android variants surface immediately with full C# stack frames.