[英]Which version of Entity Framework is installed in my project?
I just used Nuget to install Entity Framework 4.3.1 in my project. 我只是用Nuget在我的项目中安装Entity Framework 4.3.1。 When I check the references, they say
System.Data.Entity
is version 4.0.0
. 当我检查引用时,他们说
System.Data.Entity
是版本4.0.0
。 Runtime Version is v4.0.30319
. 运行时版本为
v4.0.30319
。
Is this correct for EF version 4.3.1? 这对于EF 4.3.1版是否正确? I assumed it would say
4.3.1
..? 我以为它会说
4.3.1
..?
Also when I check the directory of the referenced dll (in C:\\Program Files..\\.NETFramework\\v4.0\\System.Data.Entity.dll
), the date of the file is 18/03/2010
. 另外,当我检查引用的dll的目录(在
C:\\Program Files..\\.NETFramework\\v4.0\\System.Data.Entity.dll
)中时,文件的日期为18/03/2010
。
According to WikiPedia: 根据WikiPedia:
The version 4.3.1 was released on February 29, 2012
版本4.3.1于2012年2月29日发布
Shouldn't this mean the date of the file should be closer to 2012? 这不是意味着文件的日期应该接近2012年吗?
When I use Nuget Get-Package
it says the version installed is 4.3.1, but I don't want to use Nuget to install EF 4.3.1 on other projects. 当我使用Nuget
Get-Package
它说安装的版本是4.3.1,但是我不想使用Nuget在其他项目上安装EF 4.3.1。
Where is the Entity Framework 4.3.1 dll so I can just add a reference to it in to other projects? Entity Framework 4.3.1 dll在哪里,因此我可以将其引用添加到其他项目中?
Thanks. 谢谢。
When you install Entity Framework in your project, as: 在项目中安装实体框架时,如下所示:
Install-Package EntityFramework -Version 4.3.1
you will end up with a EntityFramework.dll
file that if you open its properties will have the exact version specified in the installing command: 您将得到一个
EntityFramework.dll
文件,如果打开它的属性,它将具有在安装命令中指定的确切版本:
and, if you double click the reference in your project, you will see the same: 并且,如果双击项目中的引用,您将看到相同的内容:
DO NOT make confusion with System.Data.dll
that is the data layer of the .NET Framework where you can find many classes to handle data, like DataRow
and DataTable
part of ADO.NET for example... 不要与
System.Data.dll
混淆,后者是.NET Framework的数据层 ,您可以在其中找到许多类来处理数据,例如ADO.NET的DataRow
和DataTable
部分。
from comment: 来自评论:
After I install 4.3.1, how do I migrate my project to use the new version?
安装4.3.1之后,如何迁移项目以使用新版本?
there are very big differences between the first version and 4.x, you will have some work changing code, but here's what you need to do: 第一个版本和4.x之间有很大的不同,您将需要一些更改代码的工作,但是这是您需要做的:
Version 1 of EF was included in .NET Framework 3.5 SP1 , and was called "ADO.NET Entity Framework" (now it's only Entity Framework ) so there's no separated dll
file. EF的第1版包含在.NET Framework 3.5 SP1中 ,并称为“ ADO.NET实体框架”(现在它是唯一的Entity Framework ),因此没有单独的
dll
文件。
System.Data
to use EntityFramework
System.Data
以使用EntityFramework
In your case, what I would do would be more generic: 在您的情况下,我会做的更通用:
在您的项目中,展开“参考”部分并检查属性应显示实体框架的版本。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.