[Mono-list] MySql.Data problems

Daniel Lo Nigro lists at dan.cx
Tue Jan 1 21:57:13 UTC 2013


As the error mentions, you need to reference System.Data as well as
MySql.Data.

---
Regards,
Daniel

Sent from my phone - please excuse any typos.
On 02/01/2013 7:35 AM, "DevLOOP" <devloop at flight.us> wrote:

>
> When I run:
>
> gmcs -r:MySql.Data.dll helloworld.cs
>
> I get:
>
> helloworld.cs(9,8): error CS0246: The type or namespace name
> `IDbConnection'
> could not be found. Are you missing an assembly reference?
> helloworld.cs(10,20): error CS0012: The type
> `System.Data.Common.DbConnection'
> is defined in an assembly that is not referenced. Consider adding a
> reference to
> assembly `System.Data, Version=4.0.0.0, Culture=neutral,
> PublicKeyToken=b77a5c561934e089'
> helloworld.cs(10,8): error CS0841: A local variable `dbcon' cannot be used
> before it is declared
> helloworld.cs(11,8): error CS0841: A local variable `dbcon' cannot be used
> before it is declared
> helloworld.cs(13,8): error CS0246: The type or namespace name `IDbCommand'
> could
> not be found. Are you missing an assembly reference?
> helloworld.cs(19,8): error CS0841: A local variable `dbcmd' cannot be used
> before it is declared
> helloworld.cs(20,8): error CS0246: The type or namespace name `IDataReader'
> could not be found. Are you missing an assembly reference?
> helloworld.cs(22,14): error CS0841: A local variable `reader' cannot be
> used
> before it is declared
> helloworld.cs(23,13): error CS0103: The name `Console' does not exist in
> the
> current context
> Compilation failed: 9 error(s), 0 warnings
>
> -----------------
>
> I thought I installed the component:  I downloaded the connector from
> mysql.com,
> and ran:
>
> gacutil -i -package 4.0 v4/MySql.Data.dll
>
> (also, with "-package 4.5" and "-package 2.0")
>
> and I can see the installed files:
>  /opt/mono-3.0.2/lib/mono/4.0/MySql.Data.dll
> (a symlink to
>
> /opt/mono-3.0.2/lib/mono/gac/MySql.Data/6.6.4.0__c5687fc88969c44d/MySql.Data.dll
> )
>
> and I also have:
>
> /opt/mono-3.0.2/lib/mono/gac/MySql.Data/6.6.4.0__c5687fc88969c44d/MySql.Data.dll
>
> What is missing or incorrect?
>
> thanks
> _______________________________________________
> Mono-list maillist  -  Mono-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-list
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ximian.com/pipermail/mono-list/attachments/20130102/373c3f2b/attachment.html>


More information about the Mono-list mailing list