[Mono-devel-list] problem with paths for assemblies (mono 1.0, mod-mono-server 1.0)
Maciej Liżewski
krycek at 3-e.pl
Fri Jul 9 04:28:57 EDT 2004
Hi,
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
{
[System.Web.Services.WebService(Namespace="http://3-e.pl/")]
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;" +
"Password=dbpass;";
System.Data.IDbConnection dbcon;
dbcon = new MySqlConnection(connectionString);
dbcon.Open();
ds = Mono.Data.DataTools.FillDataSet(dbcon, "select * from
document");
dbcon.Close();
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
(assemblyref_index=3)
Major/Minor: 0,0
Build: 0,0
Token:
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/
local)
TIA
Maciek
More information about the Mono-devel-list
mailing list