I'm writing a C# program in Visual Studio 2010 to be an Excel macro. I'm attempting to connect the program to a MySql database. When I try to build, I get errors like the following:
The type or namespace name 'MySql' could not be found (are you missing a using directive or an assembly reference?)
The type or namespace name 'MySqlConnection' could not be found (are you missing a using directive or an assembly reference?)
I have already downloaded the .NET MySql connector and added a Visual Studio reference to MySql.Data.dll, and I have "using MySql.Data.MySqlClient;" at the top of my program. These two things seem to be the hangups for everyone else on the internet that sees these errors.
Why else could I be getting these errors, and how can I resolve them?
EDIT: Also, when I type the using statement, the IDE does not autocomplete MySql for me; it doesn't seem to know what/where it is.
Apart from the using statement, shown above, I get errors when trying to use MySqlConnection, e.g. as below
public Dictionary <string, MySqlConnection> m_envToCon;