tags:

views:

109

answers:

2

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

A: 

you can parse the assembly full 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 see which Mysql Server version are supported.

PierrOz
+1  A: 

How about this:

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

Depending on where your referenced mysql.data assembly lives, you may need to prepend a path to the dll file name.

grenade