[Mono-list] Re: Determine the name and/or kind of CLI runtimeenvironment

Todd Berman tberman at off.net
Mon May 30 14:03:12 EDT 2005


On Mon, 2005-05-30 at 14:15 +0200, Kornél Pál wrote:
> > isMono =
> >   (int)Environment.OSVersion.Platform == 128 ||  // Fw 1.1
> >   (int)Environment.OSVersion.Platform == 4;      // Fw 2.0
> >
> > I don't know how DotGNU can be detected.
> 
> Thanks, but this not what I want to detect. This detects the Operating
> System.
> But I want to detect the type of CLI (.NET Framework/Mono/Portable.NET)


The real question is why?

It seems like in general, doing capability based testing gets you futher
than checking which runtime you are on. Just isolate easy tests that can
determine if the needed functionality is there, and use those.

--Todd



More information about the Mono-list mailing list