Page 1 of 1

Mysql DLL

Posted: Tue Dec 09, 2014 7:35 am
by Gurusharan
Hi i have successfully added(referenced) mysql dll to my Ranorex project, when i type for namespace it comes automatically(intellisense is working) i.e., "Using Mysql.data.sqlclient". But after giving build its throwing me an error
"The type or namespace name 'MySql' could not be found (are you missing a using directive or an assembly reference?) (CS0246) "

Please help me ASAP.

Re: Mysql DLL

Posted: Tue Dec 09, 2014 3:18 pm
by krstcs
You might need to add a "using MySql;" directive to any code module that is attempting to use the DLL. Just adding it as a reference for the project is not enough. You have to tell .NET when you want to use it.

So, the TOP of your code module should look something like this:

Code: Select all

using System;
using Ranorex;
using MySql;

namespace <Module Namespace Name> ...
Another option is to add the fully qualified namespace in each place you use an object from the MySql library.

Code: Select all

MySql.<class name here>.<method name here>();