I am adding a new migration but this message shows:
Unable to generate an explicit migration because the following explicit migrations are pending:
Old post but might help someone.
For me it happened because I renamed Assembly name and Default namespace of the project.
So I had to update ContextKey in _MigrationHisotry table to the new value of Assembly name or Default namespace. Honestly I don't know which one should be used, because for me both are same!