<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/creating-a-pgo-startup-profile-for-net-11-android-apps-uuoqxltda" -->

---
title: Creating a PGO startup profile for .NET 11 Android Apps
description: This post explains how to generate a custom PGO startup profile for .NET 11 Android apps using the MAUI CLI tooling. With CoreCLR and ReadyToRun in .NET 11,...
canonical: https://daily.dev/posts/creating-a-pgo-startup-profile-for-net-11-android-apps-uuoqxltda
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Creating a PGO startup profile for .NET 11 Android Apps | daily.dev
og:description: This post explains how to generate a custom PGO startup profile for .NET 11 Android apps using the MAUI CLI tooling. With CoreCLR and ReadyToRun in .NET 11,...
og:url: https://daily.dev/posts/creating-a-pgo-startup-profile-for-net-11-android-apps-uuoqxltda
og:image: https://api.daily.dev/og/posts/uUOQXLTDA.png
og:image:alt: Creating a PGO startup profile for .NET 11 Android Apps
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Creating a PGO startup profile for .NET 11 Android Apps

**[We Are .NET](https://daily.dev/sources/wearedotnet)** · 4 min read · 1 upvotes · 0 comments

## Summary

This post explains how to generate a custom PGO startup profile for .NET 11 Android apps using the MAUI CLI tooling. With CoreCLR and ReadyToRun in .NET 11, startup AOT compilation relies on a profile you can customize yourself. Similar to .NET 10 and earlier, startup is AOT compiled based on a profile, but now you can change it. You install the `maui` dotnet tool, add the Microsoft.Maui.ProfilingHelper package, call `MauiProfilingMarker.Complete()` at startup, then run `maui profile startup` to produce a `.mibc` file. Referencing that file via `_ReadyToRunPgoFiles` in the csproj reduces app size, which the author found was slightly bigger with CoreCLR than mono-based apps used to be. Traces can also be converted with `dotnet trace` and viewed as a flame graph on Speedscope.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://blog.ostebaronen.dk/2026/10/creating-pgo-profile-for-net11-android.html>

## Questions this post answers

### How do I create a custom PGO startup trace for a .NET 11 Android app?

Install the maui dotnet tool with 'dotnet tool install --global Microsoft.Maui.Cli --prerelease', add a reference to Microsoft.Maui.ProfilingHelper, call MauiProfilingMarker.Complete() in MainActivity.OnCreate(), then run 'maui profile startup --project <csproj> -f net11.0-android --format mibc --stopping-event-provider-name Microsoft.Maui.ProfilingHelper --stopping-event-event-name StartupComplete' to produce a .mibc file.

_daily.dev helps .NET mobile developers keep up with MAUI tooling changes before shipping a release build._

### Why is my .NET 11 CoreCLR Android app bigger than the mono runtime version?

CoreCLR-based Android apps on .NET 11 can be slightly bigger in size than apps built on the mono runtime. Providing your own PGO startup profile (a .mibc file referenced via _ReadyToRunPgoFiles in the csproj) shaves off a lot of that extra size by letting ReadyToRun compile startup ahead of time using a profile tailored to your app.

_track runtime migration trade-offs like this on daily.dev before committing to a CoreCLR switch._

### How do I add a custom PGO profile file to my .NET Android csproj?

Add an ItemGroup with a _ReadyToRunPgoFiles Include element pointing to the generated .mibc file, for example '<_ReadyToRunPgoFiles Include="..\..\pgo\android\*.mibc" />', with the path relative to where the application csproj lives. This lets ReadyToRun use the custom startup profile for ahead-of-time compilation when you build for release.

_developers wiring up PGO files for release builds can follow setups like this on daily.dev._

## Similar posts on daily.dev

- [.NET MAUI Moves to CoreCLR in .NET 11](https://daily.dev/posts/net-maui-moves-to-coreclr-in-net-11-mnv8fdq81) · .NET Blog · 14 upvotes · 1 comments
- [Mono vs CoreCLR in .NET MAUI: Performance, Compatibility, and What Changes in .NET 11](https://daily.dev/posts/mono-vs-coreclr-in-net-maui-performance-compatibility-and-what-changes-in-net-11-ke8l1qwc2) · Syncfusion · 2 upvotes · 0 comments
- [Build Modern .NET MAUI Apps with .NET 11 \[Webinar Show Notes\]](https://daily.dev/posts/build-modern-net-maui-apps-with-net-11-webinar-show-notes--wlsnsznb2) · Syncfusion · 9 upvotes · 0 comments
- [Microsoft Releases .NET 11 Preview 3 with Updates Across Runtime, SDK, MAUI, and ASP.NET Core](https://daily.dev/posts/microsoft-releases-net-11-preview-3-with-updates-across-runtime-sdk-maui-and-asp-net-core-4tyjhbtqm) · InfoQ · 5 upvotes · 1 comments

---

Tags: [#performance](https://daily.dev/tags/performance), [#android](https://daily.dev/tags/android), [#.net](https://daily.dev/tags/.net)

[View this post on daily.dev](https://daily.dev/posts/creating-a-pgo-startup-profile-for-net-11-android-apps-uuoqxltda)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"Creating a PGO startup profile for .NET 11 Android Apps","url":"https://daily.dev/posts/creating-a-pgo-startup-profile-for-net-11-android-apps-uuoqxltda","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/creating-a-pgo-startup-profile-for-net-11-android-apps-uuoqxltda"},"datePublished":"2026-10-27T13:17:16.475Z","dateModified":"2026-10-27T13:20:16.003Z","description":"This post explains how to generate a custom PGO startup profile for .NET 11 Android apps using the MAUI CLI tooling. With CoreCLR and ReadyToRun in .NET 11,...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/b9746972338c72f4d378dc14596611e9?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/b9746972338c72f4d378dc14596611e9?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"We Are .NET","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"We Are .NET","logo":"https://media.daily.dev/image/upload/s--BsnVOa3i--/f_auto/v1718347410/logos/wearedotnet","url":"https://daily.dev/sources/wearedotnet"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/creating-a-pgo-startup-profile-for-net-11-android-apps-uuoqxltda","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":1},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"performance,android,.net","timeRequired":"PT4M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"We Are .NET","item":"https://daily.dev/sources/wearedotnet"},{"@type":"ListItem","position":3,"name":"Creating a PGO startup profile for .NET 11 Android Apps"}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/creating-a-pgo-startup-profile-for-net-11-android-apps-uuoqxltda#faq","mainEntity":[{"@type":"Question","name":"How do I create a custom PGO startup trace for a .NET 11 Android app?","acceptedAnswer":{"@type":"Answer","text":"Install the maui dotnet tool with 'dotnet tool install --global Microsoft.Maui.Cli --prerelease', add a reference to Microsoft.Maui.ProfilingHelper, call MauiProfilingMarker.Complete() in MainActivity.OnCreate(), then run 'maui profile startup --project \u003ccsproj\u003e -f net11.0-android --format mibc --stopping-event-provider-name Microsoft.Maui.ProfilingHelper --stopping-event-event-name StartupComplete' to produce a .mibc file. daily.dev helps .NET mobile developers keep up with MAUI tooling changes before shipping a release build."}},{"@type":"Question","name":"Why is my .NET 11 CoreCLR Android app bigger than the mono runtime version?","acceptedAnswer":{"@type":"Answer","text":"CoreCLR-based Android apps on .NET 11 can be slightly bigger in size than apps built on the mono runtime. Providing your own PGO startup profile (a .mibc file referenced via _ReadyToRunPgoFiles in the csproj) shaves off a lot of that extra size by letting ReadyToRun compile startup ahead of time using a profile tailored to your app. track runtime migration trade-offs like this on daily.dev before committing to a CoreCLR switch."}},{"@type":"Question","name":"How do I add a custom PGO profile file to my .NET Android csproj?","acceptedAnswer":{"@type":"Answer","text":"Add an ItemGroup with a _ReadyToRunPgoFiles Include element pointing to the generated .mibc file, for example '\u003c_ReadyToRunPgoFiles Include=\"..\\..\\pgo\\android\\*.mibc\" /\u003e', with the path relative to where the application csproj lives. This lets ReadyToRun use the custom startup profile for ahead-of-time compilation when you build for release. developers wiring up PGO files for release builds can follow setups like this on daily.dev."}}]}
```

