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 11
HuaMin ChenProblem resolverAsked:
Who is Participating?
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 ChongCommented:
>>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?
0

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.
0
Ryan ChongCommented:
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
0
Cloud Class® Course: Microsoft Windows 7 Basic

This introductory course to Windows 7 environment will teach you about working with the Windows operating system. You will learn about basic functions including start menu; the desktop; managing files, folders, and libraries.

HuaMin ChenProblem resolverAuthor Commented:
the project is in VS 2008 and  should be in 32-bit, right?
0
HuaMin ChenProblem resolverAuthor Commented:
I'm directly running the .exe file, of the project.
0
Ryan ChongCommented:
is the correct .net mysql connector driver installed on the target machine?
0
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.
0
HuaMin ChenProblem resolverAuthor Commented:
where is the option below?
21
0
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.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.