' System.TypeLoadException:无法加载类型' System.Data.Entity.Core.Mapping.EntityContainerMapping'来自assembly' EntityFramework

时间:2014-07-06 00:02:41

标签: .net

我的VS 2012安装在使用一个月后停止工作。

我有一个应用程序,我使用Database First,Entity Framework。当数据库发生变化时,我只需使用ADO Entity framework Wizard来更新db classec(edmx文件)。

两天前,我收到了这个错误。我找不到任何解决方案。我尝试修复i vs 2012.我在网上搜索,但是找不到任何东西。

然后我卸载VS 2012并安装vs 2013 - 同样的错误。我也安装/卸载了最新版本的EFtools几次 - 但仍然是同样的错误。我正在运行Windows 7.我不知道这是什么。

那里有什么好主意吗?

以下是完整的错误消息:

Unable to generate the model because of the following exception:
   'System.TypeLoadException: Could not load type 'System.Data.Entity.Core.Mapping.EntityContainerMapping' from assembly 'EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'.
   at Microsoft.Data.Entity.Design.VersioningFacade.ReverseEngineerDb.DbDatabaseMappingBuilder.Build(SimpleMappingContext mappingContext)
   at Microsoft.Data.Entity.Design.VisualStudio.ModelWizard.Engine.ModelGenerator.GenerateModel(List`1 errors)
   at Microsoft.Data.Entity.Design.VisualStudio.ModelWizard.Engine.ModelBuilderEngine.GenerateModels(String storeModelNamespace, ModelBuilderSettings settings, List`1 errors)
   at Microsoft.Data.Entity.Design.VisualStudio.ModelWizard.Engine.ModelBuilderEngine.GenerateModel(ModelBuilderSettings settings, ModelBuilderEngineHostContext hostContext)'.

1 个答案:

答案 0 :(得分:0)

卸载实体框架工具6.1.1因为它有错误! 使用实体框架工具6.0.2