Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Which version of Entity Framework is used by my project?

I have a project using Entity Framework, but I am not sure which version of EF I am using. According to the Microsoft version history EF5 will install itself:

If you create a new model using the Entity Framework Designer in Visual Studio 2012, the EF5 NuGet package will be installed to your project and the generated code will make use of EF5.

However I did not create the EF-part of the project, but got it from version control (TFS). Now I am not sure how to determine if I have EF5.

If I right-click on the References folder of the project and select Manage NuGet Packages, it show EF5 with an Uninstall-button, implying I have EF5.

But the system.data.entity in the References folder has a Runtime Version v4.0.30319 and Version 4.0.0.0 in the Properties explorer, which would imply EF 4 (according to Determine version of Entity Framework I am using?).

I do have this in my app.config:

<section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />

And this in my web.config:

<configSections>
  <section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
</configSections>
<!--...-->
  <dependentAssembly>
    <assemblyIdentity name="EntityFramework" publicKeyToken="b77a5c561934e089" culture="neutral" />
    <bindingRedirect oldVersion="0.0.0.0-5.0.0.0" newVersion="5.0.0.0" />
  </dependentAssembly>
<!--...-->
  <entityFramework>
    <defaultConnectionFactory type="System.Data.Entity.Infrastructure.SqlConnectionFactory, EntityFramework" />
  </entityFramework>

Can anybody clarify this?

like image 545
Yahoo Serious Avatar asked Apr 04 '13 16:04

Yahoo Serious


People also ask

How do I know what EF version My project is?

Popular Answer. Another way to get the EF version you are using is to open the Package Manager Console (PMC) in Visual Studio and type Get-Package at the prompt. The first line with be for EntityFramework and list the version the project has installed.

Which is an Entity Framework version?

Entity Framework 6.0, 6.1, 6.2, 6.3, and 6.4 At this time the latest version is 6.4. 4. This version can always be found on NuGet. Versions 6.0, 6.1, 6.2, and 6.3 are no longer supported.

What is difference between Entity Framework 5 and 6?

EF5 is built into the core of . NET 4.5, whereas EF6 has been shifted out, and is open source. This means that you must add the new EF6 assemblies to all of the relevant projects in the solution, in particular the entry project. This means that you must remove assembly System.

What is the latest version of Entity Framework?

The most recent Entity Framework Core 6.0 (EF Core 6) was released on 10 November 2021.


1 Answers

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

like image 88
Carlos Corral Carvajal Avatar answered Oct 05 '22 00:10

Carlos Corral Carvajal