创建迁移和更新数据库时出错

问题描述 投票:0回答:1

为了自定义身份,我需要将上下文继承从

DbContext
更改为
IdentityDbContext
,并向
IdentityUser
添加一些属性,我创建了两个类
ApplicationUser : IdentityUser
ApplicationRole : IdentityRole
并修复了
IdentityDbContext<ApplicationUser,ApplicationRole>
,但是当我执行时添加迁移命令,我收到此错误:

enter image description here

database asp.net-core .net-core asp.net-core-identity
1个回答
0
投票

从错误图像中我们可以看到Entity Framework Tools早于运行时8.0.0,请将工具更新为最新版本。

尝试将您的软件包更新到最新版本或8.0.0+,例如

Microsoft.EntityFrameworkCore.Tools

© www.soinside.com 2019 - 2024. All rights reserved.