-
Notifications
You must be signed in to change notification settings - Fork 1.4k
[RFC] Detecting current OS #539
Copy link
Copy link
Closed
Labels
help wantedIssues that the core team doesn't plan to work on, but would accept a PR for. Comment to claim.Issues that the core team doesn't plan to work on, but would accept a PR for. Comment to claim.triaged
Metadata
Metadata
Assignees
Labels
help wantedIssues that the core team doesn't plan to work on, but would accept a PR for. Comment to claim.Issues that the core team doesn't plan to work on, but would accept a PR for. Comment to claim.triaged
Type
Fields
Give feedbackNo fields configured for issues without a type.
MSBuild sets the
$(OS)property to OSX/Unix/Windows at runtime, which can be used in targets to determine the current OS. Butxbuildhas been using$(OS)==Unixon OSX and Linux, because of an old mono bug. And it continues to do so for compatibility reasons.It makes sense for MSBuild to follow the same, since users would want to use it with existing targets. PR #538 reverts back to that behavior. So, for non-windows case,
$(OS)property is effectively acting as aIsUnixLike. Considering it like that,$(OS)should probably have only two values now -Windows_NTandUnix.Now, I think it might be useful to be able to differentiate between
OSXand other specific unices. But maybe we should use some other (new) property for that?$(OSName)? I am not sure how the CoreCLR case is affected by this, but AFAIU, it would be in the same boat.Thoughts?