应用程序最初是在 VS 2008 中开发的。它使用 MySQL.data.dll 连接到 MySQL 数据库。应用程序在 Windows 中运行良好。
但是生产环境是Debian with mono。
现在将整个解决方案复制到 Debian 盒子中。整个解决方案在 modevelop 中正确打开。它不会在构建中引发任何错误。但是在运行时 - 它会抛出以下错误 -
正在发送文件.........
Error: System.EntryPointNotFoundException: CreateSemaphore
at (wrapper managed-to-native) MySql.Data.Common.Semaphore:CreateSemaphore (MySql.Data.Common.SECURITY_ATTRIBUTES&,int,int,string)
at MySql.Data.Common.Semaphore..ctor (Int32 initialCount, Int32 maximumCount) [0x00000]
at (wrapper remoting-invoke-with-check) MySql.Data.Common.Semaphore:.ctor (int,int)
at MySql.Data.MySqlClient.MySqlPool..ctor (MySql.Data.MySqlClient.MySqlConnectionString settings) [0x00000]
at MySql.Data.MySqlClient.MySqlPoolManager.GetPool (MySql.Data.MySqlClient.MySqlConnectionString settings) [0x00000]
at MySql.Data.MySqlClient.MySqlConnection.Open () [0x00000]
最佳答案
信号量(如此处所用)是 Windows 独有的功能。我猜你需要一个专门与 Mono 兼容的客户端版本。你可能想看看 MySQL section of the Mono site然后从那里开始。
关于Debian mono 中 monodevelop 中的 MySQL.Data.dll 错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1436464/