Page 1 of 1

Still license problems with dyn. loaded assembly which references mysql provider.

Posted: Sun 25 Dec 2005 19:06
by FransBouma
I still have problems with the license checks.
The .exe has a licenses.licx file. I add to that:
CoreLab.MySql.MySqlConnection, CoreLab.MySql

(or the full qualification, doesn't matter).
Compile.
The .exe references an assembly, ApplicationCore, which loads database drivers on demand, via this code

Code: Select all

public static IDBDriver CreateDBDriverInstance(string assemblyFilename, string namespaceToUse, string className)
{
	// load the assembly
	Assembly databaseDriver = Assembly.LoadFrom(assemblyFilename);

	string completeClassPath = className;
	if(namespaceToUse.Length > 0)
	{
		// there is a namespace specified, add it
		completeClassPath = namespaceToUse + "." + className;
	}

	// create the instance
	IDBDriver toReturn = (IDBDriver)databaseDriver.CreateInstance(completeClassPath);

	// return the instance
	return toReturn;
}
One of the drivers, is teh MySql driver, which is an assembly in dll form. Even if I build that assembly directly against 3.20.7 in .NET 2.0 and add a licenses.licx file and add the corelab reference, it doesn't matter. I get the license isn't valid error every time I open a connection.

If I add a licenses.licx file to application core, it doesn't matter as well.

This is a serious problem, which now stops our product on .NET 2.0 and mysql and it's been enough.

Furthermore, if I keep my driver code build against 2.80.7 / .NET 1.1, and run it on .NET 2.0 with the .exe on .NET 2.0 and Corelab 3.20.7 installed, I get the error:
Could not load type 'CoreLab.Common.DbConnection' from assembly 'CoreLab.MySql, Version=3.20.7.0, Culture=neutral, PublicKeyToken=09af7300eec23701'.
Which is very weird, as apparently there's no assembly redirection taking place.

Please help. If we don't reach a solution soon, MySql will be discontinued from LLBLGen Pro as we can't invest this amount of time in supporting a single database, while we can't do a thing about the issues we run into :(

Posted: Mon 26 Dec 2005 10:38
by Oleg
We have tested the situation described. Please contact our support team by e-mail and we will send you a test that works for MySQLDirect .NET 3.20.7.

Posted: Mon 26 Dec 2005 10:44
by FransBouma
Oleg wrote:We have tested the situation described. Please contact our support team by e-mail and we will send you a test that works for MySQLDirect .NET 3.20.7.
I have emailed mysqlnet AT crlab.com and dmitry yesterday, so the email should be there.

What's weird is that if I check in the .exe the .licenses file, the CoreLab line isn't there. Perhaps this is optimized away by the compiler because the .exe isn't directly referencing the mysql dll...