What's new in Version 3
Describes the list of changes present in Version 3 of MauiReactor
Version 3 of MauiReactor targets MAUI .NET 9. If you're using an earlier version of MauiReactor, please note the following short-step list of changes required to move forward to version 3.
Hot-reload changes
Hot-reload must be enabled using the new Feature switch available in .NET 9 (https://github.com/dotnet/designs/blob/main/accepted/2020/feature-switch.md).
Remove the EnableMauiReactorHotReload() call in program.cs :
var builder = MauiApp.CreateBuilder();
builder
.UseMauiReactorApp<HomePage>()
#if DEBUG
.EnableMauiReactorHotReload()
#endif
...;
In the project definition add the following lines:
<ItemGroup Condition="'$(Configuration)'=='Debug'">
<RuntimeHostConfigurationOption Include="MauiReactor.HotReload" Value="true" Trim="false" />
</ItemGroup>XAML resources
Due to an internal change of the .NET Maui 9 framework, loading the resources (i.e. styles, brushes, etc) from XAML dictionaries is slightly less straightforward.
First, create an App.xaml and App.xaml.cs (or copy them from the standard .NET MAUI template) and link your resources as merged dictionaries of the app:
Ensure that the file build action is set to MauiXaml:

In the App.xaml.cs file, create a derived class of the standard MAUI Application like the following:
Note that the class injects the IServiceProvider object and passes it to the base class. HomePage class represents the root component of the application.
Finally, use the standard UseMauiApp method in your Program.cs file load the application:
If you need also to customize the MauiReactor application, i.e. also adding your c# styles from the application theming feature, you need to create an additional class that derives from ReactorApplication and set your application theme as shown below:
AOT compliance
MauiReactor 3 is fully AOT compatible: to compile your application to a native iOS or Mac Catalyst application you have to add these lines to your project definition:
Unhandled exception callback
In version 3 you can configure an unhandled exception callback using this code:
Last updated
Was this helpful?