Home > Blockchain >  Xamarin nuget packages in MAUI
Xamarin nuget packages in MAUI

Time:11-05

MAUI is the evolution of Xamarin.Forms, or so they say anyway. Does that mean that nuget packages developed for Xamarin will work for MAUI as well?

I'm thinking specifically about Google's ML Kit packages that are available for Xamarin, will these work on MAUI?

I would test it myself but I don't have access to a computer with MAUI installed at the moment.

CodePudding user response:

Usually not without the library maintainer doing some work. And it heavily depends on what type of library you're looking at.

If the library is a control or otherwise visual thing, then chances are small that it will just work. The complete internal architecture of how .NET MAUI works has been changed, and thus how something is presented visually has been changed as well.

However, a lot of NuGet packages work on the platform-specific level and "just" provide an abstraction for you to work with on the Xamarin.Forms, now .NET MAUI layer. In that case, it's usually enough to have the library support .NET 6.

In this specific case of Google's ML Kit, this actually lives on the .NET for Android layer and not so much anything .NET MAUI specific.

Also looking at the NuGet page, under the Frameworks tab, I can see that the latest version of this package has already support for .NET 6. As such, this specific library can be used with .NET MAUI.

Hopefully this answer will also provide some clarity on what other things to look for to determine if something can be used with .NET MAUI.

  • Related