Error on running with Mysql application on the server


I am using MySql.Data.dll on my application, my application works good locally when I run it from Visual Studio. but when I published it on my host i get this error

Compilation Error
Description: An error occurred during the compilation of a resource required 
to service this request. Please review the following specific error details 
and modify your source code appropriately. 

Compiler Error Message: CS0246: The type or namespace name 'MySql' could not 
be found (are you missing a using directive or an assembly reference?)

Source Error:

Line 1:  using MySql.Data.MySqlClient;
Line 2:  using System;
Line 3:  using System.Collections.Generic;

Although I but these files in "Bin" folder MySql.Data.dll BouncyCastle.Crypto.dll Google.Protobuf.dll, then I Added these line on Web.Config file

 <add assembly="MySql.Data, Version6.3.5.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d"/>

but I get another error

 Could not load file or assembly 'MySql.Data\, Version6.3.5.0\, 
 Culture\=neutral\, PublicKeyToken\=c5687fc88969c44d' or one of its 
 dependencies. The given assembly name or codebase was invalid. (Exception 
 from HRESULT: 0x80131047)

please help
* I am using .Net Framework 4.5.2
* I installed "MySQL" 8.0.16 from NuGet
* I get MySQL version and PublicKeyToken from PowerShell cmd
please help

asked on Stack Overflow Apr 27, 2019 by JustMe

0 Answers

Nobody has answered this question yet.

User contributions licensed under CC BY-SA 3.0