Avery Pennarun | 15 Oct 22:48

Using Mono.Options in MS.NET

Hi,

I just read Miguel's posting about Mono.Options being included in Mono
2.2.  I agree that Mono.Options is great; in fact, I include a copy of
it in several of the problems we've built at work.  It doesn't
particularly require mono, so it works fine under MS.NET.

There are a few other libraries in a similar vein, such as Miguel's
Mono.Terminal.

Now that Mono.Options is included in Mono 2.2, will it still be
available separately?  If not, it will be hard to build
Windows-compatible programs that use it, unless people go digging
throug the mono sources and extracting the libraries they like.  I
think it might be helpful to separate "mono libraries that add
functionality to any .Net application" and "mono libraries that
implement the MS class library" into two different projects.

Am I missing something?

Thanks,

Avery
Daniel Morgan | 15 Oct 17:40
Favicon

Interactive C# - running a script

I would like to use the csharp interactive shell to run a script file.  

Is this possible?

Here is an example (not tested):

linux$ cat script-file > csharp
Connecting...
Copying...
Done.
linux$

Example script (not tested):

LoadLibrary("System.Data.dll");
LoadLibrary("System.Data.OracleClient");
using System.Data;
using System.Data.SqlClient;
using System.Data.OracleClient;
Console.WriteLine("Connecting...");
SqlConnection sourcedb = SqlConnection("...");
sourcedb.Open();
SqlCommand sourceCmd = sourcedb.CreateCommand();
sourceCmd.CommandText = "SELECT somecolumn FROM sometable WHERE C = 'A'";
string value = (string) sourceCmd.ExecuteScalar();
OracleConnection targetdb = OracleConnection("...");
targetdb.Open();
Console.WriteLine("Copying...");
OracleCommand targetCmd = targetdb.CreateCommand();
targetCmd.CommandText = "INSERT INTO sometable (column1) VALUES ('" + value + "')";
(Continue reading)

FirstName LastName | 15 Oct 13:41
Favicon

Marshaling DateTime type

What would be the best equivalent unmanaged type (linux and windows) to use if I want to marshal a DateTime in the managed world (.NET, mono)?
 
Thanks.

_______________________________________________
Mono-devel-list mailing list
Mono-devel-list <at> lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list
Cedric Vivier | 15 Oct 08:47

[PATCH] Get back methods in the symbol files generated by SRE-using compilers

Hey all,

I've recently discovered that code generated by booc (or other
compilers using SRE [1]) cannot be conveniently debugged with the mono
debugger anymore because there is no methods information in the
generated symbol file.
It was working pre-kahalo, but when symbol writing code from SRE came
back in r105607 (Jun 11 2008) the necessary
SymbolWriter.SetMethodSourceRange method has not been implemented but
just stubbed with a "#if FIXME" englobing all body.

This patch implements SetMethodSourceRange using the new underlying
MonoSymbolWriter's API so that the symbol files generated by SRE-using
compiler are useful again.

Please review.

Regards,

[1] System.Reflection.Emit
Attachment (SymbolWriterImpl.patch): text/x-diff, 2534 bytes
_______________________________________________
Mono-devel-list mailing list
Mono-devel-list <at> lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list
mike horsley | 14 Oct 16:21

problems compiling using System.Configuration using Mono 2.0

I can use the following on MS:

System.Configuration.ConfigurationManager.AppSettings(……..)

 

This requires a reference to System.Configuration.

 

I’m trying to do the same on mono 2.0 (using the VMWARE image) but cant figure out what reference I need to give mcs to get it to compile.

 

I’ve tried “-r:System.Configuration.dll” and get the mcs error “cannot find metadata file ‘System.Configuration.dll” whereas if I use  “-r:System.Configuration.Install.dll” (having found the dlls in /user/lib/mono/2.0/) I get the mcs error “Error CS0234 the type or namespace ‘ConfigurationManager’ does not exist in the namespace ‘System.Configuration’ are you missing an assembly reference?

 

I can use the legacy mode ConfigurationSettings.AppSettings but this then means I have 2 variants of code (one for Windows, one for Linux)

 

Any help appreciated!

Mike

 

_______________________________________________
Mono-devel-list mailing list
Mono-devel-list <at> lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list
Andoni Morales | 13 Oct 21:48

Dll not found when deploying a mono app into a different machine

Hi,

