Unable to generate an explicit migration in entity framework

后端 未结 28 1555
情书的邮戳
情书的邮戳 2020-12-12 23:31

I am adding a new migration but this message shows:

Unable to generate an explicit migration because the following explicit migrations are pending:

28条回答
  •  北荒
    北荒 (楼主)
    2020-12-13 00:00

    This error means there are pending migrations need to be commited before you can execute another explicit migration. You can choose to

    1. Execute those pending migrations using Update-Database command
    2. Delete those pending migrations. Safest way is open Migrations folder, right click on [201203170856167_left] > Exclude from project

    After this one you can start "Add-Migration ..." again

    Hope it helps

提交回复
热议问题