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.

  • Blake Mitchell 4

    There’s not a single mention of F#. Why is that? It feels almost intentional and antagonistic rather than just a poor oversight.

    • Jon DouglasMicrosoft employee 3

      This was not intentional by any means. I pointed it out a week ago but was OOF last week and it didn’t get added. I will add it right now. Apologies in advance.

      • Jon DouglasMicrosoft employee 5

        Added now. Thanks for bringing it up and holding us accountable.

      • Blake Mitchell 3

        Thank you for adding the link! But it would have been nice to see a small blurb about the new F# release and its many quality of life additions in the main text similar to C#’s section.

        There is always the looming CLR=C# Language Runtime fear, and things like this help perpetuate and legitimize that fear.

        A healthy usage of F# in industry would only boost C# and .NET and not hurt it.

        • Jon DouglasMicrosoft employee 4

          I hear you. I will bring it up personally and see what we can do. We want to empower everyone regardless of language. That means we must do a better job representing.

          • Filip Vukovinski 0

            “There is only one framework”

    • Eddie Smiley 0

      O’Fallon il Navy federal credit score 💯

  • Jordi B 5

    Congratulations on the release of NET 8 STS 😉
    Can’t wait to get rid of NET 7 VSTS on all my projects, Blazor looks very promising.

    • Jon DouglasMicrosoft employee 1

      Wonderful, keep us in the loop as you upgrade! Thank you for the kind comments.

      • Luis Felipe Keresztes Bigatto 1

        I don’t think calling an LTS release “STS” and an STS release “VSTS” can be accurately described as “kind”. 😄 This is why people still prefer .NET Framework over .NET 5+, aside from many more reasons:

        .NET 8 End of Support: 10 November 2026
        .NET Framework 3.5.1 (!!!) End of Support: 2029
        .NET Framework 4.8 and 4.8.1 End of Support: Even longer, unspecified date, tied to OS support

        Honestly, however, all of us, developers, are the ones who are wrong, even wronger than Microsoft, by not choosing a platform with compilers universally available for every OS across the decades, in particular ANSI C89 / ISO C90, with performance and portability like nothing else we have even to this day.

  • Rand Random 4

    FYI – images are hard to read with dark mode on

    • Jon DouglasMicrosoft employee 1

      Thank you, looking into some updates to make them light/dark mode friendly (especially labels).

  • John Remillard 3

    Have been tracking this for a few months – very excited to see the .NET 8 release. I haven’t ever been excited about a framework update in my entire life.

    • Jon DouglasMicrosoft employee 1

      Me either! It’s a great time to be a .NET developer!

  • jason baisden 1

    I see there’s nothing mentioned regarding Razor pages. Is that avenue of development being sunset?

  • Wolff, Ricardo 2

    Is there a doc with the differences between RC2 and this final version?
    For instance, I created a Blazor app using RC2 and they were saying they would add some Imports to simplify setting the RenderMode in the final version. Is there a place where I can see all these kind of changes?

  • Marcelo Henrique Fernandes Ribeiro 0

    please need this package to be upgraded too. it is still in release candidate and is blocking my project to be updated
    https://www.nuget.org/packages/Microsoft.VisualStudio.Web.CodeGeneration.Design/

    Error:

    Severity   Code    Description Project File    Line    Suppression State
    
    Error   NU1107  Version conflict detected for Microsoft.CodeAnalysis.Common. Install/reference Microsoft.CodeAnalysis.Common 4.5.0 directly to project Project.Web.MVC to resolve this issue. 
    
     Project.Web.MVC -> Project.Infra.Data -> Microsoft.EntityFrameworkCore.Design 8.0.0 -> Microsoft.CodeAnalysis.CSharp.Workspaces 4.5.0 -> Microsoft.CodeAnalysis.Common (= 4.5.0) 
     Project.Web.MVC -> Microsoft.VisualStudio.Web.CodeGeneration.Design 7.0.11 -> Microsoft.DotNet.Scaffolding.Shared 7.0.11 -> Microsoft.CodeAnalysis.CSharp.Features 4.4.0 -> Microsoft.CodeAnalysis.Common (= 4.4.0)
    
  • Gregory White 1

    .net Linux installs still broken. APT is pulling RC2. Binary installs dont work either when following docs

    • Lee CowardMicrosoft employee 1

      Hey Gregory,

      I’ll need a little more info to try and help out. What distro are you running?

      Also, could you share the “Base Path” as seen when you run dotnet –info? You’ll see it in the “Runtime Environment” section.

  • Vassilios Pallis 1

    How you always manage to release a new stable .NET SDK Version with only support for Visual Studio BETA?
    It only works with Visual Studio 2022 17.8 (Pre-Release).

  • Andrew Witte 2

    “System.Numerics” seems to be much improved in terms of performance. Nice release.

    • Jon DouglasMicrosoft employee 1

      Thank you for your kind comment, Andrew! I’ll let the team know.

Feedback usabilla icon