Bug #96355 Open connection
Submitted: 27 Jul 2019 15:24 Modified: 22 Aug 2019 12:26
Reporter: Finn Nielsen Email Updates:
Status: Duplicate Impact on me:
None 
Category:Connector / NET Severity:S2 (Serious)
Version:8.0.17 OS:Any
Assigned to: CPU Architecture:Any

[27 Jul 2019 15:24] Finn Nielsen
Description:
Im using assembly MySql.Data.dll (no Connector net installation) local and on host webserver.
Since version "way back" to 8.0.15 no problems.
Version 8.0.16 and 8.0.17 the connection fails to open.
VS 16.2.0 VB.NET Webforms projekt, framework 4.8 (4.7.2 makes no difference).
Host MySQL server version 5.7.26-29-log.

Error message (translated from danish to english):
System.IO.FileNotFoundException
  HResult=0x80070002
  Message=The file or assembly 'Renci.SshNet, Version=2016.1.0.0, Culture=neutral, PublicKeyToken=1cee9f8bde3db106' or one of its dependencies could not be loaded. The file specified was not found.

How to repeat:
No good idea (try similar, i know that much easier said than done). Hope the name of the missing file gives a clue.
[6 Aug 2019 18:42] Bradley Grainger
Do you have a mix of new-style (SDK) projects and old-style CSPROJ files in your solution?

If so, there are known issues with dependencies not being copied transitively. 

There are workarounds given here: https://github.com/dotnet/sdk/issues/901#issuecomment-403987178

Migrate the .NET Framework project to PackageReference: https://docs.microsoft.com/en-us/nuget/reference/migrate-packages-config-to-package-refere...

Or install the dependencies (i.e., https://www.nuget.org/packages/SSH.NET/) in your Web Forms project.

Alternatively, switch to https://www.nuget.org/packages/MySqlConnector/ which is compatible with Connector/NET but doesn't have the SSH.NET dependency.
[7 Aug 2019 13:17] Finn Nielsen
Got it working installing nuget package SSH.NET.
Thanks!
[22 Aug 2019 12:26] MySQL Verification Team
Hello Finn Nielsen,

Thank you for the report.
Marking this as duplicate of Bug #96614, please see Bug #96614.
Agree, this should have been the base bug but since I verified Bug
#96614 before this and hence marking this as duplicate for now.  Even if
you feel that your issue is somewhat different i.e VB vs PowerBI vs Excel, the
resolution is likely to be the same. 

Thank you for your interest in MySQL.

regards,
Umesh