I am getting the above error when I execute the code -
MySqlConnection mysqlConn=new MySqlConnection(\"server=127.0.0.1;uid=pankaj;port=3306;pwd=master;datab
Just ran into the same problem. Installing the .NET framework on the target machine solved the problem.
Better yet, make sure all required dependencies are present in the machine where the code will be running.