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
Microsoft.Android.Sdk.NativeAOT.targets currently rewrites the .NET SDK's KnownRuntimePack metadata for Microsoft.NETCore.App NativeAOT packs. It pins LatestRuntimeFrameworkVersion and appends android-arm to RuntimePackRuntimeIdentifiers.
This was added as an Android-side workaround because the .NET SDK did not advertise android-arm for the NativeAOT runtime pack. dotnet/sdk#55750 adds that RID to the SDK's built-in KnownRuntimePack metadata.
Once dotnet/sdk#55750 is merged and available in the SDK used by this repository, remove the workaround from src/Xamarin.Android.Build.Tasks/Microsoft.Android.Sdk/targets/Microsoft.Android.Sdk.NativeAOT.targets:
<!-- Outer restores use RuntimeIdentifiers; RuntimeIdentifier is only set in per-RID inner builds. -->
<ItemGroup>
<_AndroidNetCoreAppNativeAotKnownRuntimePackInclude="@(KnownRuntimePack->WithMetadataValue('Identity', 'Microsoft.NETCore.App')->WithMetadataValue('RuntimePackLabels', 'NativeAOT'))" />
<KnownRuntimePackRemove="@(_AndroidNetCoreAppNativeAotKnownRuntimePack)" />
<KnownRuntimePackInclude="@(_AndroidNetCoreAppNativeAotKnownRuntimePack)">
<LatestRuntimeFrameworkVersion>$(MicrosoftNETCoreAppRefPackageVersion)</LatestRuntimeFrameworkVersion>
<RuntimePackRuntimeIdentifiers>%(RuntimePackRuntimeIdentifiers);android-arm</RuntimePackRuntimeIdentifiers>
</KnownRuntimePack>
</ItemGroup>
Remove the Android-side KnownRuntimePack override above.
Restore a NativeAOT Android project with RuntimeIdentifiers=android-arm.
Verify project.assets.json selects Microsoft.NETCore.App.Runtime.NativeAOT.android-arm and does not fall back to Microsoft.NETCore.App.Runtime.NativeAOT.linux-bionic-arm.
Did you find any workaround?
Keep the existing Android-side override until the updated SDK is available.
Android framework version
net11.0-android (Preview)
Affected platform version
.NET 11 SDK containing dotnet/sdk#55750
Description
Microsoft.Android.Sdk.NativeAOT.targetscurrently rewrites the .NET SDK'sKnownRuntimePackmetadata forMicrosoft.NETCore.AppNativeAOT packs. It pinsLatestRuntimeFrameworkVersionand appendsandroid-armtoRuntimePackRuntimeIdentifiers.This was added as an Android-side workaround because the .NET SDK did not advertise
android-armfor the NativeAOT runtime pack. dotnet/sdk#55750 adds that RID to the SDK's built-inKnownRuntimePackmetadata.Once dotnet/sdk#55750 is merged and available in the SDK used by this repository, remove the workaround from
src/Xamarin.Android.Build.Tasks/Microsoft.Android.Sdk/targets/Microsoft.Android.Sdk.NativeAOT.targets:Context: #12356 (comment)
Steps to Reproduce
KnownRuntimePackoverride above.RuntimeIdentifiers=android-arm.project.assets.jsonselectsMicrosoft.NETCore.App.Runtime.NativeAOT.android-armand does not fall back toMicrosoft.NETCore.App.Runtime.NativeAOT.linux-bionic-arm.Did you find any workaround?
Keep the existing Android-side override until the updated SDK is available.
Relevant log output
N/A