Microsoft announces the availability of .NET 8, the latest LTS release of one of the world’s leading development platforms. .NET 8 delivers thousands of performance, stability and security improvements, as well as platform and tool enhancements that help increase developer productivity and the speed of innovation.
With this release, .NET redefines how you build intelligent, cloud-native, high-traffic applications and services that scale on demand. Whether you’re deploying on Linux or Windows, using containers or a cloud application model of your choice, .NET 8 makes it easier to build these applications. It includes a set of proven libraries used by Microsoft’s many major services today to help you address fundamental challenges related to observability, resiliency, scalability, tangibility, and more.
Integrate large language models (LLMs) like OpenAI’s GPT directly into your .NET application. Use a single, powerful component template to manage all your web UI needs with Blazor. Deploy your mobile applications with .NET MAUI on the latest versions of iOS and Android.
Unmatched Performance – Check out the fastest version of .NET yet
.NET 8 offers thousands of performance improvements across the stack. A new code generator called Profile-Driven Dynamic Optimization (PGO), which optimizes your code based on actual usage, is enabled by default and can improve your application’s performance by up to 20%. With the AVX-512 instruction set now supported, you can perform parallel operations on 512-bit data vectors, meaning you can process much more data in less time. Primitive types (numeric and otherwise) now implement a new formatting and parsing interface that allows them to format and parse directly into UTF-8 without transcoding effort.
Every year we talk about performance improvements in .NET. This year, .NET performance will be taken to a new level. According to the latest TechEmpower benchmarks with .NET 8, we see 18% improvements in the JSON API scenario and reach almost a million requests per second with the minimum number of ASP.NET Core APIs.
The Fortunes scenario is closer to a real-world workload, including database access and server-side HTML rendering. In this test we see an even greater improvement of 24%, now exceeding 300,000 requests per second with ASP.NET Core.
.NET Aspire – An insights stack for building observable, production-ready cloud-native applications
.NET Aspire is a stack for building resilient, observable, and configurable cloud-native applications using .NET. It includes a number of components selected and extended for cloud native by default, including telemetry, resiliency, configuration, and health checks. Combined with a sophisticated yet simple local development experience, .NET Aspire makes it easy to discover, capture, and configure key dependencies for cloud-native applications from day one.
.NET 8 container improvements – safer, smaller and more productive
Containerize your applications more easily and securely than ever before with .NET. Each .NET image includes a non-root user, making containers more secure with a single-line configuration. By default, the .NET SDK tool publishes container images without a Dockerfile and without a root user. Deploy your containerized applications faster with smaller .NET base images – including new experimental variants of our images that deliver truly minimal application sizes for native AOT. Improve your security with new Ubuntu chiseled image variants to further reduce your attack surface. Build applications and container images for any architecture using Dockerfiles or SDK tools.
Native AoT – Towards higher sustainable computing density
Compile your .NET applications into native code that uses less memory and starts immediately. You don’t have to wait for the just-in-time (JIT) compiler to compile the code at runtime. There is no need to provide the JIT compiler and IL code. AOT applications provide only the code required for your application. Your application can now run in restricted environments where a JIT compiler is not allowed.
Artificial Intelligence – Integrate AI into your .NET applications
Generative AI and large language models are transforming the field of AI, giving developers the opportunity to create unique AI-driven experiences in their applications. .NET 8 makes it easier to use AI with best-in-class, out-of-the-box AI capabilities in the .NET SDK and seamless integration with multiple tools.
.NET 8 makes several improvements to the System.Numerics library to improve its compatibility with generative AI workloads, such as the integration of Tensor primitives. With the emergence of AI-based applications, new tools and SDKs have emerged. Microsoft has worked with many internal and external partners such as Azure OpenAI, Azure Cognitive Search, Milvus, Qdrant and Microsoft Teams to ensure that .NET developers have easy access to various AI models, services and platforms through their respective SDKs. Additionally, the open source Semantic Kernel SDK makes it easy to integrate these AI components into new and existing applications to help you deliver innovative user experiences.
To make developers’ work easier, various examples and reference models are now available that introduce models and practices:
- Customer chatbot
- The recovery generation increases
- Develop applications using Azure AI services
Blazor – Build complete web applications with .NET
Blazor in .NET 8 can use both server and client to meet all your web UI needs. This is a complete web interface! With several new enhancements aimed at improving page load time, scalability, and user experience, developers can now use Blazor Server and Blazor WebAssembly in the same application and automatically switch users from server to client at application execution time. Thanks to the new Jiterpreter-based runtime and new built-in components, your .NET code will run much faster on WebAssembly. As part of the overall authentication, authorization, and identity management improvement in .NET 8, Blazor now supports generating a full identity UI based on Blazor.
.NET MAUI – Improved performance, reliability and developer experience
.NET MAUI gives you a single project system and codebase for building WinUI, Mac Catalyst, iOS and Android apps. Native (experimental) AOT now allows targeting of iOS-like platforms. A new Visual Studio Code extension for .NET MAUI gives you the tools you need to develop cross-platform mobile and desktop applications for .NET. Xcode 15 and Android API 34 are now supported, giving you access to the latest versions of iOS and Android. Numerous quality improvements have been made in the areas of performance, controls and user interface elements, as well as platform-specific behavior such as desktop interaction, better click handling, keyboard headphones and much more.
C# 12 Features – Simplified syntax for better developer productivity
C# 12 makes your programming experience more productive and enjoyable. You can now create primary constructors in any class and struct using simple, elegant syntax. No more simple code to initialize your fields and properties. Creating tables, ranges, and other types of collections is a pleasure with concise, expressive syntax. Use new default values for parameters in lambda expressions. Overloading or null checking is no longer required to handle optional arguments. You can even use the using alias directive to alias any type, not just named types!
Expressions from the collection
1 | // Create a list: List |
.NET 8 support across the Visual Studio toolset
Microsoft has a number of great tools that can help you make your development workflow as productive as possible and take advantage of the benefits of .NET 8 today. Visual Studio 2022 version 17.8 is released alongside .NET 8 and adds support for .NET 8, C# 12 language extensions, and various new productivity features. VS Code and C# Dev Kit is a great way to get started with .NET 8 if you’re still learning and/or want to quickly get up to speed with the runtime. It is available on Linux, macOS or in GitHub Codespaces. The new GitHub Codespaces template for .NET, which includes the .NET SDK and a set of configured extensions, is one of the quickest ways to get started with .NET 8.
Source: Microsoft
And you ?
What is your opinion on this topic?
See also:
Microsoft releases .NET 8 Preview 6, the sixth preview of the new version of the framework, showing all the new features and improvements in this version
Microsoft releases .NET 8 Preview 5, the fifth preview of the new version of the framework, introducing all the new features and improvements in this version
Microsoft releases .NET 8 Preview 4, the fourth preview of the latest version of the framework, adding exciting new features and improvements