[MonoDevelop] using Npgsql

Rafael Teixeira monoman at gmail.com
Wed Apr 30 18:04:53 EDT 2008


Have you added the NPGSQL assembly (dll) as a "Reference" in the project?
Without that MonoDevelop, won't instruct the compiler to look into it when
compiling. The "Using" part will just make the symbols in that namespace
available without qualification, but won't force the reference to the
library (in the Boo language you can use a similar construct that also
references the library, but that is another thing).

Abraço,

On Wed, Apr 30, 2008 at 2:57 PM, Ricardo Baumann <gemini.richard at gmail.com>
wrote:

> Hello;
>
> I added the Npgsql library to my solution in MonoDevelop, but when I
> build the solution, I receive this message:
>
> The type or namespace name `NpgsqlConnection' could not be found. Are
> you missing a using directive or an assembly reference?(CS0246)
>
> The code class Follow:
>
>
> using System;
> using System.Web;
> using System.Web.UI;
> using System.Data;
> using Npgsql;
>
>
>
>
>        public class Default : Page
>        {
>                protected System.Web.UI.HtmlControls.HtmlForm form1;
>
>                protected System.Web.UI.WebControls.TextBox textBox1;
>
>                protected System.Web.UI.WebControls.Button button1;
>
>
>                public virtual void onButtonClick(object sender, EventArgs
> e)
>                {
>
>                        NpgsqlConnection Conexao = new
>
>  NpgsqlConnection("Pooling=false;Server=gpserver;Port=5432;UserId=postgres;Password=pgadmin;Database=pdb;");
>                        Conexao.Open();
>                        Conexao.Close();
>                }
>        }
> }
>
> What is wrong?
>
> Thanks.
>
> --
> Atenciosamente;
>
> Ricardo Luís Baumann
>
> gemini.richard at gmail.com
> "...'cause what you do in your life, echoes in eternity..."
> _______________________________________________
> Monodevelop-list mailing list
> Monodevelop-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/monodevelop-list
>



-- 
Rafael "Monoman" Teixeira
---------------------------------------
"I myself am made entirely of flaws, stitched together with good
intentions."
Augusten Burroughs
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/monodevelop-list/attachments/20080430/6adcfe8b/attachment.html 


More information about the Monodevelop-list mailing list