News

.NET Community Toolkit Gets Native AOT and .NET 8 Support

The .NET Community Toolkit is Microsoft's latest dev tooling to get native ahead-of-time compilation, continuing a years-long push for that capability across the board.

Native AOT (sometimes NativeAOT at Microsoft) has been a focus point since a survey years ago indicated 35 percent of developers would like to write more .NET projects but couldn't due to no Native AOT option, while 17 percent said its absence made them rewrite projects.

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).

The company says Native AOT apps provide these benefits:

  • Minimized disk footprint: When publishing using Native AOT, a single executable is produced containing just the code from external dependencies that is needed to support the program. Reduced executable size can lead to:
    • Smaller container images, for example in containerized deployment scenarios.
    • Reduced deployment time from smaller images.
  • Reduced startup time: Native AOT applications can show reduced start-up times, which means:
    • The app is ready to service requests quicker.
    • Improved deployment where container orchestrators need to manage transition from one version of the app to another.
  • Reduced memory demand: Native AOT apps can have reduced memory demands, depending on the work done by the app. Reduced memory consumption can lead to greater deployment density and improved scalability.

Now, it has been rolled out in the kit, a collection of helpers and APIs designed to simplify common development tasks for all .NET developers, regardless of the specific UI platform they are using, sporting libraries labled Common, Mvvm, Diagnostics and HighPerformance. The toolkit, part of the .NET Foundation, is maintained and published by Microsoft.

"The main change in this new release of the .NET Community Toolkit is support for .NET 8 and NativeAOT!," said Microsoft's Sergio Pedri, lead developer on the project. "As part of this, all APIs across all packages have been annotated to fully support trimming and AOT compatibility, to ensure using any part of the .NET Community Toolkit goes smoothly even in those scenarios."

Other changes were announced for individual components, including a performance boost for the MVVM Toolkit, which Pedri explained: "This time, the focus was on making the support for INotifyPropertyChanging fully pay-for-play: meaning that when this interface is not needed, there will be no additional overhead because of it. For instance, frameworks such as UWP and WinUI 3 don't need viewmodels to implement this property," he said, going on to explain how to change a setting for those scenarios.

.NET Community Toolkit Changelog
[Click on image for larger view.] .NET Community Toolkit Changelog (source: Microsoft).

All the details are available in the announcement post and GitHub-hosted and above-pictured changelog.

Four new community contributors received shout-outs.

About the Author

David Ramel is an editor and writer at Converge 360.

comments powered by Disqus

Featured

  • Hands On: New VS Code Insiders Build Creates Web Page from Image in Seconds

    New Vision support with GitHub Copilot in the latest Visual Studio Code Insiders build takes a user-supplied mockup image and creates a web page from it in seconds, handling all the HTML and CSS.

  • Naive Bayes Regression Using C#

    Dr. James McCaffrey from Microsoft Research presents a complete end-to-end demonstration of the naive Bayes regression technique, where the goal is to predict a single numeric value. Compared to other machine learning regression techniques, naive Bayes regression is usually less accurate, but is simple, easy to implement and customize, works on both large and small datasets, is highly interpretable, and doesn't require tuning any hyperparameters.

  • VS Code Copilot Previews New GPT-4o AI Code Completion Model

    The 4o upgrade includes additional training on more than 275,000 high-quality public repositories in over 30 popular programming languages, said Microsoft-owned GitHub, which created the original "AI pair programmer" years ago.

  • Microsoft's Rust Embrace Continues with Azure SDK Beta

    "Rust's strong type system and ownership model help prevent common programming errors such as null pointer dereferencing and buffer overflows, leading to more secure and stable code."

  • Xcode IDE from Microsoft Archrival Apple Gets Copilot AI

    Just after expanding the reach of its Copilot AI coding assistant to the open-source Eclipse IDE, Microsoft showcased how it's going even further, providing details about a preview version for the Xcode IDE from archrival Apple.

Subscribe on YouTube

Upcoming Training Events