Advertisement
Beginner .NET MAUI, Project Structure & App Startup

What is the purpose of the Platforms folder?

Short answer

The Platforms folder holds platform-specific entry points and code: Android (MainActivity, MainApplication), iOS/MacCatalyst (AppDelegate, Program), and Windows (App.xaml).

Save .NET MAUI mock interview
Advertisement
AModel answer
The Platforms folder holds platform-specific entry points and code: Android (MainActivity, MainApplication), iOS/MacCatalyst (AppDelegate, Program), and Windows (App.xaml). MAUI compiles only the relevant Platforms subfolder for each target framework, so you can write native code guarded by that platform without #if in most cases.
Real-world example
A developer requests a runtime permission by editing only Platforms/Android/MainActivity.cs, leaving shared code untouched.
Likely follow-ups
  • What is MainActivity? | How does per-platform compilation work?
Related topics