[Mono-devel-list] Check whether an app is running on Mono (wasRe: [Mono-patches] mcs/class/corlib/Mono ChangeLog,1.1,NONERuntime.cs,1.2,NONE)

Gert Driesen gert.driesen at pandora.be
Fri May 14 04:01:09 EDT 2004


----- Original Message -----
From: <vladimir at pobox.com>
To: "Gert Driesen" <gert.driesen at pandora.be>
Cc: <vladimir at pobox.com>; "Gonzalo Paniagua Javier" <gonzalo at ximian.com>;
"Mono Development" <mono-devel-list at lists.ximian.com>
Sent: Friday, May 14, 2004 10:20 AM
Subject: Re: [Mono-devel-list] Check whether an app is running on Mono
(wasRe: [Mono-patches] mcs/class/corlib/Mono
ChangeLog,1.1,NONERuntime.cs,1.2,NONE)


> On Fri, May 14, 2004 at 09:43:18AM +0200, Gert Driesen wrote:
> >
> > > I've been using System.Environment.OSVersion.Platform for this, e.g.:
> > > if (Environment.OSVersion.Platform == (PlatformID) 128) {
> > > /* Unix, persumably Mono */
> > > } else {
> > > /* MS-land, can check for specific PlatformIDs */
> > > }
> >
> > As indicated by your code, this just checks whether your app is running
on
> > unix.  It doesn't tell you anything about the runtime on which your app
is
> > executing.
>
> Wait, you mean there are other usable ECMA runtimes for Unix-esque OS's?
;)

What I meant to say was that this doesn't tell you anything about the
runtime on Windows, as your app can be running on Mono/Windows too ...

And yes, you might ofcourse be running on Rotor (but I'm not sure what
PlatformID Rotor uses); but well ...

Gert



More information about the Mono-devel-list mailing list