Does dotnet Maui Support Unity Container for Dependency Injection - xamarin

I am converting my Xamarin Forms Application to dotnetMAUI. In Xamarin I've used Unity Container for dependency injection. Is Unity Container supported in dotnet MAUI?

Related

Xamarin Forms Prism application using DryIoc container. How to register 'IBleManager'?

How to register in Xamarin Forms Prism application using DryIoc container 'IBleManager' from Shiny NuGet package so that it can be used with Dependency Injection in ViewModels?

Prism + Xamarin Forms: around 1.2 seconds more compared to just using Xamarin Forms

Package info
Platform: Android
Prism version: 7.0.0.336-pre
Xamarin version: Android 8
Other version info: Xamarin Forms, Xamarin Forms 2.5.0.121934
Repro steps
I create a simple XF + Prism app with DryIoc, based on the VS template.
I noticed a 1.2 seconds difference in the startup when using Prism compared to not using Prism.
When not using Prism, I still created the same view-model object and set it to View by calling in View's c-tor BindingContext = new MainPageViewModel()
I'm curious, based on the Prism for XF implementation, what's the main reason of this difference? Is it the dependency injection? DryIoc seem pretty fast though.

MvvmCross.Forms 5.4: How to setup UWP project?

I started a new Xamarin project and installed the MvvmCross.Forms.StarterPack 5.4 NuGet. All of the projects were changed to support the MvvmCross framework except for the UWP project. What do I need to add to the UWP project so that it will build and run?
MvvmCross has a playground project setup for UWP, https://github.com/MvvmCross/MvvmCross/tree/develop/TestProjects/Playground/Playground.Forms.Uwp. Maybe you can follow it to set it up manually.

Can not compile after migrating unified api in xamarin forms

We have migrated the xamarin forms project to unified api.
But we have the strange compile error like this:
Could not AOT the assembly '.../iOS/obj/iPhone/Debug/mtouch-cache/Build/Xamarin.Forms.Labs.dll
So I changed the settings in iOS project's options.
In ios Build Tab of Project options(iOS) I changed the "don't link" to "Link all assemblies".
But the app is crashed when it is started.
xamarin version is 5.7.1(build 17).
xamarin forms's version is 1.3.5.6337.
xamarin forms labs's version is 1.0.1.5.
Please help me if you have the experience with this error.
Replace Xamarin.Forms.Labs with XLabs.Forms.
There has been a major refactoring on how the XLabs project is structured so your existing project based on the 1.x.x will break. The reason for the refactoring was simple; separate functionality that does not depend on Xamarin.Forms into different assemblies. This allows the use of functionality like IoC, Serialization and even platform specific services without referencing XF.
To upgrade:
Uninstall any existing Xamarin.Forms.Labs packages from your
project.
Install XLabs.Forms package to your projects (PCL, iOS, Droid & WP). This will update Xamarin.Forms to the latest stable release (1.4.x)
Refactor code to reference the correct namespaces.

Using Dependency Injection in Xamarin for Mac

I am creating a simple application with Xamarin for Mac.
I need to provide a decouple architectural elements into solution, but haven't found any information on dependency injection in Xamarin for Mac.
Xamarin.Forms seems to have an IoC NuGet packages, but it is not possible to add Xamarin.Forms into a Xamarin.Mac project, since the current version of Xamarin.Forms (1.2.2) isn't compatible with .Net 4 targeting projects (Xamarin for Mac by default targets .net 4)
Please point me to some information on IoC in Xamarin for Mac.
There's a pretty good article by Rob Gibbens, a Xamarin University instructor, on using IoC containers in Xamarin projects.
IoC Containers with Xamarin
The examples are using Xamarin.iOS for illustrative purposes but I have to imagine that it could work with any of the Xamarin platform projects.
Personally I am a fan of Autofac in general and have played around with it in Xamarin before and it seems to work fine.

Resources