I have an application that is using the CoreLab.MySql.dll version 2.80.5. However when I run it on a system that has version 2.0.5.0 of the DLL in the Global Assembly Cache, I get the Unknown system variable 'NAMES' error.
But if I remove the DLL from the GAC, it works. I have also tried to force the application to load the 2.80.5 version of the DLL manually without any luck.
Error Unknown system variable 'NAMES' when accessing database
We advise you to deploy newest versions of MySQLDirect .NET runtime binaries when distributing your applications.
If you cannot do this, try to use application configuration file. For more information about configuration files and assembly loading see corresponding documentation.
Moreover, you should check MySQL version on target machine (probably it doesn't support UTF8 charset).
If you cannot do this, try to use application configuration file. For more information about configuration files and assembly loading see corresponding documentation.
Moreover, you should check MySQL version on target machine (probably it doesn't support UTF8 charset).
I would like to run my application without having to write an installer to deploy it. It is a backup utility that is used by the installer of our main application which is in the field and uses an older version of the MySQLDirect .NET runtime binary (version 2.0.5.0).
I have tried setting the config file to load the newer version of the DLL but for some reason it keeps loading the older version. So I programmatically loaded the newer version and verfied that when the application runs it uses the newer version (I check all the assemblies that are loaded when I get the exception). But it seems like as long as the old DLL is in the GAC I cannot run my application.
The only options I have left is to either see if using ILMerge to merge the DLL into the executable will work but I am not sure what the license issues regarding this are and the secondly use another driver for this utility. I do know that if I have .NET 2.0 framework installed on a machine and I used the version 2.0.5.0 DLL, it starts calling the .NET 2.0 framework routines. Is it possible that 2.80.5 has similar issues.
I have tried setting the config file to load the newer version of the DLL but for some reason it keeps loading the older version. So I programmatically loaded the newer version and verfied that when the application runs it uses the newer version (I check all the assemblies that are loaded when I get the exception). But it seems like as long as the old DLL is in the GAC I cannot run my application.
The only options I have left is to either see if using ILMerge to merge the DLL into the executable will work but I am not sure what the license issues regarding this are and the secondly use another driver for this utility. I do know that if I have .NET 2.0 framework installed on a machine and I used the version 2.0.5.0 DLL, it starts calling the .NET 2.0 framework routines. Is it possible that 2.80.5 has similar issues.
We tested your scenario and found no problems.
.NET Framework requires exact mathc of major and minor assembly versions when loading. So even in theory your application, which has been built with CoreLab.MySql.dll 2.80, cannot load CoreLab.MySql.dll 2.0.5 assembly.
If you think the problem is in MySQLDirect .NET, send us exception call stack, your .NET Framework and MySQL Server version.
.NET Framework requires exact mathc of major and minor assembly versions when loading. So even in theory your application, which has been built with CoreLab.MySql.dll 2.80, cannot load CoreLab.MySql.dll 2.0.5 assembly.
We think your application has some additional dependencies, that you ignored.I programmatically loaded the newer version and verfied that when the application runs it uses the newer version
If you think the problem is in MySQLDirect .NET, send us exception call stack, your .NET Framework and MySQL Server version.