Bug #108656 .Net Connector proble
Submitted: 30 Sep 2022 0:39 Modified: 6 Oct 2022 12:28
Reporter: tms sms Email Updates:
Status: Can't repeat Impact on me:
None 
Category:Connector / NET Severity:S3 (Non-critical)
Version:8.0.30 OS:Windows (11 home)
Assigned to: CPU Architecture:Other (64 bit)

[30 Sep 2022 0:39] tms sms
Description:
When I try to add new DataSource to my windows form application using VS 2019 enterprise. I receive a message that tell me " Cannot obtain provider factory for data provider named' Mysql.Data.MySqlClient'." and when try to configure the Mysql Database by Mysql application configuration tool I receive error message " Unable to find the requested .Net Framwork Data provider. It may not be installed", although I freshly update VS and freshly install Mysql full package by latest versions.

when I add manually mysql.Data in reference to old project. I cannot import the refrence in the project forms.

may you help me
thanks

How to repeat:
10 times
[30 Sep 2022 8:33] tms sms
Mysql Application configuration tool

Attachment: Screenshot 2022-09-30 102925.png (image/png, text), 92.04 KiB.

[30 Sep 2022 8:34] tms sms
DataSource wizard MySql provider error

Attachment: Screenshot 2022-09-30 103201.png (image/png, text), 321.21 KiB.

[30 Sep 2022 8:35] tms sms
MySql Installed items

Attachment: Screenshot 2022-09-30 103239.png (image/png, text), 353.44 KiB.

[30 Sep 2022 8:37] tms sms
Mysql DbProviderFactories not incluse in machine.config file
[30 Sep 2022 8:38] tms sms
.Net Used 4.8.1

Attachment: Screenshot 2022-09-30 103805.png (image/png, text), 142.72 KiB.

[30 Sep 2022 12:10] MySQL Verification Team
Hello,

Thank you for the bug report.
It seems "MySql.Data" dll was missing in your project, follow one of the step to add "MySql.Data" dll to the project.
1). Goto Project->Add reference-> Browse path (C:\Program Files (x86)\MySQL\Connector NET 8.0\Assemblies\v4.8 or v4.5.2) from "MySql.Data" dll
2). PM> Install-Package MySql.Data (install "MySQL.Data" at Package Manager Console).
3). Goto Project->Manage NuGet Packages and search for "MySql.Data.Entity"  and install.

MySQL Installing and Configuring manual for Visual Studio Integration:
https://dev.mysql.com/doc/visual-studio/en/visual-studio-install.html

Regards,
Ashwini Patil
[30 Sep 2022 13:04] tms sms
MySql.Data" dll reference not missing it in references list and in correct version, this situation occurs with windows desktop applications and mysql mvc applications. May you give me advice in another way, specially the MySql DbProviderFactories not recorded in machine.config file.

thanks
[30 Sep 2022 13:34] tms sms
The DataSource wizard connect to server and database but not continue to retrieve database tables and give error 

"Cannot obtain provider factory for data provider named MySql.Data.MysqlClient"
[4 Oct 2022 12:53] MySQL Verification Team
Please uninstall and re-install Connector/NET and MySQL for Visual Studio. Thanks.
[4 Oct 2022 19:13] tms sms
I uninstall and reinstall all mysql packages but not work

but I add BDprovider of MySql to machine.config file manually this solve the problem, So the problem that:

Mysql connector does not register automatically to machine.config during installation.
[6 Oct 2022 12:28] MySQL Verification Team
Hello,

Thank you for confirming that issue is no longer seen after adding BDprovider to machine.config.
However, I could not repeat the issue on Windows 10 using Connector/Net and Visual Studio 2022.

If you can provide more information, feel free to add it to this bug and change the status back to 'Open'.  

Thank you for your interest in MySQL.

Regards,
Ashwini Patil