Which version of Entity Framework is used by my project?

我与影子孤独终老i 提交于 2019-12-05 04:25:09
Carlos Corral Carvajal

Maybe your proyect is based in .NET 4.0, in this case you have an EF5 version without .NET 4.5 features:

EntityFramework 5 use dll version 4.4.0.instead 5.0

Yahoo Serious

According to this answer to Entity Framework 5 not installing correctly?, one should only look at EntityFramework.dll, which in my case shows Runtime version v4.0.30319 but Version 5.0.0.0. (So I do have EF 5.)

Go to packages.config file of your project.

  <package id="EntityFramework" version="6.1.3" targetFramework="net45" />

I have the same version number on System.Data.Entity. This comes from the .Net framework, not the Entity Framework installation. You can see which parts of your app are using it by right-clicking the reference and select Find Code Dependent on Module. There's generally not a lot unless the code is accessing metadata, mostly state enums and attribute defn's. Next version will bring all of this into the EntityFramework.dll - see EFv6

BTW, looking at the folder in properties of System.Data.Entity, v4.0.30319 is in .NETFramework\v4.5

The easiest way to get this kind of information is to install Microsoft ASP.NET MVC Diagnostics 5.2.3

This just produces a webpage for your project with all the pertinent information. For example, you could just search for "Entity" on that page and see the version information right away.

Here is an article showing one use of this diagnostic tool.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!