using System;
using Microsoft.AspNetCore.Identity;
namespace SC.BL.Domain
{
// Add profile data for application users by adding properties to the WebApp1User class
public class WebApp1User : IdentityUser
{
public string OwnerID { get; set; }
[PersonalData]
public string Name { get; set; }
[PersonalData]
public DateTime DOB { get; set; }
public UserStatus UserStatus { get; set; }
}
public enum UserStatus
{
Submitted,
Approved,
Rejected
}
}
它在参考文献中找不到Aspnetcore:使用Microsoft.aspnetcore.Identity有关更多详细信息,请参见图像
将以下PackageReference
添加到YourProject.csproj
文件并进行重建。问题应该消失,因为此META软件包包含ASP.NET Core MVC,Entity Framework Core和ASP.NET核心身份的所有必要软件包,用于 asp.net core< = 2.2
<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.App"/>
.......
</ItemGroup>