prismmaui

Where to find a Prism MAUI hello world sample?


I'm trying to port my [Xamarin Forms with Prism] application to Maui (also with Prism). The Prism for Maui web page promises to enclose some examples, but so far there are no any (for Maui).

Could anyone share a link to any resource describing how to setup properly Maui with Prism ? On the Prism website there are some concepts described, but the examples enclosed are just few-liners, not covering the things that I'm missing.


Solution

  • The best way to setup end-to-end Prism with Maui is to install nugget template for Visual Studio, and to create a new project. First, goto nuget.org and search for "Maui Prism" phrase. Limit the search results ('Package type' on the left) to Template, click 'Apply'.

    Install the Prism.Templates template locally, by executing CLI installation command, as provided (version number may change over time): In my case it was:
    dotnet new install Prism.Templates::8.1.97

    Once installed, open visual studio and create brand new project, selecting Prism .NET MAUI App template. The hello-word application is end-to-end setup and ready to run.

    This application may be helpful to carry over missing elements into migrated application from Xamarin-Prism to Maui-Prism.