[Mono-list] Running On Platform?
robertj at gmx.net
Thu Dec 16 09:29:09 EST 2010
On 16.12.2010 14:14, Andrew Brehm wrote:
> Robert Jordan wrote:
>> On 15.12.2010 12:17, Lennie De Villiers wrote:
>>> Hi, How can I see on which platform a Mono app is running? Windows,
>>> Linux, Mac OS X?
>> Search for "How to detect the execution platform".
>> Note that Mac OS X cannot be detected this way because it's
>> treated as Unix for compatibility reasons.
> Will this ever be changed? Or asked differently, will there ever be an
> actual Mac OS X version of Mono, that includes MonoMac and returns the
> correct platform ID?
I would add an extra "case PlatformID.MacOS" to my detection
code while still handling MacOS in "case PlatformID.Unix".
For the latter I'd use Pinta's IsRunningOnMac():
More information about the Mono-list