Closed as not planned
Description
Android framework version
net10.0-android (Preview)
Affected platform version
.Net 10
Description
OperatingSystem
apis which query android versions will return false when compile with NativeAOT. This includes OperatingSystem.IsAndroid
and OperatingSystem.IsAndroidVersionAtLeast
methods. Internally, native aot binaries are built target linux-bionic
so they are treated like linux binaries and not android.
Steps to Reproduce
- Build the native aot sample
- Call
OperatingSystem.IsAndroid
- Method returns false.
Did you find any workaround?
I'm able to check if running on android with RuntimeInformation.RuntimeIdentifier.StartsWith("linux-bionic-")
, and to query android version, I use Android's Build
apis. But Android's Build
api isn't available in plain .net projects.
Relevant log output
Metadata
Metadata
Assignees
Type
Projects
Status
No status