Microsoft’s .NET 8 is here now with thousands of performance, security and stability improvements. Like the previous version, .NET 7, .NET 8 puts an emphasis on cloud development, the company said. Generative artificial intelligence is also a focus.
“With this release, .NET reshapes the way we build intelligent, cloud-native, applications and high-traffic services that scale on demand. Whether you’re deploying to Linux or Windows, using containers or a cloud app model of your choice, .NET 8 makes building these apps easier. It includes a set of proven libraries that are used today by the many high-scale services at Microsoft to help you with fundamental challenges around observability, resiliency, scalability, manageability, and more”, Gaurav Seth, partner director of product for developer platforms at Microsoft, wrote in a blog post.
In .NET 8, developers can integrate large language models, such as GPT, into a .NET application. To improve compatibility with generative AI workloads, the company also added several enhancements to the System.Numerics library.
The platform update includes a new code generator, called Dynamic Profile-Guided Optimization (PGO), that optimizes code based on “real world” usage and improves application performance by as much as 20%. PGO is enabled by default. Support for the AVX-512 instruction set enables parallel operations on 512-bit vectors of data to process more data in less time. Microsoft noted that it is seeing improvements in the JSON API scenario of 18%, with nearly one million requests per second with ASP.NET Core Minimal APIs.
To make it easier for developers to get started with AI, the company also created several samples and reference templates that showcase AI patterns and practices. Currently these include Customer Chatbot, Retrieval Augmented Generation, and Developing Apps using Azure AI services.
As for containers, Microsoft sought to make packaging applications easier and more secure. Every .NET image includes a non-root user for more secure containers and one-line configuration. The .NET SDK tools publish container images sans a Dockerfile and are non-root by default.
.NET 8 is supported by the Visual Studio family of tools including just-released Visual Studio 2022 17.8. Developers also can create .NET 8 applications using Visual Studio Code with the C# Dev Kit or the GitHub Codespaces template for .NET.