Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

visual studio 2010 and entity framework 5.0, can I use it?

Well, really I wanted to update the 4.1 version of entity framework, so in tools-->library package manager-->package manager I use this command:

Install-Package EntityFramework

Then the update started. I saw a message saying that the version 5 is installed. I my project folder I can see two foloders, one with the net4 lib and other with the net5 library.

However, in my references in the project, the 4.1 was replaced with the 4.4, not with the 5.0 version, so I would like to know if I can use the 5.0 version or only the 4.4 version. If I only can use the 4.4 version, why is installed the 5.0 version? I know that the 5.0 version is installed because if I try to install again entity framework through the package manager, I get the following message:

"'EntityFramework 5.0.0' already installed."

Thanks.

like image 960
Álvaro García Avatar asked Dec 21 '22 14:12

Álvaro García


1 Answers

Entity framework will reference 4.4 when you're targeting .NET 4.0

See this blog.

The 4.4 comes from the assembly version of EntityFramework.dll when you install EntityFramework 5.0 into a project that targets .NET Framework 4.0. This is merely a side effect of how the runtime loads and binds to assemblies, and in no way reflects the version of the product.

like image 169
Mark Oreta Avatar answered Feb 11 '23 04:02

Mark Oreta