[Mono-dev] MySql Connectivity in Mono/xsp for linux
Robert Jordan
robertj at gmx.net
Wed Nov 30 16:13:22 EST 2005
ejaz.butt at netsolpk.com wrote:
> Hello,
> I'm currently using VS.Net 2003 to write some asp.NET/C# pages
> and I'm trying to connect it with MySQL 5.0. I've installed MySql
> connector (MySql.Data.dll)and it works fine with .Net Framework on
> windows. but once I attempt to move the asp.NET pages to the linux(fedora)
> mono/xsp server the pages begin to generate the following error:
>
> "Could not find assembly MySql.Data"
>
> What seems to be the problem? i am very much confused of this becoz i have
> registered the MySql.Data using the following comd:
>
> [/]# gacutil -i ./MySQL.Data.dll
> MySql.Data installed into the gac (/usr/local/lib/mono/gac)
>
> [/]# gacutil -l MySql.Data
> The following assemblies are installed into the GAC:
> MySql.Data, Version=1.0.3.31712, Culture=neutral,
> Number of items = 1
The version of the Windows MySql.Data assembly doesn't match
the version of the Mono assembly. Even the latest MySql Connector
distribution comes with different assembly versions. I really don't
know why the maintainer is doing that ....
You may try to put the following entries in your linux web.config:
<configuration>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="MySql.Data" publicKeyToken="the correct
token!" />
<bindingRedirect oldVersion="x.x.x.x" newVersion="y.y.y.y" />
</dependentAssembly>
</assemblyBinding>
</runtime>
x.x.x.x == the version of MySql.Data for Windows
y.y.y.y == the version of MySql.Data for Mono
Robert
More information about the Mono-devel-list
mailing list