I am adding a new migration but this message shows:
Unable to generate an explicit migration because the following explicit migrations are pending:
Tip: It's always good to use the -Script
switch for migration commands if you're not sure. It also really helps understand what Update-Database
actually does.
I run the following to update the database, then I get a script I can apply manually (or just run it again without the -Script tag).
For Update-Database
I would run the following :
Update-Database -Script -ConfigurationTypeName Configuration_ASPNETIdentity -ConnectionStringName SQL_AzureLive
Where SQL_AzureLive
is the named connection string in my config.
Then I can verify the SQL looks right, apply it and be done. As many others have said if the connection string is wrong or invalid you'll get this error.