[Mono-list] Detecting mono at runtime

Rolf Bjarne Kvinge rolflists at ya.com
Fri May 30 05:24:38 EDT 2008


Hi,

See
http://www.mono-project.com/FAQ:_Technical#How_can_I_detect_if_am_running_in
_Mono.3F

Rolf

> -----Original Message-----
> From: mono-list-bounces at lists.ximian.com [mailto:mono-list-
> bounces at lists.ximian.com] On Behalf Of Zappo
> Sent: jueves, 29 de mayo de 2008 10:56
> To: mono-list at lists.ximian.com
> Subject: [Mono-list] Detecting mono at runtime
> 
> 
> Hi all,
> 
> I'm in the process of porting a .NET app to Mono, but I need it to also
> still compile and run with the standard .NET tools. There are just a
> couple
> points in the code where I need to do something different in order to
> make
> the app work with Mono.
> 
> I'd like to be able to write something like:
> 
> if ( ThisIsMono() )
>    DoMonoCode()
> else
>    DoNormalCode()
> 
> What I'm missing is ThisIsMono - is there any way to detect whether the
> application is being run by Mono, without having to import any Mono-
> related
> library? (The app must still compile and run on a non-Mono machine). I
> dunno, some way to detect the .NET runtime version?
> 
> Sorry if the answer is trivial - I'm a Mono noob. ^^ Thanks for any
> help. :)
> --
> View this message in context: http://www.nabble.com/Detecting-mono-at-
> runtime-tp17530408p17530408.html
> Sent from the Mono - General mailing list archive at Nabble.com.
> 
> _______________________________________________
> Mono-list maillist  -  Mono-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-list
> No virus found in this incoming message.
> Checked by AVG.
> Version: 8.0.100 / Virus Database: 269.24.4/1473 - Release Date:
> 29/05/2008 19:53



More information about the Mono-list mailing list