如何解决ProviderManifestToken =“8.3.7”和 Npgsql ProviderManifestToken="8.1.3"冲突?

发布于 2024-09-02 05:24:11 字数 473 浏览 1 评论 0 原文

我正在尝试使用实体框架连接到我的 PostgreSQL 数据库。不幸的是,在我的 SSDL 文件中使用 EdmGen(或 EdmGen2)生成模型后,ProviderManifestToken 设置为 8.3.7,而在当前版本的 Npgsql (2.0.9) 中,它设置为 8.1.3。当我尝试使用我的实体模型时,这给了我以下异常:

System.Data.MetadataException:架构 指定无效。错误: Npgsql.NpgsqlSchema.ssdl(2,52):错误 0169:所有 SSDL 工件都必须瞄准 同一个提供商。这 ProviderManifestToken“8.1.3”是 与“8.3.7”不同的是 之前遇到过。

有什么想法如何修复它或使用 ProviderManifestToken eq 8.1.3 生成模型吗?

请不要建议商业数据库连接器,我的预算不允许:P

I'm trying to connect to my PostgreSQL database using Entity Framework. Unfortunately after generating a model using EdmGen (or EdmGen2) in my SSDL file ProviderManifestToken is set to 8.3.7 when in the current version of Npgsql (2.0.9) it is set to 8.1.3. This gives me fallowing exception when trying to use my entity model:

System.Data.MetadataException: Schema
specified is not valid. Errors:
Npgsql.NpgsqlSchema.ssdl(2,52) : error
0169: All SSDL artifacts must target
the same provider. The
ProviderManifestToken '8.1.3' is
different from '8.3.7' that was
encountered earlier.

Any ideas how to fix it or generate a model with ProviderManifestToken eq 8.1.3?

Please don't suggest commercial database connectors my budget won't allow it :P

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

寂寞美少年 2024-09-09 05:24:11
  • 在文本编辑器中打开 edmx 文件。
  • 查找 ProviderManifestToken 的属性
    Edmx/Runtime/StorageModels/Schema 元素。
  • 如果设置为 8.1.3,请将其更改为 8.3.7,然后重新编译所有内容。
  • Open your edmx file in a text editor.
  • Look for the ProviderManifestToken attribute of the
    Edmx/Runtime/StorageModels/Schema element.
  • If it is set to 8.1.3, change it to 8.3.7 and then recompile everything.
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文