Unable to generate an explicit migration in entity framework

后端 未结 28 1450
情书的邮戳
情书的邮戳 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:02

    Historically I always solved this by deleting the pending migrations, or if there was only 1 remaining and it was mostly desirable, by using -f to recreate it.

    Recently, this has stopped working for me.

    When this happened the first time, I restarted Visual Studio, and then it let me proceed.

    The second time, it only worked after I ran a Clean on the project. It was almost as if the pending migrations were retained despite deleting all the files from explorer.

提交回复
热议问题