Search code examples
vb.netversion.net-assemblymysql.datapublickeytoken

Could not load file or assembly MySql.Data


I've installed the MySQL for Visual Studio and the .NET Connector (6.8.3.0). I previous had the 6.7.4.0 installed. Why is it still looking for this DLL?

I get the error message form event viewer:

Msg: Could not load file or assembly 'MySql.Data, Version=6.7.4.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)

The .NET framework version that i using compile is .NET framework 3.5

I've installed the MySQL for Visual Studio and the .NET Connector 6.7.4.0. and run success before (no error occur when use 6.7.4) but the program need to change to version 6.8.3.0.

So I download and install again the version 6.8.3 and added it as a reference and have the Imports line, but the error occur

How to solve this kind of error , in vb.net


Solution

  • Download MySQL Connector, add it as a reference and import it Imports MySql.Data.MySqlClient