Native AOT Advances in .NET 8 Preview 6

.NET 8, now four months away from GA, continues to advance native ahead-of-time compilation (native AOT) functionality in the new Preview 6.

Native AOT (or NativeAOT) is a focus point of the .NET 8 dev team. It was introduced in .NET 7 a couple years after its absence from predecessor .NET Core was identified in a survey as holding back adoption of the development platform.

Does the lack of officially supported native AOT option prevent you from using .NET more?
[Click on image for larger view.] "Does the lack of officially supported native AOT option prevent you from using .NET more?" (source: Microsoft).

Though it comes with some trade-offs, it provides several benefits including faster startup time and smaller memory footprints, along with enabling apps to run on machines that don't have the .NET runtime installed.

[Click on image for larger view.] Native AOT in .NET 8 (source: Microsoft).

Those machines might run iOS, and Preview 6 introduces an opt-in feature to enable support for targeting iOS-like platforms.

"This includes building and running .NET iOS and .NET MAUI applications with NativeAOT on: ios, iossimulator, maccatalyst, tvos or tvossimulator systems," Microsoft said in a July 11 post announcing Preview 6. "The motivation of this work is to enable users to explore the possibility of achieving better performance and size savings when targeting such platforms with NativeAOT."

This opt-in feature targets app deployment, and Mono is still the default runtime choice for app development and deployment. Microsoft cited some found improvements (30-40 percent reduction in app sizes compared to Mono) in the post and provided guidance on how to build and run a .NET MAUI application with Native AOT on an iOS device with .NET CLI (command-line interface).

While perhaps not a major feature, the above stands out in a preview that Microsoft described as "a continuation" of the previous preview. The company specifically highlighted library updates, a new WASM mode, more source generators and constant performance improvements along with Native AOT support on iOS.

Microsoft also noted the preview of a .NET MAUI extension for Visual Studio Code, allowing for cross-platform development with Microsoft's evolution of Xamarin.Forms, such evolution including the addition of the desktop as an app target in addition to traditional iOS and Android mobile targets.

.NET MAUI (or NET Multi-platform App UI ) warranted its own announcement, which noted the dev team resolved 23 high-impact issues. That announcement also noted that developers can try out .NET 8 with the 17.6.1 release of Visual Studio for Mac.

On the web-dev side of things in the ASP.NET Core component, Microsoft bolstered new Blazor rendering schemes.

About the Author

David Ramel is an editor and writer for Converge360.

comments powered by Disqus


  • GitHub Copilot for Azure Gets Preview Glitches

    This reporter, recently accepted to preview GitHub Copilot for Azure, has thus far found the tool to be, well, glitchy.

  • New .NET 9 Templates for Blazor Hybrid, .NET MAUI

    Microsoft's fifth preview of .NET 9 nods at AI development while also introducing new templates for some of the more popular project types, including Blazor Hybrid and .NET MAUI.

  • What's Next for ASP.NET Core and Blazor

    Since its inception as an intriguing experiment in leveraging WebAssembly to enable dynamic web development with C#, Blazor has evolved into a mature, fully featured framework. Integral to the ASP.NET Core ecosystem, Blazor offers developers a unique combination of server-side rendering and rich client-side interactivity.

  • Nearest Centroid Classification for Numeric Data Using C#

    Here's a complete end-to-end demo of what Dr. James McCaffrey of Microsoft Research says is arguably the simplest possible classification technique.

  • .NET MAUI in VS Code Goes GA

    Visual Studio Code's .NET MAUI workload, which evolves the former Xamarin.Forms mobile-centric framework by adding support for creating desktop applications, has reached general availability.

Subscribe on YouTube