Mysql DLL

Ask general questions here.
Gurusharan
Posts: 3
Joined: Tue Sep 30, 2014 8:26 am

Mysql DLL

Post by Gurusharan » Tue Dec 09, 2014 7:35 am

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.

krstcs
Ranorex Guru
Posts: 2683
Joined: Tue Feb 07, 2012 4:14 pm
Location: Austin, Texas, USA

Re: Mysql DLL

Post by krstcs » Tue Dec 09, 2014 3:18 pm

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>();
Shortcuts usually aren't...