MySql.Data.MySqlClient.Replication.ReplicationManager throws an System.TypeInitializationException

前端 未结 3 1915
一向
一向 2021-01-16 10:51

I\'m having trouble with my code to access a MySQL Database. Everytime I try to open my connection, a System.TypeInitializationException is thrown by MySq

3条回答
  •  孤城傲影
    2021-01-16 11:26

    In my case, it raised error only in production. It was due to a wrong assumption in the MySql.Data package. It for some reason seems to demand to be in the same folder as the orchestrating dll (it was referencing another dll which was referencing MySql). I resolved my issue by removing MySql.Data and instead installing MySqlConnector package as suggested in here.

提交回复
热议问题