-
Notifications
You must be signed in to change notification settings - Fork 532
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
[net8-pre5] Build app for android-arm fails with error NU1101: Unable to find package Microsoft.NETCore.App.Runtime.linux-bionic-arm #8170
Comments
Workaround: add this to csproj:
|
This is very similar to an old problem: #7043 I thought something like this might cause it, but it seems to work fine:
If you look at the Normally Android apps don't include this package. @steveisok @dsplaisted was there something we did in dotnet/runtime solve this before? I heard we may have introduced |
We've had mono based linux-bionic packs around for quite a long time, so it's a bit confusing why nativeaot ones would introduce problems. @akoeplinger do you know of anything in the sdk that might be getting skipped b/c it's not mono and as a result would cause this? |
.NET8 preview 5 was before the linux-bionic NativeAOT changes so that shouldn't be related. |
@tranb3r did this work with an earlier .NET 8 preview, or just .NET 7? |
I've just tested with .NET 7: it does not work either. |
@tranb3r is there a specific NuGet package in your app that triggers this problem? Project templates obviously work fine. The ones I see are: <PackageReference Include="ConfigureAwait.Fody" Version="3.3.2" PrivateAssets="All" />
<PackageReference Include="Fody" Version="6.8.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.Maui.Controls" Version="8.0.0-preview.5.8529" />
<PackageReference Include="Plugin.Maui.ScreenSecurity" Version="1.0.0" />
<PackageReference Include="Serilog.Sinks.File" Version="5.0.0" />
<PackageReference Include="Serilog.Sinks.Xamarin" Version="1.0.0" />
<PackageReference Include="Xamarin.Build.Download" Version="0.11.4" />
<PackageReference Include="Xamarin.AndroidX.Work.Runtime" Version="2.8.1.2" /> But there could be other packages from project references. |
I think I know what's going on: the project OuiBank.Core is getting restored with the |
Here's a simple repro: $ dotnet new classlib -o myLib
$ cd myLib
$ dotnet restore -r android-arm
Determining projects to restore...
/Users/alexander/dev/test/8170/myLib/myLib.csproj : error NU1101: Unable to find package Microsoft.NETCore.App.Runtime.linux-bionic-arm. No packages exist with this id in source(s): /usr/local/share/dotnet/library-packs, nuget.org
Failed to restore /Users/alexander/dev/test/8170/myLib/myLib.csproj (in 514 ms). The reason why it's using linux-bionic-arm is because the RID graph specifies it as a parent of android-arm. Not sure if the RID flowing to the library project in the original issue project is expected, @dsplaisted ? |
I would not expect the RID to flow to the library. Normally the MSBuild project reference protocol is used to (among other things) determine whether a referenced project is "RID agnostic" or not. The default logic is that if a project is not an The project reference protocol doesn't seem to have been used in this binlog. I think maybe it never applied to NuGet's project reference walk, but that didn't cause any issues until now. |
Any update? |
Is this going to be fixed? |
is android not supported on dotnet 8.0 arm Ubuntu?
Workload ID Descriptionaspire .NET Aspire SDK (Preview)
|
Android application type
.NET Android (net7.0-android, etc.)
Affected platform version
net8-pre5
Description
Building my app for android-arm, it fails with the following error:
Steps to Reproduce
Check the attached binlog
msbuild.zip
Did you find any workaround?
No response
Relevant log output
No response
The text was updated successfully, but these errors were encountered: