[Enter feedback here]
The RIDs is contain andorid,but no core sdk on android or cross build for it.
⚠Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.
Any feedback on this issue?
Trying to build a console with
dotnet publish -r android stankinsv2/solution/StankinsV2/Stankins.Console/Stankins.Console.csproj --self-contained true
The answer is :
NETSDK1056: Project is targeting runtime 'android' but did not resolve any runtime-specific packages. This runtime may not be supported by the target framework.
You can find azure pipeline at
https://github.com/ignatandrei/stankins/
I'm not sure if there ever was (official) android support for dotnet core, but the android RIDs have been removed from the docs in #8710.
I found the following RIDs in the runtime.json
androidandroid-armandroid-arm64android.21android.21-armandroid.21-arm64They were added at 125bc42 by merging pull request dotnet/corefx#16729 on 2017-03-07.
They were last modified at 81ba628 by merging pull request dotnet/corefx#28560 on 2018-03-30.
I tested them on .NET Core SDK 2.1.801 (Runtime 2.1.12). The result is only android and android.21 led to NETSDK1056 error; all others built successfully.
I am not able to investigate source of .NET, though there are some folders named after android in those repos.
I created a Hello World, built as android-arm64 SCD, and compared binaries.
dotnet new console
dotnet publish --configuration Release --runtime android-arm64
It's obvious that the runtime files are from linux-arm64 in package runtime.linux-arm64.Microsoft.NETCore.App, which means that android-arm64 is implemented by falling back to linux-arm64.
This should be because of the entry
{
"android-arm64": {
"#import": [
"android",
"linux-arm64"
]
}
}
With a bit more effort, I drew the RID graph
(Only officially available paths are shown)
android.21-arm -> android-arm -> linux-arm -> ...
android.21-arm64 -> android-arm64 -> linux-arm64 -> ...
linux-arm is from runtime.linux-arm.Microsoft.NETCore.Applinux-arm64 is from runtime.linux-arm64.Microsoft.NETCore.AppThe section Do I really need to add a new RID? of Runtime IDs says
Microsoft.NETCore.Platformsattempts to define all RIDs that packages may need, and as such will define RIDs for platforms that we don't actually cross compile for. This is to support higher-level packages, 3rd party packages, that may need to cross-compile for that RID.
The section RID graph of .NET Core RID Catalog | Microsoft Docs, which this issue is related to, says
When NuGet restores packages, it tries to find an exact match for the specified runtime. If an exact match is not found, NuGet walks back the graph until it finds the closest compatible system according to the RID graph.
In pull request dotnet/docs 8710 pointed out by piccaso,
jkotas said on 2018-11-13 that
I would delete the Android section here. There are no official/supported Android packages available today.
There is a similar situation in the issue dotnet/sdk#3037:
Alpine 3.9 RIDs were added in 2019-01, but not supported by all the SDK distros until 2019-04.
.NET may define RIDs for some reason but not implement them immediately.
There are still no direct official packages for Android so far.
The RIDs
android-armandroid-arm64android.21-armandroid.21-arm64are supported by fallback.
The RIDs
androidandroid.21are defined for hierarchy, but there are no packages available.
Did I miss anything? Thanks.
Most helpful comment
What I've found
I found the following RIDs in the
runtime.jsonandroidandroid-armandroid-arm64android.21android.21-armandroid.21-arm64They were added at 125bc42 by merging pull request dotnet/corefx#16729 on 2017-03-07.
They were last modified at 81ba628 by merging pull request dotnet/corefx#28560 on 2018-03-30.
I tested them on .NET Core SDK 2.1.801 (Runtime 2.1.12). The result is only
androidandandroid.21led to NETSDK1056 error; all others built successfully.I am not able to investigate source of .NET, though there are some folders named after
androidin those repos.I created a Hello World, built as
android-arm64SCD, and compared binaries.It's obvious that the runtime files are from
linux-arm64in packageruntime.linux-arm64.Microsoft.NETCore.App, which means thatandroid-arm64is implemented by falling back tolinux-arm64.This should be because of the entry
With a bit more effort, I drew the RID graph
(Only officially available paths are shown)
linux-armis fromruntime.linux-arm.Microsoft.NETCore.Applinux-arm64is fromruntime.linux-arm64.Microsoft.NETCore.AppThe section Do I really need to add a new RID? of Runtime IDs says
The section RID graph of .NET Core RID Catalog | Microsoft Docs, which this issue is related to, says
In pull request dotnet/docs 8710 pointed out by piccaso,
jkotas said on 2018-11-13 that
There is a similar situation in the issue dotnet/sdk#3037:
Alpine 3.9 RIDs were added in 2019-01, but not supported by all the SDK distros until 2019-04.
Conclusion
.NET may define RIDs for some reason but not implement them immediately.
There are still no direct official packages for Android so far.
The RIDs
android-armandroid-arm64android.21-armandroid.21-arm64are supported by fallback.
The RIDs
androidandroid.21are defined for hierarchy, but there are no packages available.
Did I miss anything? Thanks.