Implicit Usings in .NET MAUI
From Preview 11, .NET MAUI enables implicit usings so common namespaces are available automatically. David Britch lists exactly what you no longer need to import — a real help when you’re new to the framework.
What you’ll learn
- MAUI namespaces — the
Microsoft.Maui.*andMicrosoft.Extensions.DependencyInjectionnamespaces now available implicitly - Platform namespaces — implicit usings for .NET Android (
Android.App,Android.Widget,Android.OS.Bundle), .NET iOS/Mac Catalyst (CoreGraphics,Foundation,UIKit), and .NET macOS (AppKit, and more) - The exceptions — namespaces like
Microsoft.Maui.Layoutsyou’ll still need to import manually - File-scoped namespaces — how the templates changed alongside implicit usings
Read the full post for the complete namespace lists.