I built an ASP.NET application using MySQL database. On my pc development server it works perfectly but gives the following error on host/production server
Error 0004: Could not load file or assembly 'MySql.Data.Entity,
Version=184.108.40.206, Culture=neutral, PublicKeyToken=c5687fc88969c44d' or one of its dependencies"
I used MySql connect version 220.127.116.11 but my host server uses MySql connector 18.104.22.168 which I feel causes the error. I tried rectifying my changing MySql.Data, MySql.Data.Entity, and MySql.Data.Entity.EF6 Specific Version property to 'false' but still no success.
I have tried using same connector as the host server but unfortunately is has no reference for MySql.Data.Entity.EF6 and wouldn't work.
Most likely you need to select the reference MySql.Data and set Copy local to true
Because it is set to false it will not upload it when you publish.
Go to Solution explorer en select references , then select MySql.Data , Then in the Properties window set Copy Local to True.
And what also works is to copy the file MySql.Data to the bin folder on the server where you host your asp.net page