Here's a summary of what's new in .NET MAUI in this preview release:
- Updated Blazor Hybrid Templates
- Android API 35 Beta 2 Support
- Android - LLVM Marshalled Methods
- Android - Trimming Enhancements
.NET MAUI updates in .NET 9 Preview 5:
- What's new in .NET MAUI in .NET 9 documentation.
- GitHub Release
.NET 9 Preview 5:
We have added a new project template that includes a Blazor Web app project, .NET MAUI Blazor hybrid app project, and a Razor class library project to enable better code sharing across native and web application targets. Use the new template from the dotnet command line.
dotnet new maui-blazor-web -n AllTheTargets
This release includes Android API 35 Beta 2 bindings, and improvements for startup performance and app size.
LLVM marshalled methods are now enabled by default in non-Blazor applications targeting Android. We have noted a ~10% improvement in startup performance in our test app. You can disable this in your project file.
<PropertyGroup Condition="'$(TargetFramework)' == 'net9.0-android'">
<AndroidEnableLLVM>false</AndroidEnableLLVM>
<AndroidEnableLLVMOptimizations>false</AndroidEnableLLVMOptimizations>
</PropertyGroup>
Various fixes have been made when using full trimming to result in smaller applications. This is usually only enabled for release builds of your application, and you can configure it in your project file.
<PropertyGroup Condition="'$(Configuration)' == 'Release' And '$(TargetFramework)' == 'net9.0-android'">
<TrimMode>Full</TrimMode>
</PropertyGroup>
This release was focused on quality.
Thanks to contributors @MartyIX, @albyrock87, @aritchie, @symbiogenesis, @Adam--, @rafalka, @dartasen, @BurningLights, @koviant, @aqua-ix, @maonaoda, @Axemasta, @kubaflo, @Giviruk, and @PreciousNyasulu.