C# linux上带有MySql连接器的.Net应用程序

C# linux上带有MySql连接器的.Net应用程序,c#,mysql,linux,connector,C#,Mysql,Linux,Connector,我正在制作一个使用MySql.Data.dll连接到数据库的应用程序。它在Windows上运行良好,但拒绝在Linux上运行(在Centos和Fedora上试用)。我尝试过在Visual C#Express和MonoDevelop上编译,在dll上下载另一个版本,使project.Net 2.0。。。什么都不管用 我得到以下错误: 未处理的异常: System.ArgumentException:初始化字符串的格式不符合索引73中的规范。 在/usr/src/mono/mcs/class/Sys

我正在制作一个使用MySql.Data.dll连接到数据库的应用程序。它在Windows上运行良好,但拒绝在Linux上运行(在Centos和Fedora上试用)。我尝试过在Visual C#Express和MonoDevelop上编译,在dll上下载另一个版本,使project.Net 2.0。。。什么都不管用

我得到以下错误:

未处理的异常: System.ArgumentException:初始化字符串的格式不符合索引73中的规范。 在/usr/src/mono/mcs/class/System.Data/System.Data.Common/DbConnectionStringBuilder.parseconnectionstringnodbc(System.String connectionstringstring)[0x00401]中 在/usr/src/mono/mcs/class/System.Data/System.Data.Common/DbConnectionStringBuilder.ParseConnectionString(System.String connectionString)[0x00017]中 在/usr/src/mono/mcs/class/System.Data/System.Data.Common/DbConnectionStringBuilder.set_ConnectionString(System.String值)[0x0001e]的/usr/src/mono/mcs/class/System.Data/System.Data.Common/DbConnectionStringBuilder.cs:97中 在:0中的MySql.Data.MySqlClient.MySqlConnectionStringBuilder..ctor(System.String connStr)[0x00000]处 在:0中的MySql.Data.MySqlClient.MySqlConnection.set_ConnectionString(System.String值)[0x00000]处 在:0中的MySql.Data.MySqlClient.MySqlConnection..ctor(System.String connectionString)[0x00000]处 在(带检查的包装器远程调用)MySql.Data.MySqlClient.MySqlConnection:.ctor(字符串) 在Plate.MySQLConnection.Select(System.Windows.Forms.DataGridView&_dataGrid,System.String[]Select,System.String from,Plate.FieldValue[]where,System.String[]order_by)[0x0000f]in/home/ukus/Desktop/MonoDev/Place/MySQLConnection.cs:241 位于/home/ukus/Desktop/MonoDev/Place/GlavniForm.cs:43中的Plate.GlavniForm.reloadmesci()[0x0006f] 在/home/ukus/Desktop/MonoDev/Place/GlavniForm.cs:28中的Plate.GlavniForm..ctor()[0x00020]处 在(带复选框的包装器)板上。玻璃状:.ctor() 位于/home/ukus/Desktop/MonoDev/Place/Program.cs:18中的Plate.Program.Main()[0x0000c] [错误]致命的未处理异常:System.ArgumentException:初始化字符串的格式不符合索引73处的规范。 在/usr/src/mono/mcs/class/System.Data/System.Data.Common/DbConnectionStringBuilder.parseconnectionstringnodbc(System.String connectionstringstring)[0x00401]中 在/usr/src/mono/mcs/class/System.Data/System.Data.Common/DbConnectionStringBuilder.ParseConnectionString(System.String connectionString)[0x00017]中 在/usr/src/mono/mcs/class/System.Data/System.Data.Common/DbConnectionStringBuilder.set_ConnectionString(System.String值)[0x0001e]的/usr/src/mono/mcs/class/System.Data/System.Data.Common/DbConnectionStringBuilder.cs:97中 在:0中的MySql.Data.MySqlClient.MySqlConnectionStringBuilder..ctor(System.String connStr)[0x00000]处 在:0中的MySql.Data.MySqlClient.MySqlConnection.set_ConnectionString(System.String值)[0x00000]处 在:0中的MySql.Data.MySqlClient.MySqlConnection..ctor(System.String connectionString)[0x00000]处 在(带检查的包装器远程调用)MySql.Data.MySqlClient.MySqlConnection:.ctor(字符串) 在Plate.MySQLConnection.Select(System.Windows.Forms.DataGridView&_dataGrid,System.String[]Select,System.String from,Plate.FieldValue[]where,System.String[]order_by)[0x0000f]in/home/ukus/Desktop/MonoDev/Place/MySQLConnection.cs:241 位于/home/ukus/Desktop/MonoDev/Place/GlavniForm.cs:43中的Plate.GlavniForm.reloadmesci()[0x0006f] 在/home/ukus/Desktop/MonoDev/Place/GlavniForm.cs:28中的Plate.GlavniForm..ctor()[0x00020]处 在(带复选框的包装器)板上。玻璃状:.ctor() 位于/home/ukus/Desktop/MonoDev/Place/Program.cs:18中的Plate.Program.Main()[0x0000c]


该应用程序成功地在Visual C#Express和MonoDevelop上构建。

我发现了问题。由于连接字符串,应用程序无法在Linux上运行。问题可能在于Mono不等同于.Net。

应用程序在Visual C#Express和MonoDevelop上成功构建。显示出现此错误的代码没有“出现此错误的代码”。编译运行时没有错误。