c# - Identifying the version of Entity Framework -
one of our development machines giving error saying dbcontext not implement idisposable. according similar post, because not referencing ef 5. problem assembly has *.edmx file built older ef 4 constructs (objectcontext). same assembly has newly added *.edmx file newer constructs (dbcontext).
a different project on different machine uses dbcontext , works fine. said project shows following information entityframework.dll:
version: 4.4.0.0 runtime version: v4.0.30319 i checked bad build machine , has same version of entityframework.dll.
microsoft has had confusing conflicts between development , marketing version naming conventions. ef 5 mean dll version should 5.0?
in other words, running v4.0 on build machine? if why build successful?
the entity framework v5.0 dll dependent on .net clr targeting. if project set use .net 4.0 framework, runtime version of entityframework.dll 4.4.0.0.
if using entity framework clr target of .net 4.5, version of entityframework.dll 5.0.
when add entityframework via nuget, @ project's clr target runtime , add appropriate entityframework.dll reference. if later change target, should uninstall , reinstall entityframework reference via nuget make sure correct version of runtime referenced project.
reference post julie lerman topic.
Comments
Post a Comment