You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Environment.OSVersion returns the incorrect value for macOS 12 Monterey #58575
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.
Since this is global the real question is what else is impacted. I'll check if we can get the real version via sysctl. Also I'm not sure what is oldest version we need to support @danmoseley. Perhaps it is also time to update the SDK we use.
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.
So we should service 5.0 (and perhaps 3.1) @danmoseley but this should not impact 6.0 as far as I can tell.
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.
Activity
KalleOlaviNiemitalo commentedon Sep 1, 2021
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"?
vcsjones commentedon Sep 10, 2021
I can't reproduce this in .NET 6, I think this is something that only applies to .NET 5 and 3.1.
Both the API and and
dotnet --infoare seem correct for 6.0 on my M1 Mac.vcsjones commentedon Sep 10, 2021
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.
chucker commentedon Sep 10, 2021
Can’t .NET simply set
SYSTEM_VERSION_COMPAT = 0and get rid of the above code altogether?wfurt commentedon Sep 10, 2021
Since this is global the real question is what else is impacted. I'll check if we can get the real version via
sysctl. Also I'm not sure what is oldest version we need to support @danmoseley. Perhaps it is also time to update the SDK we use.wfurt commentedon Sep 13, 2021
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.
So we should service 5.0 (and perhaps 3.1) @danmoseley but this should not impact 6.0 as far as I can tell.
danmoseley commentedon Sep 13, 2021
Minimum supported versions are documented here
https://github.com/dotnet/core/blob/main/os-lifecycle-policy.md
6.0 : 10.14
3.1 and 5.0 : 10.13
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?
jeffhandley commentedon Sep 22, 2021
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.