I'm having a very strange problem on Windows....
I've created a multimedia player based on GStreamer an Gtk that runs both on Windows and Linux. The GStreamer backend is written in C and wrapped to C# using the GAPI tools, importing my own dll called libcesarplayer.dll.
I compile and link libcesaplayer.dll on windows (I've tried both Mingw and MSVC) and all works well.
But.... If I try to run my app in my laptop, for example, I got a DllNotFoundException. So, it just works in the computer I used to compile libcesarplayer.dll.
Do I have to compile it in a special way?
Any suggestion?

Thanks
_______________________________________________
Mono-devel-list mailing list
Mono-devel-list <at> lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list
Everaldo Canuto | 13 Oct 18:58

Re: About DllNotFountExeption

Hey,

Problem still remain after install lidgdiplus and run ldconfig ?

Everaldo.

On Mon, Oct 13, 2008 at 2:48 PM, Petit Eric <surfzoid <at> gmail.com> wrote:
Le 13 octobre 2008 18:29, Everaldo Canuto <ecanuto <at> gmail.com> a écrit :
> Hey,
>
> Do you have libgdiplus package installed ?
I think so, too
urpmi -a libgdiplus
apt-get libgdiplus
wget http://anonsvn.mono-project.com/viewvc/trunk/libgdiplus.tar.gz
tar -xf ./libgdiplus.tar.gz
cd libgdiplus
./configure --prefix=/usr && make
su
make install
lol ;-)

>
> Everaldo.
>
>
> _______________________________________________
> Mono-devel-list mailing list
> Mono-devel-list <at> lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-devel-list
>
>



--

Cordially.

Small Eric Quotations of the days:
---------------------------------------------------------------------------
If one day one reproaches you that your work is not a work of
professional, say you that:
Amateurs built the arch of Noah, and professionals the Titanic.
---------------------------------------------------------------------------

Few people are done for independence, it is the privilege of the powerful ones.
---------------------------------------------------------------------------

No key was wounded during the drafting of this message.

_______________________________________________
Mono-devel-list mailing list
Mono-devel-list <at> lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list
Everaldo Canuto | 13 Oct 18:29

Re: About DllNotFountExeption

Hey,

Do you have libgdiplus package installed ?

Everaldo.

_______________________________________________
Mono-devel-list mailing list
Mono-devel-list <at> lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list
Hubert FONGARNAND | 13 Oct 17:15

Mono 2.0 defeat story...

Hi,

    A week ago, i tried to upgrade my mono server from 1.2.6 to the new
2.0 mono version. Bad idea...
We use a custom CMS written in C#, it use to work well with 1.2.6
version.

We had test mono 2.0 on our beta platform since a month and we had no
big problems... But on production servers, the environnment is often
different (multi-processor systems, much more users...). I was confident
with mono 2.0 as it was supposed to be well tested by novell...

The upgrade was really a pain, because we have found at least two bugs
in mono :

https://bugzilla.novell.com/show_bug.cgi?id=433908
https://bugzilla.novell.com/show_bug.cgi?id=434305

These bugs prevent our CMS app to run correctly on mono... In addition
to these bugs we experienced a big memory leak with our mod-mono-server
(it use to take ~60Mb (RSS) with mono 1.2.6, with mono 2.0 it was
growing up to 3Go). So this week end we had some "out of memory"
crash... 
In addition to this memory leak, the website was slowing down... When i
start the mod-mono-server process, the web site speed is good
(~900ms/req) and it was 
getting worse and worse as time... (15s/req) 

