-
Notifications
You must be signed in to change notification settings - Fork 5.4k
Mark PlatformID.MacOSX obsolete? #18635
Copy link
Copy link
Closed
Labels
api-needs-workAPI needs work before it is approved, it is NOT ready for implementationAPI needs work before it is approved, it is NOT ready for implementationarea-System.Runtimedesign-discussionOngoing discussion about design without consensusOngoing discussion about design without consensus
Milestone
Description
Environment.OSVersion.Platform returns PlatformID.Unix on macOS instead of PlatformID.MacOSX, which is consistent with Mono's behavior.
This is already confusing for Xamarin.Mac developers and I think it's going to be confusing for .NET Core developers as well.
(I wish we hadn't added PlatformID.MacOSX for Silverlight, and just used PlatformID.Unix like Mono.)
To help mitigate the confusion, should PlatformID.MacOSX be marked as obsolete, pointing developers to use PlatformID.Unix or RuntimeInformation.IsOSPlatform(OSPlatform.OSX) instead?
And/or hidden from intellisense?
cc: @terrajobst, @KrzysztofCwalina, @weshaggard, @stephentoub
For reference:
public enum PlatformID
{
Win32S = 0,
Win32Windows = 1,
Win32NT = 2,
WinCE = 3,
Unix = 4,
Xbox = 5,
MacOSX = 6
}Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
api-needs-workAPI needs work before it is approved, it is NOT ready for implementationAPI needs work before it is approved, it is NOT ready for implementationarea-System.Runtimedesign-discussionOngoing discussion about design without consensusOngoing discussion about design without consensus