Could not load file or assembly 'MySql.Data.CF' or one of its dependencies. The given assembly name or codebase was invalid. (Exception from HRESULT: 0x80131047)

Topics: ASP.NET 2.0
Jan 5, 2012 at 3:05 AM

I've installed blogengine.net on Windows 2008 server and I've downloaded and installed the .net connector for mysql 6.2.5 in order to connect to mysql.  I'm getting the following error after following the readme:

 

Could not load file or assembly 'MySql.Data.CF' or one of its dependencies. The given assembly name or codebase was invalid. (Exception from HRESULT: 0x80131047)

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.IO.FileLoadException: Could not load file or assembly 'MySql.Data.CF' or one of its dependencies. The given assembly name or codebase was invalid. (Exception from HRESULT: 0x80131047)

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Anyone seen this before. 

Coordinator
Jan 5, 2012 at 4:08 PM

MySql sometimes hard to setup with .NET applications, take a look at this similar issue for example. It usually comes down to client library ("connector") calling MySql version different from one that installed.