Ich habe Google schon rauf und runter gesucht.
Ein scheinbar leichtes Problem, wo es viele Einträge gibt mit Lösungen.
Aber es funktioniert bei mir einfach nicht. (Linux Debian, mono)
Das Installieren des Connectors ist hier beschrieben und wurde mehrmals
durchgeführt, mit Versionen 8.0.15.0 und 6.10.8
https://dev.mysql.com/doc/connector-net/en/connector-net-installation-unix.html
(meine mono --version ist 4.6.2)
Das installieren mit gacutils funktioniert und die assemblies sind
vorhanden.
1 | sudo gacutil -i MySql.Data.dll ; sudo gacutil -i MySql.Web.dll
|
2 | $ gacutil -l | grep -i mysql
|
3 | MySql.Data, Version=6.10.8.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d
|
4 | MySql.Web, Version=6.10.8.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d
|
Aber ein kleines Programm, erfolgreich kompiliert mit
1 | mono-csc ~/DBProvider_listAll.cs -lib:/usr/lib/mono/gac/ -r:System.Data.dll -r:MySql.Data.dll -r:MySql.Web.dll
|
1 | using System;
|
2 | using System.Collections.Generic;
|
3 | using System.Text;
|
4 | using System.Data.Common;
|
5 | using System.Data;
|
6 |
|
7 | class Program
|
8 | {
|
9 | static void Main(string[] args)
|
10 | {
|
11 | DataTable table = DbProviderFactories.GetFactoryClasses();
|
12 |
|
13 | foreach (DataRow row in table.Rows)
|
14 | {
|
15 | foreach (DataColumn column in table.Columns)
|
16 | {
|
17 | Console.WriteLine("{0}:{1}",column.ColumnName, row[column]);
|
18 | }
|
19 | Console.WriteLine("----------------------------");
|
20 | }
|
21 |
|
22 | }
|
23 | }
|
will mir den MySql Connector nicht anzeigen.
Warum?