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!
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.
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.
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 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.
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.
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:
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.
.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.
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:
- ASP.NET Core. Streamlines identity for single-page applications (SPA) and Blazor providing cookie-based authentication, pre-built APIs, token support, and a new identity UI. and enhances minimal APIs with form-binding, antiforgery support to protect against cross-site request forgery (XSRF/CSRF), and
asParameters
support for parameter-binding with Open API definitions - ASP.NET Core tooling. Route syntax highlighting, auto-completion, and analyzers to help you create Web APIs.
- Entity Framework Core. Provides new “complex types” as value objects, primitive collections, and SQL Server support for hierarchical data.
- NuGet. Helps you audit your NuGet packages in projects and solutions for any known security vulnerabilities.
- .NET Runtime. Brings a new AOT compilation mode for WebAssembly (WASM) and Android.
- .NET SDK. Revitalizes terminal build output and production-ready defaults.
- WPF. Supports OpenFolderDialog and Enabled HW Acceleration in RDP
- ARM64. Significant feature enhancements and improved code quality for ARM64 platforms through collaboration with ARM engineers.
- Debugging. Displays debug summaries and provides simplified debug proxies for commonly used .NET types.
- System.Text.Json. Helps populate read-only members, customizes unmapped member handling, and improves Native AOT support.
- .NET Community Toolkit. Accelerates building .NET libraries and applications while ensuring they are trim and AOT compatible (including the MVVM source generators!)
- Azure. Supports .NET 8 with Azure’s PaaS services like App Service for Windows and Linux, Static Web Apps, Azure Functions, and Azure Container Apps.
- F# 8. Includes significant language changes, new diagnostics, improvements in usability, and performance enhancements in project compilation, as well as upgrades to the FSharp.Core standard library.
- What’s new in .NET 8. Check out our documentation for everything else!
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:
- Try the new features and APIs. Download .NET 8 and report issues in our issue tracker.
- Test your current app for compatibility. Learn whether your app is affected by default behavior changes in .NET 8.
- Test your app with opt-in changes. .NET 8 has opt-in behavior changes that only affect your app when enabled. It’s important to understand and assess these changes early as they may become default in the next release.
- Update your app with the Upgrade Assistant. Upgrade your app with just a few clicks using the Upgrade Assistant.
- Know you’re supported. .NET 8 is officially supported by Microsoft as a long term support (LTS) release that will be supported for three years.
- Bonus: eShop Sample for .NET 8. Follow all the best coding and architecture practices with our new eShop sample, now updated for .NET 8!
Celebrate .NET 8
- .NET Conf 2023. Join us November 14-16, 2023 to celebrate the .NET 8 release!
- What’s next in .NET? Get involved and learn the latest news on .NET 8 and the next version of .NET.
- Get C# Certified. Earn a badge of honor with a freeCodeCamp C# certification.
- Learn .NET 8. Free tutorials, videos, courses, and more for beginner through advanced .NET developers. All updated for .NET 8!
- See Developer Stories. Take a look at success stories of developers migrating to modern .NET.
- Read about why .NET?. Read through our recent blog series about the convenience of .NET.
.NET ❤️ Our Community
We would just like to end by saying one big…
What is that “Fotunes” in Performance image right side of json requests? can you explain it?
Very excited about .NET 8 release! Thank you for all the hard work.
Do you know when it will be rolled out on Azure Government? Currently, only .NET 8 (Preview) is available, and it isn’t compatible with .NET 8 (Early Access).
Wanted to say huge thanks for lowering the glibc version requirement when targeting arm linux; helps my team do great things with SignalR in a limited IoT-like platform
What’s the particle physics involved in upgrading VS 2019 to any version of .NET past 4.8? I’ve been stuck on 4.8 for months, years, feels like decades.
I know you might not like this, but I would create a new .NET Core project from one of the VS templates and copy the classes from the old project to the new one. .NET Framework and .NET Core are so different from each other that it would be time wasted to try addressing all breaking changes.
Like most Microsoft Updates, I am concerned about backwards compatibility. In the BioPharma Industry we cannot simply upgrade. We must contend with the software requirements of our instruments as well as strict regulatory practices for Data Integrity (FDA 21 CFR Part 11). I'm concerned that .NET 8 will not be backwards compatible with .NET 4 as we have had issues with backwards compatibility between .NET 4 and .NET 2.0. We end...
Please can I implement MDI with the Fluent UI?
How is the new Microsoft.AspNetCore.Testing different/better than Microsoft.AspNetCore.Mvc.Testing ?
That’s some great stuff, well done guys!
As an avid .NET developer, I've been eagerly awaiting the release of .NET 8, and I can't help but express my gratitude to the entire .NET team for their dedication and hard work in bringing this groundbreaking release to life.
Thank you, .NET team, for your unwavering commitment to innovation and excellence. .NET 8 is a testament to your dedication, and I'm incredibly excited to explore its vast potential and unleash its power to build...
Recently have updated VS 2022 17.8, Since then, cannot able to launch my API projects which is in .net 6 (c# 10). it always shows as site cannot be reached. how to resolve this ?. Note: I don’t have any issues with loading projects.