我正在尝试使用EntityFramework.HierarchyId
Nuget 包添加对HierarchyId
EF 6 内部数据类型的支持,问题是每次添加包并尝试构建项目时,都会出现以下错误:
错误 3 类型“System.Data.Entity.DbContext”在未引用的程序集中定义。您必须添加对程序集“EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089”的引用。
如果我删除软件包并重新安装 EF 6.1,问题就消失了。
这是我的 Web.config 文件中的内容:
<configSections>
<section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=6847f3395fc61b47" requirePermission="false" />
</configSections>
如果我将版本更改为错误所说的,问题仍然存在:
<configSections>
<section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
</configSections>