Announcing .NET 8

Gaurav Seth

We are happy to announce the availability of .NET 8, the latest LTS version of one of the world’s leading development platforms, starting today. .NET 8 delivers thousands of performance, stability, and security improvements, as well as platform and tooling enhancements that help increase developer productivity and speed of innovation. The .NET team, our partners, and the .NET community will be talking about what’s new in .NET 8 as well as what people are building with .NET today to meet their needs of tomorrow at .NET Conf 2023, a three day virtual event (November 14-16). Come, join us!

.NET 8 is now available

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.

.NET 8 - Cloud Native Features

Integrate large language models (LLMs) like OpenAI’s GPT directly into your .NET app. Use a single powerful component model to handle all your web UI needs with Blazor. Deploy your mobile applications to the latest version of iOS and Android with .NET MAUI. Discover new language enhancements that make your code more concise and expressive with C# 12.

Let’s look at what’s new in .NET 8.

Unparalleled Performance – Experience the fastest .NET to date

.NET 8 comes with thousands of performance improvements across the stack. A new code generator called Dynamic Profile-Guided Optimization (PGO) that optimizes your code based on real-world usage is enabled by default and can improve the performance of your apps up to 20%. The AVX-512 instruction set, which is now supported, enables you to perform parallel operations on 512-bit vectors of data, meaning you can process much more data in less time. The primitive types (numerical and beyond) now implement a new formattable and parsable interface, which enable them to directly format and parse as UTF-8 without any transcoding overhead.

Every year we talk about the performance gains across .NET. This year we continue our quest to push the performance of .NET to new heights. From the latest TechEmpower benchmarks with .NET 8, we’re seeing improvements in the JSON API scenario of 18%, hitting nearly one million requests per second with ASP.NET Core Minimal APIs.

TechEmpower requests per second (RPS)

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 larger improvement of 24%, now over 300K requests per second with ASP.NET Core.

.NET Aspire – An opinionated stack to build observable, production-ready cloud-native applications

.NET Aspire is a stack for building resilient, observable, and configurable cloud-native applications with .NET. It includes a curated set of components enhanced for cloud-native by including telemetry, resilience, configuration, and health checks by default. Combined with a sophisticated but simple local developer experience, .NET Aspire makes it easy to discover, acquire, and configure essential dependencies for cloud-native applications on day 1 as well as day 100. The first preview of .NET Aspire is available today.

.NET Aspire

.NET 8 Container Enhancements – More secure, compact, and productive

Package your applications with containers more easily and more securely than ever with .NET. Every .NET image includes a non-root user, enabling more secure containers with one-line configuration. The .NET SDK tooling publishes container images without a Dockerfile and are non-root by default. Deploy your containerized apps faster due to smaller .NET base images – including new experimental variants of our images that deliver truly minimal application sizes for native AOT. Opt-in to even more security hardening with the new Chiseled Ubuntu image variants to reduce your attack surface even further. Using Dockerfiles or SDK tooling, build apps and container images for any architecture.

Modern containers

Native AoT – Journey towards higher density sustainable compute

Compile your .NET apps into native code that uses less memory and starts instantly. No need to wait for the JIT (just-in-time) compiler to compile the code at run time. No need to deploy the JIT compiler and IL code. AOT apps deploy just the code that’s needed for your app. Your app is now empowered to run in restricted environments where a JIT compiler isn’t allowed.

Before and After AOT

Artificial Intelligence – Infuse AI into your .NET applications

Generative AI and large language models are transforming the field of AI, providing developers the ability to create unique AI-powered experiences in their applications. .NET 8 makes it simple for you to leverage AI via first-class out-of-the box AI features in the .NET SDK and seamless integration with several tools.

.NET 8 brings several enhancements to the System.Numerics library to improve its compatibility with Generative AI workloads, such as integrating Tensor Primitives. With the rise of AI-enabled apps, new tools and SDKs emerged. We collaborated with numerous internal and external partners, such as Azure OpenAI, Azure Cognitive Search, Milvus, Qdrant, and Microsoft Teams, to ensure .NET developers have easy access to various AI models, services, and platforms through their respective SDKs. Additionally, the open-source Semantic Kernel SDK simplifies the integration of these AI components into new and existing applications, to help you deliver innovative user experiences.

