0
votes

Even though I have set AutomaticMigrationsEnabled = true;

I still get this error

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.

You can use the Add-Migration command to write the pending model changes to a code-based migration.

I tried Add-Migration followed by Update-Database, but still got this error. How is this possible?

1

1 Answers

0
votes

The problem I had here was that the database class library dll was not being copied into the main project.