tags:

views:

161

answers:

2

Hi,

I am trying to deploy a solution on a Mono Hosting Service, and I would like to use the MySql connector...

The problem is that I can't use the MySql connector, it says:

Could not load file or assembly 'MySql.Data, Version=6.2.2.0, Culture=neutral, PublicKeyToken=C5687FC88969C44D' or one of its dependencies. The system cannot find the file specified

I don't understand why? the file is in the bin directory!? what could be the reason for this?

A: 

Most hosting programs have their own library search path. Perhaps you have to add the MySQL connector to the hosting program's library search path.

e.g. In Tomcat you have to modify the CLASSPATH set in the Tomcat startup script, I'm sure the mono hosting service has something similar.

EDIT: It looks like mod_mono has a MonoPath variable that can be set to include external assemblies. Details here.

Pace
I don't think that it does much sense... because I put the dll on the bin folder of the .net application... it should just pick up the file and use it
Killercode
Fair enough, but I would still look into it. Your hosting service isn't necessarily running from the directory containing your .net application.
Pace
+1  A: 

Linux is case sensitive, so rename "mysql.data.dll" to "MySql.Data.dll".

andreas