Various samples and reference templates, showcasing patterns and practices, are now available to make it easy for developers to get started:

Infuse AI dotnet apps

Blazor – Build full stack web applications with .NET

Blazor in .NET 8 can use both the server and client together to handle all your web UI needs. It’s full stack web UI! With several new enhancements focused towards optimizing page load time, scalability, and elevating the user experience, developers can now use Blazor Server and Blazor WebAssembly in the same app, automatically shifting users from the server to the client at run time. Your .NET code runs significantly faster on WebAssembly thanks to the new “Jiterpreter”-based runtime and new built-in components. As a part enhancing the overall authentication, authorization, and identity management in .NET 8, Blazor now supports generating a full Blazor-based Identity UI.

Full stack Blazor

.NET MAUI – Elevated performance, reliability, and developer experience

.NET MAUI provides you with a single project system and single codebase to build WinUI, Mac Catalyst, iOS, and Android applications. Native AOT (experimental) now supports targeting iOS-like platforms. A new Visual Studio Code extension for .NET MAUI gives you the tools you need to develop cross-platform .NET mobile and desktop apps. Xcode 15 and Android API 34 are now supported allowing you to target the latest version of iOS and Android. A plethora of quality improvements were made to the areas of performance, controls and UI elements, and platform-specific behavior, such as desktop interaction adding better click handling, keyboard listeners, and more.

.NET MAUI Visual Studio Code Extension

C# 12 Features – Simplified syntax for better developer productivity

C# 12 makes your coding experience more productive and enjoyable. You can now create primary constructors in any class and struct with a simple and elegant syntax. No more boilerplate code to initialize your fields and properties. Be delighted when creating arrays, spans, and other collection types with a concise and expressive syntax. Use new default values for parameters in lambda expressions. No more overloading or null checks to handle optional arguments. You can even use the using alias directive to alias any type, not just named types!

Collection expressions

// Create a list:
List<int> a = [1, 2, 3, 4, 5, 6, 7, 8];

// Create a span
Span<char> 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]; // contents is [1, 2, 3, 4, 5, 6, 7, 8, 9]

See more about the latest version of C# in Announcing C# 12.

.NET 8 support across Visual Studio family of tools

We have a set of great tools that help you be the most productive in your development workflow and take advantage of .NET 8 today. Released alongside .NET 8, the Visual Studio 2022 17.8 release brings support for .NET 8, C# 12 language enhancements, and various new productivity features. VS Code and C# Dev Kit is a great way to get started with .NET 8 if you’re learning and/or want to quickly kick the tires of the runtime and is available on Linux, macOS, or in GitHub Codespaces. The new GitHub Codespaces template for .NET, which comes with the .NET SDK and a set of configured extensions, is one of the fastest ways to get started with .NET 8.

Additional features in .NET 8:

Get started with .NET 8

For the best development experience with .NET 8, we recommend that you use the latest release of Visual Studio and Visual Studio Code’s C# Dev Kit. Once you’re set up, here are some of the things you should do:

Celebrate .NET 8

.NET ❤️ Our Community

We would just like to end by saying one big…

https://dotnet.microsoft.com/thanks/8.0

81 comments

