There's some confusion between EntityFramework.dll and System.Data.Entity.dll.

.net ef-code-first entity-framework

Question

I'm curious as to what System.Data.Entity.dll and EntityFramework.dll have in common and what makes them unique. To use the code first model, my project uses System.Data.Entity.dll (June CTP), and everything is OK.

Now that I want to utilize the Code First Migrations tool, I also need to add EntityFramework.dll to my project since it is needed. However, I often see compiler warnings asserting that certain classes are specified in both libraries when both libraries (EntityFramework.dll and System.Data.Entity.dll) are accessed.

Although the code does recompile when EntityFramework.dll is removed, I am unable to utilize Migrations. I have compiler warnings stating that certain classes are not found when just EntityFramework.dll is referenced (e.g. Spatial datatype).

What ought I to do in this circumstance? I appreciate it in advance.

1
13
12/6/2011 7:45:02 PM

Accepted Answer

System.Data.Entity.dll version "4.2.0.0" (June CTP 2011) has all of the functionality from EFv4.0 and EFv4.1, including the ObjectContext API and DbContext API as well as additional capabilities. However, this version is likely to be the last for a while to mix these two APIs in a single assembly. This CTP has expired. The updated core functionality will be included in.NET 4.5, while DbContext API will continue to be distributed as a separate NuGet package that includes EntityFramework.dll. Zzz-5-Zzz describes everything.

EntityFramework.dll and EFv4.1 Update 1 are required for code migrations. They specifically state in their installation notes that you cannot use them with June CTP (prerequisites), which means that they are incompatible with June CTP.

16
10/26/2011 8:00:41 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