-
Notifications
You must be signed in to change notification settings - Fork 4.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Environment.OSVersion returns the incorrect value for macOS 12 Monterey #58575
Comments
I couldn't figure out the best area label to add to this issue. If you have write-permissions please help me learn by adding exactly one area label. |
I guess it comes from runtime/src/libraries/Common/src/Interop/OSX/Interop.libobjc.cs Lines 54 to 61 in 208e377
Does this mean the .NET Runtime is not yet built "with updated SDK"? |
I couldn't figure out the best area label to add to this issue. If you have write-permissions please help me learn by adding exactly one area label. |
Tagging subscribers to this area: @dotnet/area-system-runtime Issue Details[Environment]::OSVersion.Version.ToString() should return 12.0.0. Current behavior:
Expected value:
|
This is interesting - it seems that macOS freezes the version you get depending on what SDK you build it with. Based on the code above, it seems that it's getting 10.16 from the OS. It isn't "updating its lie" as 10.17 or similar. If I tell macOS to not lie about the version, PowerShell starts working accordingly. If what I said about the version being fixed based on the SDK, then #41012 may need to be revisited. |
Can’t .NET simply set |
Since this is global the real question is what else is impacted. I'll check if we can get the real version via |
I got VM up and @vcsjones was right. 6.0 works as expeced and return 12.0 as it it should. This is probably because we use updated SDK and OS does not lie to us. |
Minimum supported versions are documented here https://github.com/dotnet/core/blob/main/os-lifecycle-policy.md 6.0 : 10.14 Highest supported macOS versions are not documented there but historically I believe we have aimed for .NET versions still in support to support the latest released macOS as generally folks upgrade macOS eagerly. @leecow is that right? |
Moved to 7.0.0 milestone to reflect that this does not affect 6.0. Even though it also won't affect 7.0.0, we'll want to service 5.0 and possibly 3.1 for this if there's enough justification, so this will be on the radar during the 7.0.0 milestone. |
Due to lack of recent activity, this issue has been marked as a candidate for backlog cleanup. It will be closed if no further activity occurs within 14 more days. Any new comment (by anyone, not necessarily the author) will undo this process. This process is part of our issue cleanup automation. |
[Environment]::OSVersion.Version.ToString() should return 12.0.0.
Current behavior:
Expected value:
The text was updated successfully, but these errors were encountered: