aspnetcore/migration/90-to-100.md
This article explains how to update an ASP.NET Core in .NET 9 to ASP.NET Core in .NET 10.
global.jsonIf you rely on a global.json file to target a specific .NET SDK version, update the version property to the .NET 10 SDK version that's installed. For example:
{
"sdk": {
- "version": "9.0.304"
+ "version": "10.0.100"
}
}
Update the project file's Target Framework Moniker (TFM) to net10.0:
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
- <TargetFramework>net9.0</TargetFramework>
+ <TargetFramework>net10.0</TargetFramework>
</PropertyGroup>
</Project>
In the project file, update each Microsoft.AspNetCore.*, Microsoft.EntityFrameworkCore.*, Microsoft.Extensions.*, and System.Net.Http.Json package reference's Version attribute to 10.0.0 or later. For example:
<ItemGroup>
- <PackageReference Include="Microsoft.AspNetCore.JsonPatch" Version="9.0.0" />
- <PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="9.0.0" />
- <PackageReference Include="Microsoft.Extensions.Caching.Abstractions" Version="9.0.0" />
- <PackageReference Include="System.Net.Http.Json" Version="9.0.0" />
+ <PackageReference Include="Microsoft.AspNetCore.JsonPatch" Version="10.0.0" />
+ <PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="10.0.0" />
+ <PackageReference Include="Microsoft.Extensions.Caching.Abstractions" Version="10.0.0" />
+ <PackageReference Include="System.Net.Http.Json" Version="10.0.0" />
</ItemGroup>
Use the articles in Breaking changes in .NET to find breaking changes that might apply when upgrading an app to a newer version of .NET.