Statistics show that 42.3% of developers worldwide use varying versions of .NET, highlighting that it remains the most utilised framework in the global software development community. Small and large-scale companies alike use .NET as their primary technology to power websites and applications, including well-known brands like Samsung, Microsoft, Intel, and JP Morgan Chase.
This blog will take a deep dive into the new features and improvements to look forward to with the release of the latest .NET version — and everything you should know about .NET 8.0, including the release date and roadmap, key features, and performance improvements.
.NET 8 is the most recent iteration of .NET. Microsoft has announced November 2023 as the official release date of .NET 8.
Additionally, the latest version has also been designated a Long Term Support (LTS) release version, which means it will continue receiving updates, bug fixes and ongoing community support for at least three years after the initial release date.
As for the preview releases, the support lifecycle is as follows:
New versions of .NET are released yearly every November to enable developers and businesses to plan their roadmaps. Per Microsoft’s Modern Lifecycle Policy, the extended guarantee of patches and free support is also meant to empower developers to adopt the newest versions as they are released.
Odd-numbered releases, like .NET 7, are Standard Support Release (STS) versions that get free support and patches for a minimum of 18 months.
.NET 8 comes with new features that enhance responsiveness and improve website performance to allow you to create a more seamless user experience for site visitors.
Let’s take a look at the key features of .NET 8:
C# 12 introduces notable enhancements to coding efficiency and clarity. Primary constructors can now be applied to any class or struct, offering a streamlined and elegant syntax. .NET 8 does away with boilerplate code for field and property initialization, plus the syntax for creating arrays, spans, and other collection types is now more concise and expressive. Additionally, lambda expressions benefit from new default parameter values, reducing the reliance on method overloading and null checks for optional arguments. The “using” alias directive also extends its utility, allowing aliasing for any type, not restricted to named types.
.NET 8 simplifies the integration of AI capabilities through its features in the .NET SDK and seamless compatibility with various tools. Notably, improvements in the System.Numerics library cater to Generative AI workloads, including the integration of Tensor Primitives.
In response to the growing prevalence of AI-enabled applications, Microsoft has collaborated with key partners like Azure Cognitive Search, Azure OpenAI, Qdrant, Milvus, and Microsoft Teams. This collaborative effort ensures that .NET developers can easily access a diverse range of AI models, platforms, and services through their respective SDKs.
Moreover, the open-source Semantic Kernel SDK streamlines the incorporation of these AI components into both new and existing applications, facilitating innovative user experiences. To aid developers in getting started, Microsoft has also released a collection of samples and reference templates showcasing various patterns and practices. Examples include Customer Chatbot, Developing Apps using Azure AI services, and Retrieval Augmented Generation.
In .NET 8, Blazor offers a comprehensive solution for web UI by seamlessly integrating server and client capabilities. This full-stack web UI approach allows developers to address all their web UI needs effectively. With a focus on optimising page load time, scalability, and enhancing the user experience, Blazor now enables the concurrent use of Blazor Server and Blazor WebAssembly within the same application. This dynamic runtime behaviour automatically transitions users from server to client as needed.
The performance boost is notable, particularly for .NET code running on WebAssembly, thanks to the introduction of a "Jiterpreter"-based runtime and new built-in components. In terms of authentication, authorization, and identity management, Blazor in .NET 8 also takes it a step further by supporting the generation of a complete Blazor-based Identity UI, contributing to an enhanced overall experience.
Easily and securely package your applications using containers with .NET's improved functionality. Each .NET image now comes with a non-root user by default, offering enhanced container security through a straightforward setup. With the updated .NET SDK tooling, you can publish container images without the need for a Dockerfile, ensuring they're non-root as well.
You can also speed up the deployment of your containerized apps thanks to smaller .NET base images, including experimental variants for exceptionally compact application sizes using native AOT. Increase security further by opting for the new Chiseled Ubuntu image variants to reduce your application's vulnerability. Whether you’re using Dockerfiles or SDK tooling, building applications and container images for any architecture is now straightforward.
In .NET 8, a newly introduced capability dynamically adjusts memory limits, which is particularly valuable in fluctuating demand scenarios, such as those encountered in cloud services. Scaling up and down in response to demand variations is crucial for cost-effectiveness.
When a service identifies a reduction in demand, it can optimise resource consumption by lowering its memory limit. In the past, this adjustment could fail as the garbage collector (GC) remained unaware of the change, potentially allocating more memory than the updated limit. Now, with the introduction of the RefreshMemoryLimit() API, you can seamlessly update the GC with the new memory limit.
However, there are certain limitations to consider. On 32-bit platforms (e.g., Windows x86 and Linux ARM), establishing a new heap hard limit in .NET is not possible if one doesn't already exist. Also, the API may return a non-zero status code, indicating a failed refresh. This might occur if the scale-down is overly aggressive, leaving no room for the GC to adapt. In such cases, it is recommended to call GC.Collect(2, GCCollectionMode.Aggressive) to reduce current memory usage before attempting the adjustment again.
Lastly, scaling up the memory limit beyond what the GC believes the process can handle during startup might succeed with the RefreshMemoryLimit call, but the process won't be able to utilise more memory than perceived by the GC as the limit.
.NET 8 has also improved how JSON serialisation and deserialization are managed, with added support for numeric types, including Half Struct. The system uses an IEEE float16 type, making it useful for data delivery to machine learning models.
Overall, Microsoft has also improved its JSON tooling. It’s now easier to write specific nodes to a JSON document. Plus, .NET now manages JSON content better alongside other features. Overall, the updates ensure JSON document integrity and make .NET a better platform for cloud-native development.
.NET 8 introduces enhancements to the System.Text.Json source generator, focusing on aligning the Native AOT experience with the reflection-based serializer. Key improvements include:
.NET 8 includes improvements to code generation and just-in-time (JIT) compilation with JIT throughput improvements, SIMD improvements, and Arm64 performance improvements, among others. Also, JIT/NativeAOT in .NET 8 now possesses the capability to automatically unroll and vectorize certain memory operations utilising SIMD, including comparison, copying, and zeroing. This optimisation is applied when the compiler can ascertain their sizes during compile time.
Furthermore, dynamic Profile-Guided Optimization (PGO) has undergone enhancements and is now activated by default. There's no longer a need for a runtime configuration option to enable it. Dynamic PGO collaborates seamlessly with tiered compilation, refining code optimization through additional instrumentation introduced during tier 0.
On average, the implementation of dynamic PGO results in a performance increase of approximately 15%. In an extensive benchmark suite comprising around 4600 tests, 23% exhibited performance improvements of 20% or more.
.NET 8 also supports new tools that provide randomness or tools that allow you to use randomness as a selector within your code. There’s no need to run calculations. You can now randomly select items from an input set to place in an output array.
You can also randomly shuffle items in a dataset, which can be very useful when working with machine learning models, such as in differentiating training and test data each time you build a new model.
.NET 8 also introduces support for SHA-3 hashing primitives, available on Linux with OpenSSL 1.1.1 or later and Windows 11 Build 25324 or later. APIs that originally offered SHA-2 functionalities now include their SHA-3 counterparts. This includes:
It's important to note that current SHA-3 support primarily targets cryptographic primitives, with expectations that higher-level constructions and protocols, such as X.509 certificates, SignedXml, and COSE, may not fully adopt SHA-3 initially.
Some .NET 8 features are also specific to silicon advances, like vector acceleration features built on Intel AVX-512. As such, .NET 8 allows developers to write error-handling code via a flag to test for AVX support.
Specifically, .NET 8 includes support for the following key features of AVX-512:
There’s also a new time abstraction feature that allows developers to create a local time provider and then set it up to operate in different time zones outside one’s current local time. This allows for programmatic control of time zones and makes creating mock times for tests and spotting bugs much easier.
In addition to the features we discussed above, there are also several key performance improvements at the core of .NET 8. From the looks of it, this version is substantially heavy on providing significant improvements to optimise runtime and reduce startup times.
.NET 8 applications will benefit from faster execution and greater efficiency with a significantly optimised .NET runtime, reduced resource consumption, and enhanced overall performance.
Reduced application startup times is another key improvement, allowing for even faster application launches and an overall better, more optimised user experience.
.NET 8 applications are also set to become even more efficient in using memory and system resources with .NET 8’s optimised resource allocation and management.
Significant improvements in parallelism also enable .NET 8 developers to write scalable, efficient code that utilises modern and multi-core architectures.
.NET 8 is also capable of interoperating with other languages and technologies. Interoperability provides opportunities to reuse existing code and facilitates better integration with legacy systems — opening a new world of opportunities for seamless connections between new and old technologies.
.NET 8 allows developers to incorporate existing C/C++ libraries and code into .NET projects, allowing teams to leverage existing code heritage, saving time and resources.
Integrations with Blazor and Xamarin have also been updated, with Blazor now deeply integrated into .NET 8. This enables developers to create advanced applications with reusable components. Xamarin now also offers cross-platform mobile app development.
.NET 8 has also improved the way the framework handles legacy code, which can be very helpful within organisations looking to leverage existing legacy applications that need to be updated, maintained, or modernised.
.NET MAUI offers a unified project system and a single codebase, enabling the development of applications for iOS, Android, WinUI, and Mac Catalyst. The experimental Native AOT also now extends its support to targeting iOS-like platforms.
Additionally, a newly introduced Visual Studio Code extension tailored for .NET MAUI equips developers with essential tools for creating cross-platform .NET mobile and desktop applications.
Expanded support for Xcode 15 and Android API 34 also facilitates targeting the latest iOS and Android versions. Noteworthy improvements have also been implemented in performance, UI elements, controls, and platform-specific behaviours. Enhancements include refined desktop interaction incorporating improved click handling, keyboard listeners, and more.
.NET 8 is a supercharged release that provides incredible value to the development ecosystem, with several performance improvements, development tools, support, and interoperability updates. True to its standing as the most utilised development framework, .NET 8 provides more expansive opportunities for developers to build web applications, desktop software, mobile applications, cloud services, or games.
The efforts to improve both cloud integration and interoperability with legacy systems and code also allow developers to harness the full potential of emerging technologies as well as legacy systems that have provided value in the past.
Overall, these improvements make .NET 8 ideal for developing high-performance applications with accelerated runtimes and reduced operational costs. Most importantly, the updates seek to improve user experience and provide the end user with the best and most streamlined experience with .NET 8-based apps and services, regardless of device or architecture.
At The Virtual Forge, we build data-rich, intelligent platforms to help clients solve unique business problems. We use a collaborative and transparent approach to understand your needs and use our tools and expertise to innovate and create solutions that will help you excel in your field.
Feel free to connect with us if you need help with .NET 8-based design, development, testing, or support—we’d love to hear from you.
According to Microsoft, the official release date for .NET 8 was November 14th 2023.
.NET 8 is an LTS release and is set to receive free support and patches for a minimum of three years post-launch.
To install the SDK, you have to visit the .NET website and download the installer for your specific operating system.
Yes, .NET 8 has several performance improvements that can significantly enhance the efficiency, speed, performance, and overall user experience of applications built with .NET 8.
Mastering the DAX ( Data Analysis Expressions) language is crucial for harnessing the full potential of Power BI. As more businesses adopt Power BI for data analysis, understanding best practices and how to optimize DAX becomes even more critical.