Unable to generate an explicit migration in entity framework

It tells you that there is some unprocessed migration in your application and it requires running Update-Database before you can add another migration.


I had the same problem. Apparently entity framework generates this error when it's unable to connect to the database. So make sure that you're able to access it before searching for other problems.


You either need to run "update-database" from the package manager console to push your changes to the database OR you can delete the pending migration file ([201203170856167_left]) from your Migrations folder and then re-run "add-migration" to create a brand new migration based off of your edits.