This upgrade guide covers upgrading from Duende IdentityServer v5.2 to v6.0-preview-1 (release notes). The most significant aspect of this upgrade is that Duende IdentityServer v6.0 targets .NET 6. Other than that, much like our prior updates, there’s not much to do!
In your IdentityServer host project, update the version of the .NET framework. For example in your project file:
would change to:
Also, any other NuGets that you were previously using that targeted an older version of .NET should be updated. For example, Microsoft.EntityFrameworkCore.SqlServer or Microsoft.AspNetCore.Authentication.Google. Depending on what your application was using, there may or may not be code changes based on those updated NuGet packages.
In your IdentityServer host project, update the version of the Duende IdentityServer NuGet. For example in your project file:
<PackageReference Include="Duende.IdentityServer" Version="5.2.0" />
would change to:
<PackageReference Include="Duende.IdentityServer" Version="6.0.0-preview.1" />
If you are using a database for your configuration data, then there is a small database schema update. This includes:
If you are using the Duende.IdentityServer.EntityFramework package as the implementation for the database and you’re using EntityFramework Core migrations as the mechanism for managing those schema changes over time, the commands below will update those migrations with the new changes. Note that you might need to adjust based on your specific organization of the migration files.
dotnet ef migrations add Update_DuendeIdentityServer_v6_0 -c ConfigurationDbContext -o Data/Migrations/IdentityServer/ConfigurationDb
Then to apply those changes to your database:
dotnet ef database update -c ConfigurationDbContext
That’s it. Of course, at this point you can and should test that your IdentityServer is updated and working properly.