[Mono-devel-list] problem with paths for assemblies (mono 1.0, mod-mono-server 1.0)

Maciej Liżewski Maciej.Lizewski at 3-e.pl
Fri Jul 9 04:25:46 EDT 2004


 I have problem with Mono ASP.NET: the code below doesn't work...

 using System;
using System.Web;
using System.Web.Services;
using System.Web.Services.Protocols;
using System.Data;
using Mono.Data;
using ByteFX.Data.MySqlClient;

namespace MyWS

    public class WS : System.Web.Services.WebService
        public WS()
        private void InitializeComponent()

        public DataSet GetPG()
            System.Data.DataSet ds = new System.Data.DataSet();
            string connectionString =
                "Server=localhost;" +
                "Database=db;" +
                "User ID=dbuser;" +
                System.Data.IDbConnection dbcon;
                dbcon = new MySqlConnection(connectionString);
                ds = Mono.Data.DataTools.FillDataSet(dbcon, "select * from
                return ds;

It shows error:
Error message: /tmp/86123.cs(9,0) : error CS0246: The namespace
`ByteFX.Data.MySqlClient' can not be found (missing assembly reference?)
(0,0) : error failed: 1 error(s), 0 warnings

The assembly is in: /usr/local/lib/mono/1.0/

Is there some way to set search path, and the default setting is incorrect?
I have another problem with executables - mcs compiles the source without
errors, but the runtime framework (mono) shows:

#>mono test.exe

Could not find assembly Mono.Data, references from /root/mono/test.exe
     Major/Minor: 0,0
     Build:       0,0

cannot open assembly test.exe

the assembly is in the default directory. When I put a copy of Mono.Data.dll
to the directory where I run the test - everything works ok. Again - maybe
this is some problem with search paths?
MONO_PATH isn't set, so the framework should use default path (EPREFIX=/usr/


More information about the Mono-devel-list mailing list