.NET 10 is a long-term support (LTS) release, supported for three years, which makes it the natural next target for teams still on .NET 8 or .NET 9. ASP.NET Core 10 ships with it. This guide covers the changes most likely to affect day-to-day work and shows how to try them.
Upgrading the target framework
Install the .NET 10 SDK, then change the target framework in your project file:
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFramework>net10.0</TargetFramework>
</PropertyGroup>
</Project>Update the Microsoft.* packages you reference to their 10.x versions and read the official breaking changes list before deploying.
Built-in validation for Minimal APIs
Minimal APIs can now validate query, header and body parameters automatically. Register the validation services, and put standard DataAnnotations attributes on your models:
using System.ComponentModel.DataAnnotations;
var builder = WebApplication.CreateBuilder(args);
builder.Services.AddValidation();
var app = builder.Build();
app.MapPost("/products", (Product product) => Results.Created($"/products/{product.Name}", product));
app.Run();
public record Product(
[Required, StringLength(80)] string Name,
[Range(0.01, 100000)] decimal Price);When validation fails, the endpoint returns a 400 response without running your handler, so you no longer need to hand-write that check in every endpoint.
OpenAPI 3.1 support
ASP.NET Core can now generate OpenAPI 3.1 documents. Despite the small version bump, 3.1 is a significant update, notably because it fully supports JSON Schema draft 2020-12. If you consume your OpenAPI document in client generators or gateways, check that those tools handle 3.1 before upgrading.
builder.Services.AddOpenApi();
// ...
app.MapOpenApi();Blazor improvements
Blazor script as a static web asset. The framework script is now served with automatic compression and fingerprinting instead of as an embedded resource, which helps caching.
Reconnection UI. Project templates include a
ReconnectModalcomponent, and there is a new "retrying" state you can style and handle.QuickGrid. A new
RowClassparameter lets you style rows conditionally, andHideColumnOptionsAsynccloses the column options UI from code.
<QuickGrid Items="items" RowClass="GetRowCssClass">
<PropertyColumn Property="i => i.Name" />
</QuickGrid>
@code {
private string? GetRowCssClass(Item item) => item.IsArchived ? "row-archived" : null;
}Passkeys and authentication
ASP.NET Core Identity gains passkey (WebAuthn) support, and the release adds new authentication and authorization metrics. Passkeys are phishing-resistant, so they are worth evaluating for any app that currently relies on passwords alone.
C# 14 and the SDK
C# 14 ships with .NET 10. Two changes you will notice quickly:
// The field keyword: add logic to an auto-property without a manual backing field
public string Name
{
get;
set => field = value.Trim();
}User-defined compound assignment operators (+=, -= and similar) are also supported. On the tooling side, file-based apps let you run a single C# file without a project file:
dotnet run hello.csEF Core 10: LeftJoin and RightJoin
EF Core 10 adds LeftJoin and RightJoin LINQ operators, replacing the awkward GroupJoin/SelectMany/DefaultIfEmpty pattern for outer joins.
Migration checklist for .NET 8 or .NET 9 apps
- Install the .NET 10 SDK on your build agents and developer machines, and update any
global.jsonthat pins an older SDK. - Change
TargetFrameworktonet10.0and update Microsoft.* package references to 10.x. - Build with warnings visible and fix new analyzer warnings.
- Read the breaking changes list for ASP.NET Core, EF Core and the runtime, and search your code for the APIs mentioned.
- Update your container base images to the .NET 10 tags and rebuild.
- Run the full test suite, then deploy to a staging environment and watch logs and metrics.
- Adopt new features gradually: start with validation and OpenAPI, then evaluate passkeys.
For the pipeline side of the upgrade, see our GitHub Actions workflow for .NET, and for query changes that come with EF Core upgrades, read about database indexing.
Should you upgrade?
If you run .NET 8 (LTS), moving to .NET 10 gives you another three years of support plus the performance work in the runtime. If you are on .NET 9, which is a standard-term release, moving to the LTS gives you a longer support window. Upgrade a non-critical service first, run your test suite, and review the breaking changes list.