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

本文关键字:版本 StoreItemCollection 取错误 -EdmItemCollection 获取 | 更新日期: 2023-09-27 18:24:58

我使用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.

请帮忙。

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

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