How can I get the MySQL Connector / NET driver version programmatically?

Is there an easy way to get the MySQL driver version programmatically from a C # program that references MySQL.Data.dll?

+3
source share
2 answers

How about this:

Version version = System.Reflection.AssemblyName.GetAssemblyName("MySQL.Data.dll").Version;

Depending on where your mysql.data link lives, you may need to add a path to the dll file name.

+2
source

you can parse the full assembly name to get the version of your .net connector, and then use the table you can find here (chapter one): http://downloads.mysql.com/docs/connector-net-en.a4 .pdf to find out which version of the Mysql server is supported.

0

Source: https://habr.com/ru/post/1714399/


All Articles