Visual Studio 2015 and Entity Framework Migrations not working

c# entity-framework entity-framework-6 visual-studio visual-studio-2015

Question

We are using Visual Studio 2015 Update 1 and Entity Framework 6.1.3. Also we are following the Code-First approach and are using Entity Framework Migrations to respond to schema changes. Since updating to Visual Studio 2015, some fellow developers can not add any Entity Framework Migrations. When executing 'Add-Migration', Entity Framework does not find any migrations in the project and asks you to turn on migrations.

Anyone experienced a similar issue and knows a solutions? Many thanks in advance!

1
0
2/3/2016 10:05:44 AM

Popular Answer

We were able to determine the root cause and fix the issues.

Issues:

  • Avoid having more than one classes derived from DbContext in an assembly
  • We used the Nu-Get package EntityFrameworkWithHierarchyId, which is not just an extension, but a fork of the Entity Framework. When we replaced all dependencies to EntityFramework by EntityFrameworkWithHierarchyId, the issue disappeared. It properly occured by different install routines in the provided PowerShell Scripts and the different Assemlblies
1
2/23/2016 10:31:31 AM


Related Questions





Related

Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow
Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow