Sorry to post such a general question, but this could have multiple answers for multiple situations (and I may have to recreate the db before I can get an answer), so here goes:
We have a C# project using EF6 which has been utilizing EF Migrations successfully for months. This morning, when I try to run my project, I get this this all-too-familiar error:
System.Data.Entity.Migrations.Infrastructure.AutomaticMigrationsDisabledException' occurred in EntityFramework.dll but was not handled in user code
Additional information: Unable to update database to match the current model because there are pending changes and automatic migration is disabled. Either write the pending model changes to a code-based migration or enable automatic migration. Set DbMigrationsConfiguration.AutomaticMigrationsEnabled to true to enable automatic migration.
Except that I can find no evidence of anything having changed.
- The database's __MigrationHistory table matches the Migrations in the project.
- If I do a "add-migration", it comes up with empty Up & Down methods.
- We restored a database from a few nights ago (when we know it worked) to a temp DB and did a compare, and no structural changes were found.
- I even tried running "update-database" on the empty migration, which worked, but the error still occurs.
Any ideas on how this scenario can occur?