应用程序最初是在VS 2008中开发的。它使用MySQL.data.dll连接到MySQL数据库。应用程序在Windows中运行得非常好。
但生产环境是Debian with mono。
现在在Debian框中复制整个解决方案。整个解决方案正确地在单一开发中打开。它不会在构建中引发任何错误。但是在运行时 - 它会抛出以下错误 -
文件发送正在进行中..........
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]
答案 0 :(得分:1)
信号量(此处使用)是仅限Windows的功能。我猜你需要一个与Mono特别兼容的客户端版本。您可能需要查看MySQL section of the Mono site并从那里开始。
答案 1 :(得分:1)
感谢。我也可以找到问题。需要最新版本的MySQL连接器。连接字符串中还需要Pooling = false。