[Debuging Note]
[.NET EntityFramework] Could not find the conceptual model type
네코냥이
2013. 6. 16. 10:58
- Stacktrace : at System.Data.Metadata.Edm.MetadataWorkspace.GetEdmSpaceType(StructuralType objectSpaceType)
- at System.Data.Entity.Internal.InternalContext.UpdateEntitySetMappings()
- at System.Data.Entity.Internal.InternalContext.TryUpdateEntitySetMappingsForType(Type entityType)
- at System.Data.Entity.Internal.InternalContext.GetEntitySetAndBaseTypeForType(Type entityType)
- at System.Data.Entity.Internal.Linq.InternalSet`1.Initialize()
- at System.Data.Entity.Internal.Linq.InternalSet`1.get_InternalContext()
Solution found. It appears in some cases (randomly) there is a mix up in the code generated by the entity framework. This is apparently a known bug and a fix should be coming in future releases. In the mean time the way around this is to move the efm to a separate class within the solution.
+ 일반적 답변
Entity Framework 빌드 과정에서 edmx 파일을 참조하더라.
edmx 파일을 지우거나 다른 프로젝트로 분리해라.
+ @
edmx 파일을 지우거나 옮겼는데도, 이러한 증상이 계속된다면,
빌드결과가 나오는 bin 폴더를 초기화해보아라.