Categories
.net azure c# mysql

InvalidCastException in Windows Azure connecting to MySQL DB

I have just started using Azure and I am having a problem accessing the MySQL DB I set up. It appears as if Azure is referencing the MySQL.Data.dll version 6.5.4 instead of the version I require, MySQL.Data.dll v6.8.3. I receive the following error:

MySql.Data.MySqlClient.MySqlConnection cannot be cast to
MySql.Data.MySqlClient.MySqlConnection. Type A originates from
‘MySql.Data, Version=6.5.4.0, Culture=neutral,
PublicKeyToken=c5687fc88969c44d’ in the context ‘Default’ at location
‘D:\Windows\Microsoft.Net\assembly\GAC_MSIL\MySql.Data\v4.0_6.5.4.0__c5687fc88969c44d\MySql.Data.dll’.
Type B originates from ‘MySql.Data, Version=6.8.3.0, Culture=neutral,
PublicKeyToken=c5687fc88969c44d’ in the context ‘Default’ at location
‘C:\DWASFiles\Sites\test\Temporary ASP.NET
Files\root\fc8f3c27\4f9201b0\assembly\dl3\ca8ec5e2\74482a5e_285fcf01\MySql.Data.dll’.

I tried using my application with v6.5.4 but I require v6.8.3 for it to work. Numerous searches have not revealed a solution. Does anyone have any ideas? The checked using Web Matrix that the version in the bin directory is 6.8.3. How can I reference this correct dll?