Problem to execute project

Hi,
I get these
System.IO.FileLoadException: Could not load file or assembly 'MySql.Data, Version=6.9.5.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
File name: 'MySql.Data, Version=6.9.5.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d'
   at Utility.DBUtil.runSQL(String sql)
   at SMS_ConvStore.Program.ProcessSmsDlv_OK(DateTime current_time) in C:\source\P2\Program.cs:line 526

WRN: Assembly binding logging is turned OFF.
To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
Note: There is some performance penalty associated with assembly bind failure logging.
To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].

---------- Conv Store OK Macau 20/8/2015 14:00:01 Process SMS Delivery ----------
System.IO.FileLoadException: Could not load file or assembly 'MySql.Data, Version=6.9.5.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
File name: 'MySql.Data, Version=6.9.5.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d'
   at Utility.DBUtil.runSQL_Macau(String sql)
   at SMS_ConvStore.Program.ProcessSmsDlv_OK_Macau(DateTime current_time) in C:\source\P2\Program.cs:line 622

WRN: Assembly binding logging is turned OFF.
To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
Note: There is some performance penalty associated with assembly bind failure logging.
To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].

System.IO.FileLoadException: Could not load file or assembly 'MySql.Data, Version=6.9.5.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
File name: 'MySql.Data, Version=6.9.5.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d'
   at Utility.DBUtil.runSQL(String sql)
   at SMS_ConvStore.Program.ProcessSmsDlv_Outer_All(DateTime current_time) in C:\source\P2\Program.cs:line 807

WRN: Assembly binding logging is turned OFF.
To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
Note: There is some performance penalty associated with assembly bind failure logging.
To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].

Open in new window

with these codes
                sql = @"select " +
                    ...

526                dt = DBUtil.runSQL(sql);
                ...

                sql = @"select " +
                    ...
622                dt = DBUtil.runSQL_Macau(sql);
                    ...
                sql = @"select " +
                    ...
                ...
807                dt = DBUtil.runSQL(sql);
                ...

Open in new window

in PROD, while in Testing DB, no such problem.
LVL 12
HuaMin ChenProblem resolverAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Ryan ChongBusiness Systems Analyst , ex-Senior Application EngineerCommented:
>>System.IO.FileLoadException: Could not load file or assembly 'MySql.Data, Version=6.9.5.0,
Are you using a newer MySQL library in your development environment, which got a different version from your Production? or is the MySQL library exists in your Production?

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
HuaMin ChenProblem resolverAuthor Commented:
I did ever check the dll file was the same in both sites.
Ryan ChongBusiness Systems Analyst , ex-Senior Application EngineerCommented:
Did you upload the recompiled project DLLs to your Production?

Alternatively, you probably can check in IIS by creating a new App Pool.

Try:

1) create a new Application Pool
2) go to the Advanced Settings of this application pool
3) set the Enable 32-Bit Application to True
4) point your web application to use this new Pool
Protecting & Securing Your Critical Data

Considering 93 percent of companies file for bankruptcy within 12 months of a disaster that blocked access to their data for 10 days or more, planning for the worst is just smart business. Learn how Acronis Backup integrates security at every stage

HuaMin ChenProblem resolverAuthor Commented:
the project is in VS 2008 and  should be in 32-bit, right?
HuaMin ChenProblem resolverAuthor Commented:
I'm directly running the .exe file, of the project.
Ryan ChongBusiness Systems Analyst , ex-Senior Application EngineerCommented:
is the correct .net mysql connector driver installed on the target machine?
MlandaTCommented:
Check that you are using the the right platform 32bit or 64bit. If it works in your local and not working in server means there is a chance of environment issue like 32bit/64 bit.

Also, try to compile to "Any CPU". Also If you have more than one assembly referencing MySQL you should check that they are all referencing the same version, from the same location and/or have the "Specific Version" property set to false and "Copy Local" set to true.
HuaMin ChenProblem resolverAuthor Commented:
where is the option below?
21
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
C#

From novice to tech pro — start learning today.