Discussion is closed. Login to edit/delete existing comments.

  • ć–°ć°‘ 黄 4

    Congratulations on .NET 8 final release!
    When will Windows WPF/Windows Forms applications get NativeAOT support?

    • Tudor Turcu 2

      WinForms was practically considered legacy since 2006 – we can’t hope for anything more than security updates..

    • Hughes, Danial 0

      You are wasting your time asking these kinds of questions, they are always ignored. Nobody from MS will ever say it but Winforms is on life support due to the large number of legacy users/applications, and WPF is effectively dead. You can see this easily by comparing the activity of MAUI/Blazor compared to WPF. There’s barely ever anything in the WPF blog. etc etc.

      • Merrie McGawMicrosoft employee 0

        While Winforms isnt’ hte exciting new kid on the block we’re still doing lots of investments into WinForms on .NET. The github repo has a lot of participants helping us make new things happen. Check out the .NET Conf 2023 video for a quick view of some of what’s been happening the last couple of years.

    • Merrie McGawMicrosoft employee 0

      Merrie here from the WinForms team. There are a lot of changes that need to be made for WinForms to be fully NativeAOT compatible. We’re working through what that looks like right now as a matter of fact. You can see some issues below where we’re taking on the challenge.

  • Gonzalo Antonio Sosa Malaga 0

    Congrats for such amazing release to y’all

  • 珺 王 0

    When can MAUI have a community component library website similar to Flutter? such as https://pub.dev ??

  • Raj Shukla 0

    Congratulations on the launch of NET 8! Blazor seems really promising with its unique identity component and the out-of-duende identity. Unfortunately, there’s some bad news: when trying to add Identity with individual accounts in Blazor WebAssembly, it seems broken as the backend project isn’t getting included.

  • jackyren 0

    Congratulations on .NET 8 final release!!!
    I’m eager to use .NET MAUI and Artificial Intelligence!!!

  • estellise 0

    I am very excited on the improvements of Blazor, can’t wait to try it out.

  • Muneeb Baig 0

    Quite excited for this release… planning to upgrade my projects soon.

    Can’t be more happy to finally see the spread operator 🙂 with one less

    .

    in the operator vs JS.

    Congrats entire team for such an awesome release.

  • David Roux 1

    Great stuff! Any update regarding dotnet 8 working within VS for Mac? I am aware its EOL soon, but maybe 1 last release? Pleeeaase 🙂

    • Luis Felipe Keresztes Bigatto 2

      Better yet, how about releasing latest VS for Mac source code, considering it is a direct fork and descendant from the “open”-source MonoDevelop? And preferably without breaking the build tools as was done to MonoDevelop the moment they chose to phase it out.

      • David Roux 2

        So so so true. We can only dream

    • Anurag Gandhi 0

      Yeah,
      I have seen 20+ yrs of boast about platform independent since the release of .net framework.

      Hope MS mean it and will have a good dev tools for Mac and Linux as well.
      still looking for stable IDE for Mac users.

      • Luis Felipe Keresztes Bigatto 0

        People like using Rider a lot, especially outside Windows, although I’m not a fan of any subscription-based model, such as JetBrains’.

        Even their trial period and other plans all require registration (AKA giving up your precious data and privacy), short of you using an older version that may not support all the relevant SDKs and runtimes.

        These and other “modern” issues lead me to look elsewhere in terms of tech. Good old C looks hotter and better with each passing day:
        Performance? Check.
        Privacy? Check.
        Familiar, clean and easy syntax? Check.
        Compatibility and portability? Check, works all the way from Windows 1.0 to 11, Mac OS System 1 to 9, Mac OS X to latest macOS, all BSD, all GNU/Linux, all UNIX, Arduino, big machines, small machines, Japanese computers (PC-88 ~ FM-Towns), Euro-centric systems (Atari ST, Amiga, Sinclair ZX81, Commodore 64), handheld consoles from Game Boy to Switch, “big” consoles from Atari 2600 to PS5, and so on. Just about every computer to ever exist, and to be made into the future, without the need to wait for any “software package updates” nor any other such bloat, slowness or pain point.

      • Jan Seris 2

        The Microsoft-suggested way to go is VS Code which is just a slow web app compared to Visual Studio which is a 100 % IDE

        VS for Mac has been dropped because the same people who develop MAUI and Xamarin develop it as well and they are like 5 people

      • Ben Croughs 0

        hello for Mac/Lix consider using Jetbrains Rider, once adopted like me, you will love it, been using it for years now on developing dotnetcore on Mac Laptops, even with ARM architecture it works

  • Mike Gratsas 0

    Implementing deprecated Windows Forms controls, such as MainMenu, ContextMenu, etc., in the project System.Windows.Forms.Controls I had to add extension methods GetMenu(), SetMenu(MainMenu value) to Form type and GetContextMenu(), SetContextMenu(ContextMenu value) to Control type instead of properties. Please answer, if there are any plans to include extension properties in addition to extension methods in the future versions of C# and .NET?

    • Jan Seris 1

      Ask on WinForms github

    • Michael Taylor 1

      Requests for new C# language features should be made in the C# Language Design repo over here. This has been an ask for years. A blog post isn’t a good place for that discussion.

  • Johan Visser 1

    No XAML designer for MAUI?
    As long as there is no XAML designer for MAUI, I will not touch it with a 1000 feet pole.

    • Jan Seris 1

      And there won’t be for the next 2 years definitely.

Feedback usabilla icon