ADO.NET Entity framework 连接MySql 提示The specified store provider cannot be found in the configuration
来源:互联网 发布:封装js插件 编辑:程序博客网 时间:2024/05/29 02:03
本机安装了 MySql Connector/Net 6.9.6
http://dev.mysql.com/downloads/connector/net/
使用ADO.NET Entity framework操作MySql数据库,没问题,但是复制到其他主机上运行则提示The specified store provider cannot be found in the configuration...
查找资料,发现在项目里的App.Config添加一下代码得以解决(如下代码),其中<remove invariant="MySql.Data.MySqlClient"/>是为了在已安装了MySql Connector/Net的主机上运行不报错,同时注意修改Version
<system.data> <DbProviderFactories> <remove invariant="MySql.Data.MySqlClient"/> <add name="MySQL Data Provider" invariant="MySql.Data.MySqlClient" description=".Net Framework Data Provider for MySQL" type="MySql.Data.MySqlClient.MySqlClientFactory, MySql.Data, Version=6.9.4.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d" /> </DbProviderFactories> </system.data>
在安装好的MySql Connector/Net目录下复制你项目使用的.Net Framework版本对应的DLL,如下图
拷贝MySql.Data.dll、MySql.Data.Entity.dll、MySql.Web.dll到你项目的Bin目录下,到此,打包时附带上这三个Dll,其他电脑在运行你的软件时,无需再额外安装MySql Connector/Net。
0 0
- ADO.NET Entity framework 连接MySql 提示The specified store provider cannot be found in the configuration
- No Entity Framework provider found for the ADO.NET provider with invariant name 'System.Data.SqlClie
- error 0152: No Entity Framework provider found for the ADO.NET provider with invariant name 'System.
- error 0152: No Entity Framework provider found for the ADO.NET provider with invariant name 'System.
- The configuration section for Logging cannot be found in the configuration source
- The specified named connection is either not found in the configuration, not intended to be used
- The ADO.NET Entity Framework Overview
- JQuery 错误提示:HierarchyRequestError: Node cannot be inserted at the specified point in the hierarchy
- 提示No configuration found for the specified action:'/addAdmin.jsp' in namespace
- Action ***cannot be found in the namespace
- action cannot be found in the namespace/
- No configuration found for the specified action: ''in namespace: '/'
- No configuration found for the specified action: '/' in namespace
- No configuration found for the specified action: 'user' in namespace: ''
- yii提示The table "xxx" for active record class "DistAR" cannot be found in the database
- ADO.NET Entity Framework: The version of SQL Server in use does not support datatype 'datetime2'
- Mysql ADO.NET Entity Framework
- Professional ADO.NET 3.5 with LINQ and the Entity Framework
- 2015年大一下第6周项目3-分数类中的运算符重载(2)分数与整数的加减乘除
- 多线程中的lock,Monitor.Wait和Monitor.Pulse
- 数组中出现次数超过一半的数字
- iOS一种简单的改变一个label上范围内字体颜色和大小的方法
- iOS 开发中渐变色的使用
- ADO.NET Entity framework 连接MySql 提示The specified store provider cannot be found in the configuration
- java中的多线程终结
- UNP第三章总结。
- File Exception Handler
- abap金税上传EXCEL版
- Python正则表达式集锦
- 更新Xcode插件不能用
- IAR编译器中报这样错误的解决办法。
- php实现日历超清晰代码