[Mono-devel-list] Detecting Mono

Charlie Poole cpoole at pooleconsulting.com
Sun Feb 15 14:35:20 EST 2004


Ah... much better. :-)

Charlie

> -----Original Message-----
> From: Gert Driesen [mailto:gert.driesen at pandora.be]
> Sent: Sunday, February 15, 2004 11:23 AM
> To: Charlie Poole; mono-devel-list at lists.ximian.com
> Subject: Re: [Mono-devel-list] Detecting Mono
>
>
> Charlie,
>
> For NAnt we use the following code to detect whether we're running on the
> Mono runtime :
>
> if (Type.GetType("Mono.Runtime", false) != null) {
>     // we're on Mono
>     IsMono = true;
> } else {
>     IsMono = false;
> }
>
> Hope this helps,
>
> Gert
>
> ----- Original Message -----
> From: "Charlie Poole" <cpoole at pooleconsulting.com>
> To: <mono-devel-list at lists.ximian.com>
> Sent: Sunday, February 15, 2004 8:02 PM
> Subject: [Mono-devel-list] Detecting Mono
>
>
> > Hi All,
> >
> > I'm working under Windows to develop the next release of NUnit, and I'm
> > testing under Mono as well as MS .NET.
> >
> > In order to be sure I'm running under mono in a particlular test
> execution,
> > I'm using
> > typeof( System.Object  ).Assembly.CodeBase and looking for "Mono" in the
> > path.
> >
> > This is pretty kludgy and only of course depends on the
> location in which
> > I've installed Mono.
> >
> > Any better suggestions?
> >
> > Charlie Poole
> > cpoole at pooleconsulting.org
> >
> >
> > _______________________________________________
> > Mono-devel-list mailing list
> > Mono-devel-list at lists.ximian.com
> > http://lists.ximian.com/mailman/listinfo/mono-devel-list
> >
> >
>
>





More information about the Mono-devel-list mailing list