Вопрос

Under C#, framework 4.5. I installed Mysql connector 6.7.4.

If I try to load dynamically the dll with

DbProviderFactory fac = DbProviderFactories.GetFactory("MySql.Data.MySqlClient");

I get : Failed to find or load the registered .Net Framework Data Provider.

  • I added in app.config the mysql (I even can list it with a GetFactoryClasses() !)
  • I tried to put the MySQL assembly in GAC

Nothing works :(

Это было полезно?

Решение

There's a bug with the current provider. I had the same issue. You should use version 6.6.6, it worked for me. Here's a description for the bug register the provider in machine.config

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top