Default Region Adapters not registered by Prism - prism

I am currently upgrading the Prism library of an application, going from version 7.0 to 8.1. We use MEF to extend the application, and the older version of Prism had built-in support for MEF. Going to 8.1 we need do some implementation to adapt Prism to MEF, and that is fine. However, the default region adapters that Prism provides are not being registered with the Prism container extension, unless I do that by myself. Later during the bootstrapping Prism tries to resolve them, but that fails, since they are not registered. How come they are not registered at any time, or have I missed something else?

Related

Prism Migration from version 6.3 to 8.1

I have a WPF Prism application in 6.3 need to upgrade it to Prism 8.1, there are lots of changes on levels of bootstrapper class, Prism Logger being depreciated in 8.1, I'm using PrismApplication class from Prism.WPF in place of bootstrapper, Am I going in right direction?
How do I implement EnterpriseLibrary.Logging.NetCore for logging in Prism 8.1, I don't want to use any 3rd party loggers like serilog, log4net or logn as there is a dependency wrt other application?
Can anyone suggest any sample code or link for Migration of Prism from 6.3 to Prism 7.0 or above.
Thanks!
I tried implementing PrismApplication class instead of Bootstrapper as it is depreciated.
Wrt to logging in prism I tried Registering Serilog in Prism Container but I want to use EnterpriseLibrary.Logging.NetCore due to some dependency.

Can I use Prism for WinUI 3 apps?

I'd like to use Prism in a WinUI 3 app, and I saw the Prism v8.1 release.
Additionally Prism 8.1 offers a new Prism.Uno.WInUI platform target for those wishing to build either native WinUI3, or Cross Platform WinUI 3 apps with Uno Platform.
I'm confused about Uno. I'm not using Uno, can I still use Prism in a WinUI 3 app without using Uno?
If yes, which packages do I need to install and in which projects? (I'd like to use DryIoc)
I guess Prism.DryIoc.Uno.WinUI must be added to the WinUI 3 app project.
But what about the other packages for using Prism?
There is a question about an error while using Prism.Uno with WinUI 3: How to use Prism MVVM in WinUI 3 Desktop
In the comments section, there is a link to a GitHub discussion that is held in Prism GitHub repository. Here is the link: https://github.com/PrismLibrary/Prism/issues/2632
In this discussion, on Dec 7, 2021, it is stated that there is not any support for WinUI 3 other than Prism.Uno.
If you specifically want to use 'Dryloc', you could try to use one of these Nuget packages:
Prism.Container.Extensions
Prism.DryIoc.Extensions
They should both be of general use and not target a specific UI technology.
If you install 'Prism.DryIoc.Extensions' using the Nuget-Package manager, dependent packages should be installed automatically.
See Github - Prism.Container.Extensions
Note there is also a package 'Prism.Core' that does not target a specific UI framework either. If contains features like an event aggregator.

Does Prism for Xamarin Forms support native MacOS applications (I.e. Xamarin.Forms.Mac)?

Prism for Xamarin Forms does support iOS applications, but, as far as I can tell, does not yet support applications for the Mac itself. Two years ago Prism logged this as an issue, but shortly afterward closed it with the comment "Done". If such support does exist, where can I find it documented? If it does not, does the Prism team still expect to add it?
Unable to find any documentation in Prism Library of support for Xamarin.Forms.MacOS.
From this blog post of one of the Prism developers:
Whats New Since 6.3 You may be thinking that NetStandard is great and
all but that isn't really new. As part of Prism updating to Xamarin
Forms 2.3.5, you will now have full support for working with Prism on
macOS applications.
So technically it should work.

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.

MvvmCross as "Native" Libraries

I have a project which greatly depends on ServiceStack, unfortunately the V4 releases, which includes PCL release for most platforms(especially after forking out for a Xamarin Licence), is just way out of my price range as an ISV. I have cloned the MvvmCross code but before I start messing around I would like to know what pitfalls I could run into when attempting to create a Non PCL based version compatible with the platforms I target (Currently Xamarin.Android, WPF and WinRT). The idea would be to able to reuse the code for the WPF project to build Android and WinRT clients.
Does anyone have any pointers?
I don't think there is any problem or pitfall with what you are describing - and I don't think you'll need to fork the MvvmCross source.
You should be able to build your apps as native code, and should then be able to reference the MvvmCross PCL libraries directly from the native libraries you are building - you don't need to rebuild MvvmCross to do this. Plenty of people already use MvvmCross using "file linking" rather than PCLs - it's not the default setup encouraged by the Nuget packages, but it still works fine.

Resources