.NET 8 Released with Native AoT, AI Integration, .NET Aspire & More

Microsoft announced .NET 8 this Tuesday! It’s a new long-term support (LTS) release with 3 years support.

.NET 8 introduced a new code generator “Dynamic Profile-Guided Optimization” (PGO) to optimize your code based on real-world usage. It is enabled by default and can improve the performance of your apps up to 20%.

It added support AVX-512 instruction set, which can process much more data in less time. According to the latest TechEmpower benchmarks, .NET8 has 18% improvements in the JSON API, and 24% improvement in the Fortunes.

.NET 8 has out-of-the-box AI feature in the .NET SDK and seamless integration with several tools. Developers have easy access to various AI models, services, and platforms, such as Azure OpenAI, Azure Cognitive Search. And, various samples and reference templates, showcasing patterns and practices, are now available to make it easy to get started.

image from Microsoft website

Other changes include:

  • The first preview of .NET Aspire, an opinionated, cloud ready stack for building observable, production ready, distributed applications.
  • Container enhancements with smaller .NET base images, and each has non-root user with one-line configuration.
  • Native AoT, with less memory usage and start instantly without waiting for JIT compiler to compile the code at run time.
  • Blazor in .NET 8 can use both the server and client together to handle all your web UI needs Thanks to new “Jiterpreter”, your .NET code runs significantly faster on WebAssembly
  • The latest stable .NET MAUI to enable .NET developers to create cross-platform applications for Android, iOS, macOS, and Windows.
  • C# 12 to create primary constructors in any class and struct with a simple and elegant syntax. No more boilerplate code to initialize your fields and properties.

See the announcement for more details.

How to Install .NET 8 in your Linux

Ubuntu will include the new .NET8 in the system repository. Ubuntu 22.04 user can install it in near future by running the single command:

sudo apt install dotnet8

For Debian, Fedora, RHEL, openSUSE, and Ubuntu users who can’t wait, Microsoft has an official repository for Linux. And, I’ve written a step by step tutorial shows how to add the repository and install .NET.

Hi, I'm Merilyn Ne, a computer geek working on Ubuntu Linux for many years and would like to write useful tips for beginners. Forgive me for language mistakes. I'm not a native speaker of English.