[英]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="server=XXX;user id=XXX;password=XXX;persistsecurityinfo=True;database=XXX;allowuservariables=True"" 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>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.