[Mono-dev] mysql connector Mono 2.6.7 - Cannot find assembly

Frank Cohen frankenspank at gmail.com
Thu Oct 21 11:35:11 EDT 2010


Hey V,

Thanks for your reply.  I did as you suggested but I still get the same
error message w/out any more information.  I've actually placed the DLLs in
the same folder as the exe (not mono, Main.exe).  So shouldn't it pick them
up?

Here are a couple more pieces of info: while I was able to get the Windows
command line test working, when I tried to run the web-app in Mono's web
server, I got the same error about the DLL.  On the Cent OS box, I had an
earlier version of Mono installed, then installed from source again.  I
think it's installed correctly as when I run mono --version, it's showing me
2.6.8.

Below is the output from the test program:

** (./Main.exe:17396): WARNING **: The following assembly referenced from
/san/home/www/testproj/Main.exe could not be loaded:
     Assembly:   MySql.Data    (assemblyref_index=1)
     Version:    6.3.5.0
     Public Key: c5687fc88969c44d
The assembly was not found in the Global Assembly Cache, a path listed in
the MONO_PATH environment variable, or in the location of the executing
assembly         (/san/home/www/testproj/).


** (./Main.exe:17421): WARNING **: Could not load file or assembly
'MySql.Data, Version=6.3.5.0, Culture=neutral,
PublicKeyToken=c5687fc88969c44d' or one of its dependencies.

** (./Main.exe:17421): WARNING **: Missing method .ctor in assembly
/san/home/ww/testproj/Main.exe, type MySql.Data.MySqlClient.MySqlConnection

Unhandled Exception: System.IO.FileNotFoundException: Could not load file or
assembly 'MySql.Data, Version=6.3.5.0, Culture=neutral,
PublicKeyToken=c5687fc88969c44d' or one of its dependencies.


Thanks,

Frank

On Thu, Oct 21, 2010 at 11:02 AM, Veerapuram Varadhan
<vvaradhan at novell.com>wrote:

> Hello Frank,
>
> Check whether you have any "system" version of Mono running, if so take
> a look at http://www.mono-project.com/Parallel_Mono_Environments
>
> Also, you can try running your sample with:
>        MONO_LOG_LEVEL=dll mono ./<your-mono-compiled-exe>
>
> which will give you the location where mono searches for the MySql
> assembly.
>
> HTH,
>
> V. Varadhan
>
> On Thu, 2010-10-21 at 08:16 -0400, Frank Cohen wrote:
> > I've been having quite a bit of trouble getting an MVC2 web
> > application to find the MySQL connector. I am running CentOS 5.
> >
> > I've installed the DLL into the GAC using the 2.0 version of the tool
> >
> > *mono /usr/local/lib/mono/2.0/gacutil.exe -i v2/mysql.data.dll*
> > *Installed v2/mysql.data.dll into the gac (/usr/local/lib/mono/gac)*
> >
> > I verify that it updated the GAC:
> >
> > *#
> > ls
> /usr/local/lib/mono/gac/MySql.Data/6.3.5.0__c5687fc88969c44d/mysql.data.dll*
> >
> > I get the following error when I run the application: Failed to find
> > or load the registered .Net Framework Data Provider
> > MySql.Data.MySqlClient'.
> >
> > I created a simple command line application described here:
> > http://www.mono-project.com/MySQL, which works under Mono and .NET on
> > my Windows machine, but does not work on my Linux box.
> >
> > Thanks,
> >
> > Frank
> > _______________________________________________
> > Mono-devel-list mailing list
> > Mono-devel-list at lists.ximian.com
> > http://lists.ximian.com/mailman/listinfo/mono-devel-list
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/mono-devel-list/attachments/20101021/977d4064/attachment-0001.html 


More information about the Mono-devel-list mailing list