This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Note
Access to this page requires authorization. You can trysigning in orchanging directories.
Access to this page requires authorization. You can trychanging directories.
Learn about the new features in .NET 9 and find links to further documentation.
.NET 9, the successor to.NET 8, has a special focus on cloud-native apps and performance. It will besupported for 18 months as a standard-term support (STS) release. You candownload .NET 9 here.
New for .NET 9, the engineering team posts .NET 9 preview updates onGitHub Discussions. That's a great place to ask questions and provide feedback about the release.
The .NET 9 runtime includes a new attribute model for feature switches with trimming support. The new attributes make it possible to definefeature switches that libraries can use to toggle areas of functionality.
Garbage collection includes adynamic adaptation to application size feature that's used by default instead of Server GC.
The runtime also includes numerous performance improvements, including loop optimizations, inlining, and Arm64 vectorization and code generation.
For more information, seeWhat's new in the .NET 9 runtime.
System.Text.Json adds support for nullable reference type annotations and exporting JSON schemas from types. It adds new options that let you customize the indentation of written JSON and read multiple root-level JSON values from a single stream.
In LINQ, the new methodsCountBy andAggregateBy make it possible to aggregate state by key without needing to allocate intermediate groupings viaGroupBy.
For collection types, theSystem.Collections.Generic.PriorityQueue<TElement,TPriority> type includes a newRemove(TElement, TElement, TPriority, IEqualityComparer<TElement>) method that you can use toupdate the priority of an item in the queue.
For cryptography, .NET 9 adds a new one-shot hash method on theCryptographicOperations type. It also adds new classes that use the KMAC algorithm.
For reflection, the newPersistedAssemblyBuilder type lets yousave an emitted assembly. This new class also includes PDB support, meaning you can emit symbol info and use it to debug a generated assembly.
TheTimeSpan class includes newFrom*
methods that let you create aTimeSpan
object from anint
(instead of adouble
). These methods help to avoid errors caused by inherent imprecision in floating-point calculations.
For more information, seeWhat's new in the .NET 9 libraries.
The .NET 9 SDK introducesworkload sets, where all of your workloads stay at a single, specific version until explicitly updated. For tools, a new option fordotnet tool install
lets users (instead of tool authors) decide whether a tool is allowed to run on a newer .NET runtime version than the version the tool targets. In addition:
dotnet workload history
command shows you the history of workload installations and modifications for the current .NET SDK installation.For more information, seeWhat's new in the SDK for .NET 9.
.NET 9 introduces a unified layer of C# abstractions through theMicrosoft.Extensions.AI andMicrosoft.Extensions.VectorData packages. These abstractions facilitate interaction with AI services, including small and large language models (SLMs and LLMs), embeddings, vector stores, and middleware.
.NET 9 also includes new tensor types that expand AI capabilities.TensorPrimitives and the newTensor<T> type expand AI capabilities by enabling efficient encoding, manipulation, and computation of multi-dimensional data. You can find these types in the latest release of theSystem.Numerics.Tensors package.
Math
,MathF
, andINumber<T>
but for spans of values.T
that implements a certain interface, expanding beyond just spans of float values in .NET.TensorPrimitives
for efficient math operations.ML.NET is an open-source, cross-platform framework that enables integration of custom machine-learning models into .NET applications.
ML.NET 4.0 brings the following improvements:
MLContext
options.Stream
.For more information, seeWhat's new in ML.NET.
TheMicrosoft.ML.Tokenizers library provides .NET developers with capabilities for encoding and decoding text to tokens. For AI scenarios, this is important to manage context, calculate cost, and preprocess text when working with local models.
The latest release introduces significant new capabilities for tokenizers:
.NET Aspire is a set of powerful tools, templates, and packages for building observable, production ready apps. .NET Aspire's latest release includes improvements to the dashboard and resource lifecycle management. It also adds new integrations and APIs for more flexibility during development. .NET Aspire 9 works with both .NET 9 and .NET 8 apps. For more information, seeWhat's new in .NET Aspire 9.
ASP.NET Core apps built with .NET 9 are secure by default, have expanded support for ahead-of-time compilation, and have improved monitoring and tracing. With the performance improvements, you'll see higher throughput and faster startup time, and all with less memory usage. ASP.NET Core in .NET 9 includes:
Microsoft.AspNetCore.OpenAPI
, enhanced native AOT support.These are just some of the features and enhancements in .NET 9. For more information, seeWhat's new in ASP.NET Core 9.0.
The focus of .NET Multi-platform App UI (.NET MAUI) in .NET 9 is enhanced performance and reliability, and deeper integrations for desktop and mobile applications. .NET MAUI includes a new, more performant implementation ofCollectionView andCarouselView for iOS and Mac Catalyst, updates to existing controls, new app lifecycle events, and Native AOT and trimming enhancements to improve app size and startup time. In addition:
For more information about that these new features and more, seeWhat's new in .NET MAUI for .NET 9.
Entity Framework Core includes significant updates to the database provider for Azure Cosmos DB for NoSQL. It also includes some steps towards AOT compilation and pre-compiled queries, among other improvements. For more information, seeWhat's New in EF Core 9.
C# 13 ships with the .NET 9 SDK and includes the following new features:
params
collectionslock
type and semantics\e
ref
locals andunsafe
contexts in iterators and async methodsref struct
types to implement interfacespartial
types.In addition, C# 13 adds a preview feature:field
backed properties.
For more information, seeWhat's new in C# 13.
F# 9 ships with the .NET 9 SDK and includes the following new features:
For more information, seeWhat's new in F# 9.
WPF in .NET 9 bring enhanced support for building modern apps with several theming enhancements and more:
BinaryFormatter
is no longer supported.For more information, seeWhat's new in WPF for .NET 9.
WinForms in .NET 9 brings support for new themes, enhancements for asynchronous development, and more:
Form
andTaskDialog
supportShowDialogAsync
now. (Experimental feature)BinaryFormatter
is no longer supported.FolderBrowserDialog
andToolStrip
had some minor improvements.ReadOnlySpan
, and better interop code generation.For more information, seeWhat's new in Windows Forms for .NET 9.
Was this page helpful?
Was this page helpful?