最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

c# - Using the same DbCompiledModel to create contexts..." with Entity Framework - Stack Overflow

programmeradmin1浏览0评论

I have a C# project running from about 8 years without problems. Using 4.8 c# entity framework 6 MySql and SqLite.

This year I would like to upgrade mysql db drivers from version 8 to 9.

After this upgrade, running the project inside visual studio I have no problem.

Building the setup and install to a brand new computer with windows 11, I have this exception:

Using the same DbCompiledModel to create contexts against different types of database servers is not supported.

Wasting some days to understand this problem without success. Read some old posts on this argument but nothing helped me.

<connectionStrings>
    <add name="LumenEntities" providerName="MySql.Data.MySqlClient" connectionString="server=localhost;port=3306;database=lumen;uid=root;pwd=root" />
</connectionStrings>

<entityFramework>
    <providers>
      <provider invariantName="MySql.Data.MySqlClient" type="MySql.Data.MySqlClient.MySqlProviderServices, MySql.Data.EntityFramework, Version=9.1.0.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d" />  
    </providers>
</entityFramework>

If I can't find a solution I think to downgrade to version 8 of the driver. Any help is apreciated.

发布评论

评论列表(0)

  1. 暂无评论