With .NET 7 you can build cross-platform applications across browser, cloud, desktop, IoT devices, and mobile platforms
Microsoft announced the release of the new version of its ".NET 7" platform , which includes a Runtime with the RyuJIT JIT compiler, API specifications, WPF libraries, and other tools.
In addition, ASP.NET Core 7.0 web applications, Entity Framework Core 7.0 ORM layer, WPF 7 (Windows Presentation Foundation) library, Windows Forms 7 framework for GUI development, Orleans platform .
What's new in .NET 7
In this new version, the Base Class Library (BCL) has been unified for use across various application types, including desktop applications, web applications, cloud platforms, mobile applications, games, embedded programs, and machine learning systems. You can use a common SDK, runtime, and set of libraries to develop different types of applications.
In addition, it's worth noting that the ability to link an application to a .NET 7-compatible API was provided through a target framework definition of "net7.0", such as "<TargetFramework>net7.0</TargetFramework>". To link to platform-specific APIs, you can specify the platform type when specifying the target, for example, by specifying "net7.0-android".
Also noteworthy is the improved compatibility for the ARM64 architecture and ongoing work to achieve performance parity for .NET applications running on x86 and ARM64 architectures. Runtime L3 cache efficiency is improved on ARM64 systems. LSE instructions are used to delimit memory access for parallel threads, resulting in a 45% reduction in latency.
The library added drivers that use the Vector64, Vector128, and Vector256 vector types , and the EncodeToUtf8 and DecodeFromUtf8 functions were rewritten based on vector instructions, increasing their performance by up to 60% (for the NarrowUtf16ToAscii and GetIndexOfFirstNonAsciiChar functions, the performance gain reaches 35%) . Overall, test pass speed on the ARM64 platform increased between 10% and 60%.
Furthermore, the improvements in Linux support are also noteworthy, including the addition of .NET 6 packages to the Ubuntu 22.04 stock repositories and the provision of an optimized, compact, and ready-to-use Docker image for quickly deploying containers with .NET-based applications.
The .NET Upgrade Assistant was introduced to facilitate the migration of older applications to .NET 6 or .NET 7 branches. The new version has expanded support for migrating applications from ASP.NET to ASP.NET Core, adding code analyzers and checkers for WinForms, WPF, and class libraries, implemented support for analyzing executable files, and added support for UWP (Universal Windows Platform).
Generic interfaces for mathematical functions are proposed , and the possibility of defining static elements in virtual interfaces is provided, which allowed the application of generic programming methods to perform mathematical operations without exact information about the type of values.
Performance in the JIT compiler was also improved, in addition to the addition of support for the OSR (On Stack Replacement) mechanism to change the code of methods that are already running, allowing you to perform optimizations on methods that take a long time to complete without waiting for the current call to complete (in the TechEmpower test, there is a 10-30% increase in the performance of processing the first requests).
Other notable changes include:
- Added support for compiling to self-contained executables (native AOT), where the entire project is initially compiled to native target platform code without using intermediate code and without using JIT.
- The .NET SDK implements the ability to restrict the use of provided project templates; for example, you can determine on which operating systems the template is valid.
- NuGet has added a centralized package management mode that allows you to manage dependencies for multiple projects at once.
Finally, if you are interested in learning more , you can find the details at the following link.
For those interested, you should know that the .NET SDK 7, .NET Runtime 7, and ASP.NET Core Runtime 7 builds are built for Linux, macOS, and Windows. .NET Desktop Runtime 6 is only available for Windows.