7.0 SQL版 无法迁移数据库

PM> Add-Migration iniDatabase

Build started...

Build succeeded.

Your target project 'DTcms.Core.Web' doesn't match your migrations assembly 'DTcms.Core.DBFactory'. Either change your target project or change your migrations assembly.

Change your migrations assembly by using DbContextOptionsBuilder. E.g. options.UseSqlServer(connection, b => b.MigrationsAssembly("DTcms.Core.Web")). By default, the migrations assembly is the assembly containing the DbContext.

Change your target project to the migrations project by using the Package Manager Console's Default project drop-down list, or by executing "dotnet ef" from the directory containing the migrations project.

迁移数据库时提示以上错误信息  要怎么处理

请先 登录 后评论

1 个回答

wdn

启动项修改为DTcms.Core.API



请先 登录 后评论
  • 1 关注
  • 0 收藏,1805 浏览
  • chen 提出于 2023-03-10 14:32

相似问题