> MySQL for Visual Studio 1.1.1
> MysqL Connector / Net 6.8.
错误说:
Your project references the latest version of Entity Framework; however,an Entity Framework database provider compatible with this version could not be found for you data connection. Exit this wizard,install a compatible provider,and rebuild your project before performing this action
我尝试了可能的在线解决方案,例如重新安装此组件,但它不起作用,
否则我试图将这样的代码添加到我的App.config:
<configuration>
<entityFramework>
<defaultConnectionFactory type="MysqL.Data.Entity.MysqLConnectionFactory,MysqL.Data.Entity.EF6" />
<providers>
<provider invariantName="MysqL.Data.MysqLClient" type="MysqL.Data.MysqLClient.MysqLProviderServices,MysqL.Data.Entity.EF6" />
<provider invariantName="System.Data.sqlClient" type="System.Data.Entity.sqlServer.sqlProviderServices,EntityFramework.sqlServer" />
</providers>
</entityFramework>
</configuration>
但它面临相同的命运,或事件清除我的app.config中的所有实体标签.
我还试图安装更高版本的实体,如:
Install-Package EntityFramework -Version 5.0.0
但它得到:安装失败.滚回来…
安装包:已经引用了更新版本的’EntityFramework’.
任何人都可以帮我确定我该怎么办?
解决方法
>安装了最新的MysqL visual studio插件和MysqL连接器网
>删除了App.config或Web.config中的entityFramework标记及其所有子标记.
>用以下代码替换它:
<entityFramework> <defaultConnectionFactory type="MysqL.Data.Entity.MysqLConnectionFactory,MysqL.Data.Entity.EF6" /> <providers> <provider invariantName="MysqL.Data.MysqLClient" type="MysqL.Data.MysqLClient.MysqLProviderServices,MysqL.Data.Entity.EF6" /> <provider invariantName="System.Data.sqlClient" type="System.Data.Entity.sqlServer.sqlProviderServices,EntityFramework.sqlServer" /> </providers> </entityFramework>