Can't inherit from IdentityUser and IdentityRole in ASP.NET Core 2.0

后端 未结 5 1658
野趣味
野趣味 2021-02-13 00:49

I\'m trying to finish updating to .NET Core 2.0 but a couple of errors pop up:

The problem:

I have two classes, ApplicationRole and ApplicationU

5条回答
  •  别跟我提以往
    2021-02-13 01:07

    This happen to me but I was using Asp.net Core with traditional .NET Framework. You need to add the Nuget package Microsoft.Extensions.Identity. That contains the classes IdentityUser and IdentityRole.

    I think the reason you have to add this is when your project isn't using the Microsoft.AspNetCore.All package.

提交回复
热议问题