This morning i downgrade to 1.9.1 in hope that it would solve my
problems... it solves the two first bugs problems (#433908, #434305);
but not my memory leak problem

So the last thing to do was to revert to the good one 1.2.6... and my
speed and memory problems went away!!!
I hope we could upgrade to mono 2.0 when it becomes more stable! I'm
ready to help mono guys to trac these problems.

best wishes
Hubert FONGARNAND
FIDUCIAL

PS: we already run 1.9.1 on our intranet without any memory leaks
problems, but we don't use our CMS
PS : we run in a load balancing environnement, i've downgraded on only
one server... and keep the other one offline in mono 2.0 to do some
tests...

_________________________________________________

Ce message et les éventuels documents joints peuvent contenir des informations confidentielles.
Au cas où il ne vous serait pas destiné, nous vous remercions de bien vouloir le supprimer et en aviser
immédiatement l'expéditeur. Toute utilisation de ce message non conforme à sa destination, toute
diffusion ou publication, totale ou partielle et quel qu'en soit le moyen est formellement interdite.
Les communications sur internet n'étant pas sécurisées, l'intégrité de ce message n'est pas
assurée et la société émettrice ne peut être tenue pour responsable de son contenu.
_______________________________________________
Mono-devel-list mailing list
Mono-devel-list <at> lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list
Michael Barker | 13 Oct 03:36

Fwd: [PATCH] System.Messaging using AMQP (RabbitMQ)

Forgot to CC the list.

---------- Forwarded message ----------
From: Michael Barker <mike <at> middlesoft.co.uk>
Date: Sun, Oct 12, 2008 at 5:46 PM
Subject: Re: [Mono-dev] [PATCH] System.Messaging using AMQP (RabbitMQ)
To: Atsushi Eno <atsushi <at> ximian.com>

Hi,

I have updated the bug report
(https://bugzilla.novell.com/show_bug.cgi?id=432471) to include a
first cut of MessageEnumerators.  It does seem to work, originally I
though that an AMQP Ack would acknowledge all messages up to that
point, but that does not seem to be the case, so I can implement the
System.Messaging behaviour reasonably well.

> Well, I'm rather afraid of having Mono.Messaging base API dependent
> on Rabbit (by "dependent" I don't mean that Mono.Messaging.dll has
> reference to Mono.Messaging.RabbitMQ.dll). AMQP solution might not
> be chosen if it lacks significant functionality, but that does not
> mean it is no-go. If Rabbit based implementation does not work here,
> I rather assume nothing would work fine here ;)

I would be useful if you could describe what you mean by dependent?
I'm assuming that you're referring to the design of the API.  I've
tried hard to avoid designing Mono.Messaging based on the RabbitMQ
bindings.  The majority of it is direct delegation from the
System.Messaging library (expect for the parts that don't need to
happen in Messaging implementation, e.g. formatting), so the
Mono.Messaging is more dependent on that library.

Also I think that Mono.Messaging should be considered only as an SPI,
not an API.  Anyone writing an application requiring a brand new
application should either use System.Messaging or the messaging API
for the bus that are interested in using.  That way we will only have
a single client of Mono.Messaging (i.e. System.Messaging) making it
reasonably easy to change as required, assuming that most of the
implementations of Mono.Messaging are included in the mono build.

RE: AMQP, If its of any use here are a list of the main features and
how they can be supported:

Supported easily through the standard:
- Basic Messaging Send/Receive
- Message Listeners
- Transactions

Supported with a couple jumps through hoops:
- Peek() (may be better supported through queue browsers later on)
- Message Enumerators

Supported only with custom extensions to the server:
- {Receive,Peek}By{Id,CorrelationId,..}

Supported only with later potential protocol updates:
- Queue discovery

If you have some good ideas about how System.Messaging should be
implemented, send them through.

Regards,
Michael Barker.
Andreas Färber | 12 Oct 21:03

Fwd: mono 2.0, solaris x86, bootstrap


> Here's my Solaris 10 build environment:
>
> PATH=/usr/local/bin:/opt/gdb/bin:/opt/mono/bin:/opt/sfw/bin:/opt/sfw/ 
> sbin:/usr/sfw/bin:/usr/bin:/usr/dt/bin:/usr/openwin/bin
> export PATH
> export MAKE=gmake
> export AR=gar
> export STRIP=gstrip
> export RANLIB=granlib
> export AS=gas

Note: /opt/gdb is a self-compiled amd64 GDB - not needed for  
bootstrapping.
Some GNU packages from the Companion CD are used here, Subversion  
comes from sunfreeware.com.

> x86:
>
> GC_PREFIX=/opt/mono-gc7.0
> ../gc-7.0/configure --prefix=$GC_PREFIX CC=gcc MAKE=gmake AR=gar  
> RANLIB=granlib STRIP=gstrip AS=gas INSTALL=/usr/ucb/install
>
> ../mono/configure --prefix=/opt/mono --with-tls=pthread --with- 
> sigaltstack=no --with-gc=boehm --enable-dtrace \
> CC=gcc MAKE=gmake AR=gar RANLIB=granlib STRIP=gstrip AS=gas INSTALL=/ 
> usr/ucb/install \
> CPPFLAGS=-I/opt/mono-gc7.0/include LDFLAGS=-L/opt/mono-gc7.0/lib
>
> amd64:
>
> export LD_LIBRARY_PATH=/usr/sfw/lib/amd64:$LD_LIBRARY_PATH
> GC_PREFIX=/opt/mono-gc7.0
> ../gc-7.0/configure --prefix=$GC_PREFIX --libdir=$GC_PREFIX/lib/ 
> amd64 CC=gcc CFLAGS=-m64 MAKE=gmake AR=gar RANLIB=granlib  
> STRIP=gstrip CCAS=gas CCASFLAGS=-64 INSTALL=/usr/ucb/install
>
> export LD_LIBRARY_PATH=/usr/sfw/lib/amd64:$LD_LIBRARY_PATH
> MONO_PREFIX=/opt/mono
> ../mono/configure --prefix=$MONO_PREFIX --bindir=$MONO_PREFIX/bin/ 
> amd64 --libdir=$MONO_PREFIX/lib/amd64 --with-tls=pthread --with- 
> sigaltstack=no --with-gc=boehm --disable-mcs-build CC="gcc -m64"  
> MAKE=gmake AR=gar RANLIB=granlib STRIP=gstrip AS="gas -64" INSTALL=/ 
> usr/ucb/install CPPFLAGS=-I/opt/mono-gc7.0/include LDFLAGS=-L/opt/ 
> mono-gc7.0/lib/amd64 PKG_CONFIG_PATH=/usr/lib/amd64/pkgconfig:/opt/ 
> mono-gc7.0/lib/amd64/pkgconfig
>
> Just quickly grabbed my scripts, didn't try HEAD, but it was likely  
> something in the 1.9 range.

... more precisely, it was what my DTrace patch was tested on.

HTH,
Andreas

Gmane