Skip to content
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

Unable to publish .net8-android App 'Microsoft.Android.Runtime.34.android-arm64 was not downloaded' (after Release of .NET9) #9561

Open
monsterkeks opened this issue Nov 26, 2024 · 0 comments
Assignees
Labels
Area: App+Library Build Issues when building Library projects or Application projects. needs-triage Issues that need to be assigned.

Comments

@monsterkeks
Copy link

monsterkeks commented Nov 26, 2024

Android framework version

net8.0-android

Affected platform version

.NET8.0.100

Description

We're currently facing a broken GH-Actions Release-Pipeline with our .NET8-Android-App. The output of the install of the workload looks like this:

Writing install records for Visual Studio workloads: 'maui-windows, maccatalyst, ios, android, wasm-tools'
Downloading Microsoft.AspNetCore.Components.WebView.Maui.Msi.x64 (9.0.0)
Downloading Microsoft.Maui.Sdk.Msi.x64 (9.0.0)
Downloading Microsoft.Maui.Sdk.Msi.x64 (8.0.83)
Downloading Microsoft.Maui.Graphics.Msi.x64 (9.0.0)
Downloading Microsoft.Maui.Resizetizer.Msi.x64 (9.0.0)
Downloading Microsoft.Maui.Templates.net9.Msi.x64 (9.0.0)
Downloading Microsoft.Maui.Templates.net8.Msi.x64 (8.0.83)
Downloading Microsoft.Maui.Core.Msi.x64 (9.0.0)
Downloading Microsoft.Maui.Controls.Msi.x64 (9.0.0)
Downloading Microsoft.Maui.Controls.Build.Tasks.Msi.x64 (9.0.0)
Downloading Microsoft.Maui.Controls.Core.Msi.x64 (9.0.0)
Downloading Microsoft.Maui.Controls.Xaml.Msi.x64 (9.0.0)
Downloading Microsoft.Maui.Controls.Compatibility.Msi.x64 (9.0.0)
Downloading Microsoft.Maui.Essentials.Msi.x64 (9.0.0)
Downloading Microsoft.Android.Sdk.Windows.Msi.x64 (35.0.7)
Downloading Microsoft.Android.Sdk.Windows.Msi.x64 ([34](https://github.com/Arietech-GmbH/med.SR/actions/runs/12013727549/job/33491751018#step:7:35).0.145)
Downloading Microsoft.Android.Ref.35.Msi.x64 (35.0.7)
Downloading Microsoft.Android.Runtime.[35](https://github.com/Arietech-GmbH/med.SR/actions/runs/12013727549/job/33491751018#step:7:36).android-arm.Msi.x64 (35.0.7)
Downloading Microsoft.Android.Runtime.35.android-arm64.Msi.x64 (35.0.7)
Downloading Microsoft.Android.Runtime.35.android-x86.Msi.x64 (35.0.7)
Downloading Microsoft.Android.Runtime.35.android-x64.Msi.x64 (35.0.7)
Downloading Microsoft.Android.Templates.Msi.x64 (35.0.7)
Downloading Microsoft.NETCore.App.Runtime.Mono.android-arm.Msi.x64 (8.0.11)
Downloading Microsoft.NETCore.App.Runtime.Mono.android-arm64.Msi.x64 (8.0.11)
Downloading Microsoft.NETCore.App.Runtime.Mono.android-x64.Msi.x64 (8.0.11)
Downloading Microsoft.NETCore.App.Runtime.Mono.android-x86.Msi.x64 (8.0.11)
Downloading Microsoft.NET.Runtime.MonoAOTCompiler.Task.Msi.x64 (8.0.11)
Downloading Microsoft.NET.Runtime.MonoTargets.Sdk.Msi.x64 (8.0.11)
Downloading Microsoft.NETCore.App.Runtime.AOT.win-x64.Cross.android-x86.Msi.x64 (8.0.11)
Downloading Microsoft.NETCore.App.Runtime.AOT.win-x64.Cross.android-x64.Msi.x64 (8.0.11)
Downloading Microsoft.NETCore.App.Runtime.AOT.win-x64.Cross.android-arm.Msi.x64 (8.0.11)
Downloading Microsoft.NETCore.App.Runtime.AOT.win-x64.Cross.android-arm64.Msi.x64 (8.0.11)
Downloading Microsoft.NETCore.App.Runtime.Mono.android-arm.Msi.x64 (9.0.0)
Downloading Microsoft.NETCore.App.Runtime.Mono.android-arm64.Msi.x64 (9.0.0)
Downloading Microsoft.NETCore.App.Runtime.Mono.android-x64.Msi.x64 (9.0.0)
Downloading Microsoft.NETCore.App.Runtime.Mono.android-x86.Msi.x64 (9.0.0)
Downloading Microsoft.NET.Runtime.MonoAOTCompiler.Task.Msi.x64 (9.0.0)
Downloading Microsoft.NET.Runtime.MonoTargets.Sdk.Msi.x64 (9.0.0)

so we're only seeing Microsoft.Android.Runtime.35.android-xxx are installed. The dotnet publish looks like this (with ENVIRONMENT BUILD_TOOLS_VERSIONto34.0.0``):

dotnet publish 'src/ArieTech.MedSR.Client.App/ArieTech.MedSR.Client.App.csproj' -c Release -f net8.0-android --no-restore /p:RuntimeIdentifier=android-arm64 /p:AndroidPackageFormat=aab /p:ApplicationVersion='60' /p:ApplicationDisplayVersion='0.8.1.60'

which results in the following error (Microsoft.Android.Runtime.34.android-arm64 was not downloaded):

Error: C:\Program Files\dotnet\sdk\9.0.100\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Sdk.FrameworkReferenceResolution.targets(495,5): error NETSDK1112: The runtime pack for Microsoft.Android.Runtime.34.android-arm64 was not downloaded. Try running a NuGet restore with the RuntimeIdentifier 'android-arm64'. [D:\a\med.SR\med.SR\src\ArieTech.MedSR.Client.App\ArieTech.MedSR.Client.App.csproj::TargetFramework=net8.0-android]
Error: Process completed with exit code 1.
##[debug]Finishing: Publish

Steps to Reproduce

  1. Create new .NET8 based Maui App
  2. Use <PackageReference Include="Microsoft.Maui.Controls" Version="8.0.100" />
  3. Set <TargetFrameworks>net8.0-android</TargetFrameworks>
  4. Setup a GH-Actions Pipeline with yml like:
    - name: Install MAUI workload
      run: dotnet workload install maui-android

    - name: Publish
      run: dotnet publish 'src/YourFolder/YourApp.csproj' -c Release -f net8.0-android --no-restore /p:RuntimeIdentifier=android-arm64 /p:AndroidPackageFormat=aab /p:ApplicationVersion='${{github.run_number}}' /p:ApplicationDisplayVersion='${{ env.MAJOR }}.${{ env.MINOR }}.${{ env.PATCH }}.${{github.run_number}}'

Did you find any workaround?

No.
We fought for about whole working day to find a workaround for creating a new release of our .NET8-based Android-App. Things we tried:

  • Changed dotnet workload install maui-android to dotnet install maui-android --version 8.0.402
  • Changed TargetFramework to net8.0-android35.0
  • Changed ENVIRONMENT BUILD_TOOLS_VERSION to 35.0.0

Relevant log output

@monsterkeks monsterkeks added Area: App+Library Build Issues when building Library projects or Application projects. needs-triage Issues that need to be assigned. labels Nov 26, 2024
@monsterkeks monsterkeks changed the title Unable to build .net8-android App 'Microsoft.Android.Runtime.34.android-arm64 was not downloaded' (after Release of .NET9) Unable to publish .net8-android App 'Microsoft.Android.Runtime.34.android-arm64 was not downloaded' (after Release of .NET9) Nov 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: App+Library Build Issues when building Library projects or Application projects. needs-triage Issues that need to be assigned.
Projects
None yet
Development

No branches or pull requests

3 participants