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

I have a C# project running from about 8 years without problems.Using4.8 c# entity framework 6 MySql

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.

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745257349a4619036.html

相关推荐

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信