获取错误 - EdmItemCollection的版本必须与StoreItemCollection的版本匹配

时间:2015-11-30 10:19:17

标签: c# entity-framework visual-studio-2012 .net-3.5 .net-4.5

我使用Visual Studio 2010和.Net framework 3.5创建了EDM模型。 现在我已经使用.Net framework 4.5将我的项目升级到Visual Studio 2012。我的项目编译成功,但我在运行时遇到以下错误。

System.Data.MappingException : Schema specified is not valid. Errors: 
error 2102: The version of EdmItemCollection must match the version of StoreItemCollection.

请帮忙。

1 个答案:

答案 0 :(得分:0)

请检查EDMX xml中的<edmx:Edmx>标记。在我的情况下,SSDL和MSL文件在迁移后显示不同的版本。我重新生成了MSL,SSDL和CSDL文件,问题解决了。