<system.data> <DbProviderFactories> <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.9.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d"/> </DbProviderFactories> </system.data>
在C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\CONFIG中machine.config(xml文件)中有一個字段是<DbProviderFactories> 加入以上配置。
親測在machine.config 配置完,項目能夠正常跑起來。html
come:https://www.cnblogs.com/yaphetsfang/p/9372512.htmlweb