AddEntityFrameworkStores can only be called with a role that derives from IdentityRole in .NET Core 2.0
问题 I have changed a project from the .NET Core 1.1 to 2.0 version, but I'm getting an error from the Identity, when It tries to add the stores: services.AddIdentity<ApplicationUser, IdentityRole<long>>() .AddEntityFrameworkStores<ApplicationDbContext>() .AddDefaultTokenProviders(); The thrown error is: AddEntityFrameworkStores can only be called with a role that derives from IdentityRole These are my classes: public class ApplicationUser : IdentityUser<long> { } public class ApplicationDbContext