Bug 6153 - Environment.OSVersion.PlatformID is Unix on MacOSX
Summary: Environment.OSVersion.PlatformID is Unix on MacOSX
Status: RESOLVED DUPLICATE of bug 5453
Alias: None
Product: Runtime
Classification: Mono
Component: Interop ()
Version: unspecified
Hardware: PC Mac OS
: --- normal
Target Milestone: ---
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2012-07-17 06:54 UTC by Attila Tamás Zimler
Modified: 2012-07-17 06:56 UTC (History)
3 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on GitHub or Developer Community with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED DUPLICATE of bug 5453

Description Attila Tamás Zimler 2012-07-17 06:54:28 UTC
The operating system's platform id is returned as Unix, however an enumeration value of MacOSX exists in the PlatformID enumeration.

With version of Mono Runtime:
	Mono 2.10.9 (tarball Mon May  7 20:25:51 EDT 2012)
	GTK 2.24.10
	GTK# (2.12.0.0)
	Package version: 210090011


On MacOSX Lion the following code snippet gives "Not MacOSX":


if (Environment.OSVersion.Platform == PlatformID.MacOSX)
{
	Console.WriteLine("MacOSX");
}
else
{
	Console.WriteLine("Not MacOSX");
}
Comment 1 Rolf Bjarne Kvinge [MSFT] 2012-07-17 06:56:38 UTC
See https://bugzilla.xamarin.com/show_bug.cgi?id=5453#c1 for a thorough explanation of why it's like this.

*** This bug has been marked as a duplicate of bug 5453 ***