Announcing .NET 8
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…
74 comments
Congratulations on .NET 8 final release!
When will Windows WPF/Windows Forms applications get NativeAOT support?
WinForms was practically considered legacy since 2006 – we can’t hope for anything more than security updates..
First. WinForms is not considered legacy since 2006. WPF is another option, not making WinForms “legacy”. It’s a different paradigm and different technology. Second NativeAOT is considered and you can read about it here: https://github.com/dotnet/winforms/issues/10208#issuecomment-1785980247
and here
https://github.com/dotnet/winforms/issues/4649
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.
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 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.
Congrats for such amazing release to y’all
When can MAUI have a community component library website similar to Flutter? such as https://pub.dev ??
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.
Congratulations on .NET 8 final release!!!
I’m eager to use .NET MAUI and Artificial Intelligence!!!
I am very excited on the improvements of Blazor, can’t wait to try it out.
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.
Great stuff! Any update regarding dotnet 8 working within VS for Mac? I am aware its EOL soon, but maybe 1 last release? Pleeeaase 🙂
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.
So so so true. We can only dream
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.
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.
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
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
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?
Ask on WinForms github
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.
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.
And there won’t be for the next 2 years definitely.