I am adding a new migration but this message shows:
Unable to generate an explicit migration because the following explicit migrations are pending:
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.