-
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
Change Environment.OSVersion to return actual OS version on macOS #34977
Comments
I don' know (or recall) why mono returns the Darwin kernel version number (and did not know this was the same for dotnet). It is not very user/developer friendly. However the runtime code is identical for macOS, iOS, tvOS and watchOS. If we break this to return the macOS version (like |
My guess we tried to match Apple's terminoplogy:
In this case, |
@wfurt The SDK themselves do offer other API to get and compare the "marketing" versions. |
With the proposal #33331, it is going to be super inconsistent if |
I think it's better (and a good time) to fix this inconsistency :) But TBH this situation has existed since forever and rarely comes up in issues (I can't recall any for iOS/macOS SDK). I think the existing API (similar to the proposed ones) makes it easy to check for features/API that (almost) no one ever used |
Note that this issue isn't just about mobile. In the dotnet/sdk we have to work around this issue in order to return the actual OS version when running See |
* Return the correct OSVersion on OSX like systems. Fix #34977 * Rename files to not have Linux when they aren't Linux specific. * Assert OSVersion Build number is valid. * PR feedback Move interop code to Common\src\Interop. Specify the full path to libobjc.dylib. Fix objc_msgSend_stret for ARM64. * Specify full path to libproc.dylib. Fix #24095
* Update dependencies from https://github.com/dotnet/runtime build 20200507.11 - System.CodeDom: 5.0.0-preview.5.20253.7 -> 5.0.0-preview.5.20257.11 - Microsoft.NET.HostModel: 5.0.0-preview.5.20253.7 -> 5.0.0-preview.5.20257.11 - Microsoft.Extensions.DependencyModel: 5.0.0-preview.5.20253.7 -> 5.0.0-preview.5.20257.11 - Microsoft.NETCore.App.Runtime.win-x64: 5.0.0-preview.5.20253.7 -> 5.0.0-preview.5.20257.11 - Microsoft.NETCore.DotNetHostResolver: 5.0.0-preview.5.20253.7 -> 5.0.0-preview.5.20257.11 - Microsoft.NETCore.App.Ref: 5.0.0-preview.5.20253.7 -> 5.0.0-preview.5.20257.11 - System.Security.Cryptography.ProtectedData: 5.0.0-preview.5.20253.7 -> 5.0.0-preview.5.20257.11 - System.Text.Encoding.CodePages: 5.0.0-preview.5.20253.7 -> 5.0.0-preview.5.20257.11 - System.Resources.Extensions: 5.0.0-preview.5.20253.7 -> 5.0.0-preview.5.20257.11 * Update dependencies from https://github.com/dotnet/runtime build 20200508.3 - System.CodeDom: 5.0.0-preview.5.20253.7 -> 5.0.0-preview.5.20258.3 - Microsoft.NET.HostModel: 5.0.0-preview.5.20253.7 -> 5.0.0-preview.5.20258.3 - Microsoft.Extensions.DependencyModel: 5.0.0-preview.5.20253.7 -> 5.0.0-preview.5.20258.3 - Microsoft.NETCore.App.Runtime.win-x64: 5.0.0-preview.5.20253.7 -> 5.0.0-preview.5.20258.3 - Microsoft.NETCore.DotNetHostResolver: 5.0.0-preview.5.20253.7 -> 5.0.0-preview.5.20258.3 - Microsoft.NETCore.App.Ref: 5.0.0-preview.5.20253.7 -> 5.0.0-preview.5.20258.3 - System.Security.Cryptography.ProtectedData: 5.0.0-preview.5.20253.7 -> 5.0.0-preview.5.20258.3 - System.Text.Encoding.CodePages: 5.0.0-preview.5.20253.7 -> 5.0.0-preview.5.20258.3 - System.Resources.Extensions: 5.0.0-preview.5.20253.7 -> 5.0.0-preview.5.20258.3 * Update dependencies from https://github.com/dotnet/runtime build 20200509.5 - System.CodeDom: 5.0.0-preview.5.20253.7 -> 5.0.0-preview.5.20259.5 - Microsoft.NET.HostModel: 5.0.0-preview.5.20253.7 -> 5.0.0-preview.5.20259.5 - Microsoft.Extensions.DependencyModel: 5.0.0-preview.5.20253.7 -> 5.0.0-preview.5.20259.5 - Microsoft.NETCore.App.Runtime.win-x64: 5.0.0-preview.5.20253.7 -> 5.0.0-preview.5.20259.5 - Microsoft.NETCore.DotNetHostResolver: 5.0.0-preview.5.20253.7 -> 5.0.0-preview.5.20259.5 - Microsoft.NETCore.App.Ref: 5.0.0-preview.5.20253.7 -> 5.0.0-preview.5.20259.5 - System.Security.Cryptography.ProtectedData: 5.0.0-preview.5.20253.7 -> 5.0.0-preview.5.20259.5 - System.Text.Encoding.CodePages: 5.0.0-preview.5.20253.7 -> 5.0.0-preview.5.20259.5 - System.Resources.Extensions: 5.0.0-preview.5.20253.7 -> 5.0.0-preview.5.20259.5 * Update dependencies from https://github.com/dotnet/runtime build 20200510.5 - System.CodeDom: 5.0.0-preview.5.20253.7 -> 5.0.0-preview.5.20260.5 - Microsoft.NET.HostModel: 5.0.0-preview.5.20253.7 -> 5.0.0-preview.5.20260.5 - Microsoft.Extensions.DependencyModel: 5.0.0-preview.5.20253.7 -> 5.0.0-preview.5.20260.5 - Microsoft.NETCore.App.Runtime.win-x64: 5.0.0-preview.5.20253.7 -> 5.0.0-preview.5.20260.5 - Microsoft.NETCore.DotNetHostResolver: 5.0.0-preview.5.20253.7 -> 5.0.0-preview.5.20260.5 - Microsoft.NETCore.App.Ref: 5.0.0-preview.5.20253.7 -> 5.0.0-preview.5.20260.5 - System.Security.Cryptography.ProtectedData: 5.0.0-preview.5.20253.7 -> 5.0.0-preview.5.20260.5 - System.Text.Encoding.CodePages: 5.0.0-preview.5.20253.7 -> 5.0.0-preview.5.20260.5 - System.Resources.Extensions: 5.0.0-preview.5.20253.7 -> 5.0.0-preview.5.20260.5 * Migrate netcoreapp5.0 => net5.0 * Update stage 0 Should support net5.0 TargetFramework * Update dependencies from https://github.com/dotnet/runtime build 20200511.9 - System.CodeDom: 5.0.0-preview.5.20253.7 -> 5.0.0-preview.5.20261.9 - Microsoft.NET.HostModel: 5.0.0-preview.5.20253.7 -> 5.0.0-preview.5.20261.9 - Microsoft.Extensions.DependencyModel: 5.0.0-preview.5.20253.7 -> 5.0.0-preview.5.20261.9 - Microsoft.NETCore.App.Runtime.win-x64: 5.0.0-preview.5.20253.7 -> 5.0.0-preview.5.20261.9 - Microsoft.NETCore.DotNetHostResolver: 5.0.0-preview.5.20253.7 -> 5.0.0-preview.5.20261.9 - Microsoft.NETCore.App.Ref: 5.0.0-preview.5.20253.7 -> 5.0.0-preview.5.20261.9 - System.Security.Cryptography.ProtectedData: 5.0.0-preview.5.20253.7 -> 5.0.0-preview.5.20261.9 - System.Text.Encoding.CodePages: 5.0.0-preview.5.20253.7 -> 5.0.0-preview.5.20261.9 - System.Resources.Extensions: 5.0.0-preview.5.20253.7 -> 5.0.0-preview.5.20261.9 * Update dependencies from https://github.com/dotnet/runtime build 20200512.14 - System.CodeDom: 5.0.0-preview.5.20253.7 -> 5.0.0-preview.6.20262.14 - Microsoft.NET.HostModel: 5.0.0-preview.5.20253.7 -> 5.0.0-preview.6.20262.14 - Microsoft.Extensions.DependencyModel: 5.0.0-preview.5.20253.7 -> 5.0.0-preview.6.20262.14 - Microsoft.NETCore.App.Runtime.win-x64: 5.0.0-preview.5.20253.7 -> 5.0.0-preview.6.20262.14 - Microsoft.NETCore.DotNetHostResolver: 5.0.0-preview.5.20253.7 -> 5.0.0-preview.6.20262.14 - Microsoft.NETCore.App.Ref: 5.0.0-preview.5.20253.7 -> 5.0.0-preview.6.20262.14 - System.Security.Cryptography.ProtectedData: 5.0.0-preview.5.20253.7 -> 5.0.0-preview.6.20262.14 - System.Text.Encoding.CodePages: 5.0.0-preview.5.20253.7 -> 5.0.0-preview.6.20262.14 - System.Resources.Extensions: 5.0.0-preview.5.20253.7 -> 5.0.0-preview.6.20262.14 * Fix macOS version test, now that dotnet/runtime#34977 is fixed. Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com> Co-authored-by: Eric Erhardt <eric.erhardt@microsoft.com> Co-authored-by: Daniel Plaisted <dsplaisted@gmail.com>
Now that dotnet/runtime#34977 and dotnet/runtime#33643 are fixed, Environment.OSVersion returns the correct version for Windows and macOS.
Similar to #33643, but for macOS (or OSX). We are now returning an understandable version for Windows 10 (ex.
10.0.18363.0
), we should start returning understandable versions for macOS.Today if I run:
On my macOS Mojave computer it says
18.7.0.0
. But the "About This Mac" window says10.14.6
.We should change
OSVersion.Version
to return10.14.6
instead.The text was updated successfully, but these errors were encountered: