Skip to content

Conversation

@reynoldskr
Copy link

@reynoldskr reynoldskr commented Oct 23, 2025

Changes proposed in this request
Before .NET 10, RuntimeInformation.OSDescription called uname on *nix systems to populate itself. Now it uses a nicer way using the .NET runtime target information, that means that field no longer contains Darwin, so IsMac always returned false. This simply lets that method check for macOs as well.

Testing
I couldn't find any unit tests for this class.

Performance impact
None

@reynoldskr reynoldskr requested a review from a team as a code owner October 23, 2025 02:34
@bgavrilMS bgavrilMS requested a review from fengga October 23, 2025 10:14
@bgavrilMS
Copy link
Member

@fengga - smth for you to review

@reynoldskr
Copy link
Author

reynoldskr commented Oct 29, 2025

Hey @bgavrilMS / @fengga , any chance of a review here 🙂 ?

@reynoldskr
Copy link
Author

This is still broken BTW, and net10 is GA now

@jrr
Copy link

jrr commented Nov 25, 2025

This is a real thing blocking me from updating a project to .NET 10.

For what it's worth, here are some values from my machine:

Log.Debug("Platform: {OsVersionPlatform}", Environment.OSVersion.Platform);
Log.Debug("OSDescription: {OsDescription}", RuntimeInformation.OSDescription);
Log.Debug("Is OSX: {IsOsPlatform}", RuntimeInformation.IsOSPlatform(OSPlatform.OSX));
[22:28:40 DBG] Platform: Unix
[22:28:40 DBG] OSDescription: macOS 26.1.0
[22:28:40 DBG] Is OSX: True

(so I think you could either look for the string "macOS" (as in this PR) or call IsOSPlatform)

For comparison, here are the values from .NET 9:

[23:26:02 DBG] Platform: Unix
[23:26:02 DBG] OSDescription: Darwin 25.1.0 Darwin Kernel Version 25.1.0: Mon Oct 20 19:32:41 PDT 2025; root:xnu-12377.41.6~2/RELEASE_ARM64_T6000
[23:26:02 DBG] Is OSX: True

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants