Hi Marc, MS added a MacOSX value to the PlatformID enumeration in .NET 3.5 SP1 / .NET 2.0 SP2, but I don't think Mono supports this yet.
Adding support for the MacOSX value may actually break existing applications - and even our our class libraries / unit tests.- on MacOSX. A lot of code actually (wrongly) assumes that - if the platform is not Unix - they're running on Windows. Gert From: Marc Glenn Sent: Tuesday, September 23, 2008 8:01 AM To: Vladislav Rastrusny Cc: [email protected] Subject: Re: [Mono-list] Reliable OS identification on Mono Hi. You can use a condition statement like this. if(System.Environment.OSVersion.Platform == PlatformID.Unix) Here is the link to the Mono API: http://www.go-mono.com/docs/index.aspx?link=T%3aSystem.OperatingSystem%2f* However, I can't find a way to check if its in MAC. Hope this helps, Marc Glenn Vladislav Rastrusny wrote: Hello. Is there a way to reliably determine OS, application is running on in Mono? My application needs to access files of some external application (also multiplatform) and those files are located in different places depending on OS. On Windows it is under ApplicationData, on Linux under /home/user/app and on MacOS... I don't know ;) Never installed it. Thanks in advance. _______________________________________________ Mono-list maillist - [email protected] http://lists.ximian.com/mailman/listinfo/mono-list -------------------------------------------------------------------------------- _______________________________________________ Mono-list maillist - [email protected] http://lists.ximian.com/mailman/listinfo/mono-list
_______________________________________________ Mono-list maillist - [email protected] http://lists.ximian.com/mailman/listinfo/mono-list
