maui-aspire
Installation
SKILL.md
.NET MAUI with .NET Aspire
Key Differences from Other Aspire Clients
MAUI apps are NOT orchestrated by the AppHost — they run on devices/simulators and connect over the network. This changes everything:
- ❌ Cannot use Aspire service discovery URIs (
https+http://apiservice) - ❌ Cannot be added with
.WithReference()in the AppHost - ❌ Cannot use
AddServiceDefaults()(not an ASP.NET Core host) - ✅ Must use real network-reachable endpoints
- ✅ Must use MSAL.NET (public client) — not OIDC (confidential client)
Common Gotchas
1. ❌ Don't add MAUI to the AppHost
// ❌ MAUI doesn't implement IServiceMetadata — this will fail
builder.AddProject<Projects.MyMauiApp>("mauiapp");
Related skills