.NET MAUI › Native Interop & Libraries

How do you add a NuGet package to a MAUI project?

Beginner

Answer

Add it like any .NET package (dotnet add package or the IDE), ensuring the package supports the MAUI target frameworks. Cross-platform packages 'just work'; platform-specific ones may only apply to certain TFMs. Check for MAUI compatibility before adopting a library.
dotnet add package CommunityToolkit.Maui
Real-world example A team adds CommunityToolkit.Maui and initializes it with UseMauiCommunityToolkit() to gain popups and behaviors.

Common follow-ups: How do you know a package supports MAUI? | Do all packages target every platform?