2014-04-25 5 views
1

EntityFramework.HierarchyId Nuget 패키지를 사용하여 EF 6의 HierarchyId 데이터 형식에 대한 지원을 추가하려고 할 때마다 패키지를 추가하고 프로젝트를 빌드 할 때마다 문제가 발생합니다. 다음과 같은 오류 : 나는 패키지를 제거하고 문제가 사라진 EF 6.1을 다시 설치하는 경우EntityFramework.HierarchyId의 문제점

Error 3 The type 'System.Data.Entity.DbContext' is defined in an assembly that is not referenced. You must add a reference to assembly 'EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'.


. 나는 오류의 말씀에 버전을 변경하는 경우

<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> 

답변

2

나는 당신의 문제를 생각

내가 내 Web.config 파일에있는 것입니다 는 'EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'이라는 참조를 추가하기 때문에 EF.HiearachyIdMicrosoft.Aspnet.Identity.EntityFramework 사이의 충돌입니다. 문제는 here에서 찾을 수 있습니다. 그것을 고칠 수 있습니다 :

  1. Microsoft.Aspnet.Identity.EntityFramework.dll을 반사시키고 코드를 얻으십시오.
  2. 새 프로젝트를 만들고 복사 한 코드를 붙여 넣습니다.
  3. 참조 번호 Microsoft.Aspnet.Identity.EntityFramework을 새 프로젝트로 바꿉니다.

문제가 해결 될 것이라고 생각합니다.