简体   繁体   English

具有不变名称“MySql.Data.MySqlClient”的 ADO.NET 提供程序未在机器或应用程序配置文件中注册

[英]The ADO.NET provider with invariant name 'MySql.Data.MySqlClient' is either not registred in the machine or application config file

My program is working fine when i do it on my PC, but when anyone else try it open on their PC, it will open the first page but when they click on "login" and program probably need to start working with database they get this error我的程序在我的 PC 上运行时运行良好,但是当其他人尝试在他们的 PC 上打开它时,它会打开第一页,但是当他们单击“登录”并且程序可能需要开始使用数据库时,他们会得到这个错误

在此处输入图像描述

I reinstal connectors, do a PM>Install-Package EntityFramework and trying to check app.config but for me it's look fine.我重新安装连接器,执行 PM>Install-Package EntityFramework 并尝试检查 app.config 但对我来说它看起来不错。 Also i have EntityFramework.SqlServer.dll - copy Local - true which should be right.我也有 EntityFramework.SqlServer.dll - 复制 Local - true 这应该是正确的。

This is my app.config这是我的 app.config


<configuration>
  <configSections>
    <section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
    <!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 -->
  </configSections>
  <startup>
    <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.1" />
  </startup>
  <connectionStrings>
  <add name="Database" connectionString="metadata=res://*/DatabaseModel.csdl|res://*/DatabaseModel.ssdl|res://*/DatabaseModel.msl;provider=MySql.Data.MySqlClient;provider connection string=&quot;server=XXX;user id=XXX;password=XXX;persistsecurityinfo=True;database=XXX;allowuservariables=True&quot;" providerName="System.Data.EntityClient" /></connectionStrings>
  <entityFramework>
    <defaultConnectionFactory type="System.Data.Entity.Infrastructure.LocalDatabaseModelConnectionFactory, EntityFramework">
      <parameters>
        <parameter value="v13.0" />
      </parameters>
    </defaultConnectionFactory>
    <providers>
      <provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer" />
      <provider invariantName="MySql.Data.MySqlClient" type="MySql.Data.MySqlClient.MySqlProviderServices, MySql.Data.EntityFramework, Version=8.0.17.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d"></provider>
    </providers>
  </entityFramework>
  <system.data>
  </system.data>
  <runtime>
    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
      <dependentAssembly>
        <assemblyIdentity name="EntityFramework" publicKeyToken="b77a5c561934e089" culture="neutral" />
        <bindingRedirect oldVersion="0.0.0.0-5.0.0.0" newVersion="5.0.0.0" />
      </dependentAssembly>
      <dependentAssembly>
        <assemblyIdentity name="MySql.Data" publicKeyToken="c5687fc88969c44d" culture="neutral" />
        <bindingRedirect oldVersion="0.0.0.0-8.0.17.0" newVersion="8.0.17.0" />
      </dependentAssembly>
    </assemblyBinding>
  </runtime>
</configuration>

They might didn't have any MySql connector installed on their machine.他们的机器上可能没有安装任何 MySql 连接器。 Fixed it by installing nuget: MySql.ConnectorNET.Entity通过安装 nuget: MySql.ConnectorNET.Entity 修复它

在此处输入图像描述

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 具有不变名称“MySql.Data.MySqlClient”的 ADO.NET 提供程序未在计算机或应用程序配置文件中注册 - The ADO.NET provider with invariant name 'MySql.Data.MySqlClient' is either not registered in the machine or application config file 错误175:具有不变名称“MySql.Data.MySqlClient”的ADO.NET提供程序未在计算机或应用程序配置文件中注册 - Error 175: The ADO.NET provider with invariant name 'MySql.Data.MySqlClient' is either not registered in the machine or application config file 未找到具有不变名称&#39;MySql.Data.MySqlClient&#39;的ADO.NET提供程序的实体框架提供程序-WCF - No Entity Framework provider found for the ADO.NET provider with invariant name 'MySql.Data.MySqlClient' - WCF 具有不变名称“System.Data.SQLite.EF6”的 ADO.Net 提供程序未在机器或应用程序配置文件中注册 - The ADO.Net provider with Invariant name 'System.Data.SQLite.EF6' is not registered in the machine or application config file ADO.NET提供程序“Oracle.ManagedDataAccess.Client”未在计算机或应用程序配置文件中注册,或者无法加载 - The ADO.NET provider 'Oracle.ManagedDataAccess.Client' is either not registered in the machine or application config file, or could not be loaded 具有不变名称“System.Data.SqlClient”的 ADO.NET 提供程序未注册 - The ADO.NET provider with invariant name 'System.Data.SqlClient' is either not registered 在已注册的 .NET 数据提供者列表中找不到指定的不变名称“MySql.Data.MySqlClient” - The specified invariant name 'MySql.Data.MySqlClient' wasn't found in the list of registered .NET Data Providers 没有为ADO.NET提供程序找到具有不变名称“System.Data.SqlClient”的实体框架提供程序。 - No Entity Framework provider found for the ADO.NET provider with invariant name 'System.Data.SqlClient'. 错误:找不到具有不变名称'System.Data.SqlClient'的ADO.NET提供程序的实体框架提供程序 - Error: No Entity Framework provider found for the ADO.NET provider with invariant name 'System.Data.SqlClient' 错误175:不变名称为“ System.Data.SqlServerCe.4.0”的ADO.NET提供程序 - Error 175: The ADO.NET provider with invariant name 'System.Data.SqlServerCe.4.0'
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM