Microsoft has unveiled the release of the open-source .NET 8 platform, created through the unification of .NET Framework, .NET Core, and Mono products. Based on .NET 8, developers can create cross-platform applications for browsers, cloud systems, desktops, IoT devices, and mobile platforms using a single library set and a unified build process, regardless of application type. The .NET SDK 8, .NET Runtime 8, and ASP.NET Core Runtime 8 assemblies are built for Linux, macOS, and Windows. The .NET Desktop Runtime 8 is available only for Windows. Related project developments are distributed under the MIT license. The .NET 8 branch is classified as LTS and will be supported for three years until November 2026.
.NET 8 includes a Runtime with JIT compiler RyuJIT, API specifications, WPF libraries, Windows Forms, WinUI, Entity Framework, the dotnet command-line interface, and tools for developing microservices, libraries, server-side, graphical, and console applications. Additionally, a stack for developing web applications ASP.NET Core 8.0 has been released, along with the ORM layer Entity Framework Core 8.0 (drivers available, including for SQLite and PostgreSQL), WPF 8 library (Windows Presentation Foundation), Windows Forms 8 framework for GUI development, Aspire 8 platform for creating Cloud Native applications, MAUI 8 framework for developing cross-platform user interfaces, and releases for C# 12 and F# 8. Support for .NET 8.0 and C# 12 is included in the free code editor Visual Studio Code.
Features of the new release:
- Significant performance optimization has been achieved. The new code generator, which supports dynamic optimization based on execution profiling (Dynamic Profile-Guided Optimization), is enabled by default. The use of this new code generator provides up to a 20% performance boost for applications. Furthermore, the new version adds support for AVX-512 instructions, enhancing the performance of parallel operations on vector data. A new interface for primitive types allows direct parsing and formatting of data in UTF-8 format without transcoding. In TechEmpower tests, performance for JSON API increased by 18%, and for Fortunes by 24%.

- A new .NET Aspire stack has been added, designed for cloud-native application development using .NET technologies. .NET Aspire provides a comprehensive set of components that may be needed when creating applications that run in cloud environments, including tools for telemetry collection, configuration, health checks, and ensuring fault tolerance.
- The tools for packaging applications into isolated containers have been enhanced. By default, container images can be published without a Dockerfile and without the root user. The base image size of the container with .NET platform components has been reduced. A minimalist variant of the image for running applications compiled to executable files (Native AOT) has been added. A more secure variant of the images based on Chiseled Ubuntu has also been introduced.
- The efficiency of compiling into standalone executable files (Native AOT) has been improved, where the entire project is initially compiled into machine code for the target platform without using intermediate code and without applying JIT.

- The capabilities of software interfaces usable in machine learning systems have been expanded. For example, in the System.Numerics library, compatibility with generative AI systems has been enhanced. Examples for chatbot consciousness, content generation, and accessing Azure AI services have been added.
- In Blazor, the platform for building web applications in C#, page load times have been reduced, scalability has been improved, and the use of both Blazor Server and Blazor WebAssembly in a single application to create programs that combine client and server functions has been allowed. A Jiterpreter, a new faster WebAssembly runtime, has been added, enabling a 20% improvement in interface rendering. Authentication, authorization, and identification capabilities have been expanded. server The MAUI framework for developing cross-platform user interfaces has been expanded, providing the ability to use a single codebase to build interfaces for Windows, macOS, iOS, and Android. Experimental support for compilation (Native AOT) has been added. Support for Xcode 15 and Android API 34 has also been included. UI elements and buttons have been modernized, and mouse click and keyboard event handling have been improved.
- The MAUI framework for developing cross-platform user interfaces has been expanded, offering the ability to use a single codebase to build interfaces for Windows, macOS, iOS, and Android. Experimental support for compilation (Native AOT) has been included. Support for Xcode 15 and Android API 34 has also been added. UI components and buttons have been modernized, enhancing the handling of mouse clicks and keyboard events.
- C# 12 introduces support for simplified syntax for creating primary constructors in any class and structure, as well as simplifying the creation of arrays, span, and other collection types. It provides means for setting default values for lambda expression parameters. The handling of optional arguments has been simplified. There is a new capability to create type aliases using the ‘alias’ directive. // Creating a list List a = [1, 2, 3, 4, 5, 6, 7, 8]; // Creating span arrays Span b = [‘a’, ‘b’, ‘c’, ‘d’, ‘e’, ‘f’, ‘h’, ‘i’]; // Use the spread operator to concatenate int[] array1 = [1, 2, 3]; int[] array2 = [4, 5, 6]; int[] array3 = [7, 8, 9]; int[] fullArray = [..array1, ..array2, ..array3]; // the content will be [1, 2, 3, 4, 5, 6, 7, 8, 9]
- ASP.NET Core has implemented support for authentication using cookies and tokens for single-page applications (SPA) and web applications (Blazor). A new user interface for the authentication process has been proposed. Security against XSRF/CSRF attacks has been strengthened.
- Entity Framework Core introduces new complex types that can be used as objects. Hierarchical data support has been added for SQL Server.
- The NuGet package manager has streamlined package auditing in projects and provides notifications on known vulnerabilities.
- .NET Runtime has added an Ahead-of-Time (AOT) compilation mode for WebAssembly (WASM) and Android platforms.
- WPF has introduced an OpenFolderDialog and included support for hardware acceleration in RDP.
- Support for ARM64 architecture has significantly improved, enhancing code quality for ARM.
- The debugger now shows summarized debugging data and implements simplified debugging layers for commonly used .NET types.
Source: opennet.ru


