dotnet-maui-aot

Configure Native AOT compilation for .NET MAUI iOS and Mac Catalyst apps.

71|10|Updated Feb 11, 2026
One-click install
npx skills add https://github.com/wshaddix/dotnet-skills --skill dotnet-maui-aot-wshaddix
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: dotnet-maui-aot
Source: https://github.com/wshaddix/dotnet-skills/tree/main/skills/dotnet-maui-aot
Command: npx skills add https://github.com/wshaddix/dotnet-skills --skill dotnet-maui-aot-wshaddix

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This skill addresses the challenges of optimizing .NET MAUI applications for iOS and Mac Catalyst by leveraging Native AOT compilation, leading to smaller app sizes and faster startup times.

Core Features & Use Cases

  • Native AOT Compilation: Understand and configure the Native AOT pipeline for MAUI apps.
  • Performance Gains: Achieve significant reductions in app size (up to 50%) and startup time (up to 50%).
  • Library Compatibility: Identify and resolve issues with library compatibility in AOT builds.
  • Use Case: You have a .NET MAUI app targeting iOS that needs to be as small and fast as possible for distribution. This skill guides you through enabling Native AOT, configuring publish profiles, and troubleshooting common compatibility problems.

Quick Start

Configure your MAUI project to use Native AOT for iOS by setting PublishAot to true in your .csproj file.

Frequently Asked Questions about dotnet-maui-aot

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I reduce .NET MAUI app size and startup time for iOS?

You can reduce .NET MAUI app size and startup time by up to 50% using Native AOT compilation. This optimization technique pre-compiles your application directly to native code for iOS and Mac Catalyst.

How do I configure Native AOT compilation for a MAUI iOS project?

To configure Native AOT compilation for MAUI, set the PublishAot property to true in your .csproj file. This enables the Native AOT pipeline to optimize your iOS app during the publish process.

Can I use Native AOT with Mac Catalyst and what prerequisites are required?

Native AOT supports Mac Catalyst and iOS targets requiring .NET 8.0+ and Xcode for iOS/Mac Catalyst SDKs. This environment setup is necessary to leverage the compilation pipeline for performance gains.

What are the limitations of using Native AOT in .NET MAUI apps?

The primary limitation of Native AOT in .NET MAUI is library compatibility. You may encounter issues with certain libraries that are not compatible with AOT builds and need troubleshooting to resolve these gaps.

Why does my MAUI library break when publishing with Native AOT?

MAUI libraries can break during Native AOT publishing due to compatibility gaps with ahead-of-time compilation. Identifying and resolving these library compatibility issues is a core part of the AOT optimization process.