Description
MSBuild sets the $(OS)
property to OSX/Unix/Windows at runtime, which can be used in targets to determine the current OS. But xbuild
has been using $(OS)==Unix
on 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 a IsUnixLike
. Considering it like that, $(OS)
should probably have only two values now - Windows_NT
and Unix
.
Now, I think it might be useful to be able to differentiate between OSX
and 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?