Bug #96614 Cannot Get Data from database using Excel 2019
Submitted: 22 Aug 10:03 Modified: 22 Aug 23:16
Reporter: Graham Stafford Email Updates:
Status: Closed Impact on me:
None 
Category:Connector / NET Severity:S3 (Non-critical)
Version:8.0.17 OS:Microsoft Windows (10)
Assigned to: CPU Architecture:Any

[22 Aug 10:03] Graham Stafford
Description:
Using Excel 2019, trying to read from MySQL Db using the Excel -> Get Data -> From Database -> From MySql Database

After entering the db server and name, I get the following error

An error happened while reading data from the provider: 'Could not load file or assembly 'Renci.SshNet, Version=2016.1.0.0, Culture=neutral, PublicKeyToken=1cee9f8bde3db106' or one of its dependencies. The system cannot find the file specified

Roll back to 8.0.16 Connector/Net and there is no error, Excel reads in data ok

How to repeat:
Use Excel 2019, on Data tab,

 Get Data -> From Database -> From MySql Database

 enter the db server and name,

Suggested fix:
Resolve dependency issue Renci.SshNet
[22 Aug 10:42] Umesh Shastry
Hello Graham,

Thank you for the report.
Observed this while using Excel 2019 and C/NET 8.0.17 on Win10.

regards,
Umesh
[22 Aug 10:47] Umesh Shastry
Bug #96545 marked as duplicate of this one
[22 Aug 12:27] Umesh Shastry
Bug #96355 marked as duplicate of this one
[22 Aug 21:29] JOSE RAMIREZ
Posted by developer:
 
For MSI installations of Connector/NET, the Renci.SshNet.dll deployed to the GAC is incorrect, causing the error. To workaround this problem the user can obtain the correct dll from the installation folder (typically C:\Program Files (x86)\MySQL\MySQL Connector Net 8.0.17\Assemblies\v4.5.2). The dll must be placed at the location of the exe calling MySql.Data.dll, in the case of Excel it must be placed at: C:\Program Files\Microsoft Office\Office16\ADDINS\Microsoft Power Query for Excel Integrated\bin.

For users making use of the uninstall package, the Renci.SshNet.dll located in the folder is the correct one and must also be placed alongside the exe calling the MySql.Data.dll assembly or in some cases simply alongside MySql.Data.dll.

Work is being made to remove the hard dependency on the Renci.SshNet.dll which in future releases will only be required when making use of SSH connections and will not generate errors on non-SSH connections.
[22 Aug 23:16] Christine Cole
Posted by developer:
 
Fixed as of the upcoming MySQL Connector/NET 8.0.18 release, and here's the changelog entry:

The Renci.SshNet.dll deployment was problematic for Connector/NET 8.0.17
MSI installations. Some applications, such as Microsoft Excel, were unable
to read MySQL data as a result. This fix removes unnecessary dependencies
on the DLL and also ensures that the MSI installation deploys the correct
Renci.SshNet.dll to the GAC.

Thank you for the bug report.
[20 Sep 4:53] Umesh Shastry
Bug #96951 marked as duplicate of this one