I’m having difficulty implementing EFCodeFirst.CreateTablesOnly (changed to DontDropDbJustCreateTablesIfModelChangedStart).
I have successfully pulled in the package using NUGET. Now there is a mention of
in packages.config
and a DontDropDbJustCreateTablesIfModelChangedStart.cs
I’ve added Devtalk.EF.CodeFirst to references
in my app_start directory.
But I still can’t make use of the DontDropDbJustCreateTablesIfModelChangedStart class. When I do, the app dies with msg
Could not load file or assembly ‘EntityFramework, Version=4.1.0.0,
Culture=neutral, PublicKeyToken=b77a5c561934e089’ or one of its
dependencies. The located assembly’s manifest definition does not
match the assembly reference. (Exception from HRESULT: 0x80131040)
When I check definition of DontDropDbJustCreateTablesIfModelChangedStart, I find it only has a signature and not a definition.
What did I do wrong? Or what step did I leave out? Am I supposed to Implement the Class/Method?
The problem is that library was probably compiled with EntityFramework.dll version 4.1.0.0 and author didn’t update it for version 4.2.0.0 and 4.3.0.0. Try to redirect version 4.1.0.0 to version 4.3.0.0 in your web.config file.