BT

Facilitating the Spread of Knowledge and Innovation in Professional Software Development

Write for InfoQ

Topics

Choose your language

InfoQ Homepage News .NET 9 MAUI Preview 5: New Blazor Project Template, Android 15 Beta 2 Support

.NET 9 MAUI Preview 5: New Blazor Project Template, Android 15 Beta 2 Support

Microsoft released .NET 9 Preview 5 on June 11th 2024. This update brings a .NET MAUI Blazor Hybrid and Web App project template, Android API 35 Beta 2 support, and some performance and app size optimizations on the Android platform.

A new .NET MAUI Blazor Hybrid and Web solution template has been introduced. As per the documentation, this template simplifies creating apps that target Android, iOS, Mac, Windows, and Web while maximizing code reuse and automatically sets up projects for a Blazor Web App and a .NET MAUI Blazor Hybrid app, using a shared Razor Class Library for UI components in both applications. It is worth mentioning that the MAUI Blazor Hybrid app is rendered on the target device using WebView and Blazor mobile view, and it's not a fully-fledged native app.


(Blazor Hybrid App and Blazor Web App sharing the same UI Code, Source: Official .NET GitHub)

For non-Blazor MAUI applications running in Android, Preview 5 brings a performance improvement of about 15% in startup time. To do so, the code leverages LLVM marshall methods by default, modifying the assembly code to use the LLVM marshalling structures. With MAUI Blazor apps on Android, the team detected an issue that caused the application to hang, and they are investigating the root cause. That’s why this performance optimization is disabled if the project is targeting a Blazor app.

As the Android 15 beta program advances, .NET 9 MAUI Preview 5 has added the bindings for the Android API 25 Beta 2, corresponding to the Android 15 Beta 2 release. Readers can find the complete changelog for the Android API 25 Beta 2 on the Android Developers site.

A size trimming enhancements have been added to reduce app compiled size when using the Release compilation mode. It can be disabled in the project file.

The MAUI enhancements in iOS .NET implementation are focused on fixing bugs and improving the quality of the build.

Readers can refer to GitHub official MAUI repository for complete release notes. Also, the full list of MAUI changes in all five .NET 9 Preview versions is available on GitHub.

About the Author

Rate this Article

Adoption
Style

BT