We have
- Old web project
- New web project
- Class library containing all Entity Framework code
All three projects reference Entity Framework 6.1.3.
The class library is shared by an old web project and a new web project. Both web projects have a file link for the class library. Both of them point to the same place on the disk.
Both web projects are configured to use the same database.
When I run the Old web project in Visual Studio, it works fine.
When I try to start a new web project in Visual Studio, it throws an AutomaticMigrationsDisabledException.
When I temporarily add ClassLibrary.csproj to the solution for a new web project and run
Add-Migration TestMigration -ConfigurationTypeName MyConfiguration -ProjectName ClassLibrary -StartupProjectName NewWebProject -ConnectionStringName MyContext
it aligns the migration with the empty Up () and Down () methods, indicating that it did not find the changes in the end.
What could cause the New Web Project to throw an AutomaticMigrationsDisabledException in these circumstances? How can I further diagnose the problem?
source
share