Skip to content

[Android] Error compiling in release mode #90030

Closed

Description

@evertefeuille

Description

Error when I compile in release mode a new or existing maui project for Android.

https://github.com/dotnet/maui/assets/22406408/e2177da3-62a5-43a0-97f6-eb9da9b62889

Steps to Reproduce

  1. Create a new maui app
  2. Switch to release mode and rebuild the app
  3. Same error on existing projects
  4. Same error on a coworker computer

Link to public reproduction project repository

No response

Version with bug

Installed Workload Id Manifest Version Installation Source

maui-ios 7.0.86/7.0.100 VS 17.6.33829.357
maccatalyst 16.4.7067/7.0.100 VS 17.6.33829.357
maui-android 7.0.86/7.0.100 VS 17.6.33829.357
ios 16.4.7067/7.0.100 VS 17.6.33829.357
maui-windows 7.0.86/7.0.100 VS 17.6.33829.357
maui-maccatalyst 7.0.86/7.0.100 VS 17.6.33829.357
android 33.0.46/7.0.100 VS 17.6.33829.357
wasm-tools 7.0.9/7.0.100 VS 17.6.33829.357

Last version that worked well

Unknown/Other

Affected platforms

Android

Affected platform versions

Android 10 and up

Did you find any workaround?

No

Relevant log output

Rebuild started...
1>------ Rebuild All started: Project: MauiApp3, Configuration: Release Any CPU ------
Restored C:\Donnees\Projets\MauiApp3\MauiApp3\MauiApp3.csproj (in 433 ms).
1>MauiApp3 -> C:\Donnees\Projets\MauiApp3\MauiApp3\bin\Release\net7.0-android\MauiApp3.dll
1>Optimizing assemblies for size may change the behavior of the app. Be sure to test after publishing. See: https://aka.ms/dotnet-illink
1>Optimizing assemblies for size. This process might take a while.
1>Optimizing assemblies for size may change the behavior of the app. Be sure to test after publishing. See: https://aka.ms/dotnet-illink
1>Optimizing assemblies for size. This process might take a while.
1>Optimizing assemblies for size may change the behavior of the app. Be sure to test after publishing. See: https://aka.ms/dotnet-illink
1>Optimizing assemblies for size may change the behavior of the app. Be sure to test after publishing. See: https://aka.ms/dotnet-illink
1>Optimizing assemblies for size. This process might take a while.
1>Optimizing assemblies for size. This process might take a while.
1>[1/73] Microsoft.Extensions.Configuration.Abstractions.dll -> Microsoft.Extensions.Configuration.Abstractions.dll.so
1>[1/73] Microsoft.Extensions.Configuration.dll -> Microsoft.Extensions.Configuration.dll.so
1>[1/73] Microsoft.Extensions.Configuration.dll -> Microsoft.Extensions.Configuration.dll.so
1>[1/73] Microsoft.Extensions.Configuration.dll -> Microsoft.Extensions.Configuration.dll.so
1>[2/73] Microsoft.Extensions.Options.dll -> Microsoft.Extensions.Options.dll.so
1>[3/73] Microsoft.Extensions.Primitives.dll -> Microsoft.Extensions.Primitives.dll.so
1>[4/73] Microsoft.Extensions.DependencyInjection.Abstractions.dll -> Microsoft.Extensions.DependencyInjection.Abstractions.dll.so
1>[5/73] Microsoft.Extensions.Logging.Abstractions.dll -> Microsoft.Extensions.Logging.Abstractions.dll.so
1>[6/73] Microsoft.Extensions.Configuration.dll -> Microsoft.Extensions.Configuration.dll.so
1>[7/73] Microsoft.Extensions.DependencyInjection.dll -> Microsoft.Extensions.DependencyInjection.dll.so
1>[8/73] Microsoft.Extensions.Logging.dll -> Microsoft.Extensions.Logging.dll.so
1>[2/73] Microsoft.Extensions.Configuration.Abstractions.dll -> Microsoft.Extensions.Configuration.Abstractions.dll.so
1>[2/73] Microsoft.Extensions.Configuration.Abstractions.dll -> Microsoft.Extensions.Configuration.Abstractions.dll.so
1>[2/73] Microsoft.Extensions.Configuration.Abstractions.dll -> Microsoft.Extensions.Configuration.Abstractions.dll.so
1>[9/73] Xamarin.AndroidX.Activity.dll -> Xamarin.AndroidX.Activity.dll.so
1>[10/73] Xamarin.AndroidX.AppCompat.AppCompatResources.dll -> Xamarin.AndroidX.AppCompat.AppCompatResources.dll.so
1>[11/73] Xamarin.AndroidX.Collection.dll -> Xamarin.AndroidX.Collection.dll.so
1>[12/73] Xamarin.AndroidX.Core.dll -> Xamarin.AndroidX.Core.dll.so
1>[13/73] Xamarin.AndroidX.CardView.dll -> Xamarin.AndroidX.CardView.dll.so
1>[14/73] Xamarin.AndroidX.CoordinatorLayout.dll -> Xamarin.AndroidX.CoordinatorLayout.dll.so
1>[15/73] Microsoft.Maui.Graphics.dll -> Microsoft.Maui.Graphics.dll.so
1>[3/73] Microsoft.Extensions.DependencyInjection.dll -> Microsoft.Extensions.DependencyInjection.dll.so
1>[3/73] Microsoft.Extensions.DependencyInjection.dll -> Microsoft.Extensions.DependencyInjection.dll.so
1>[16/73] Xamarin.AndroidX.AppCompat.dll -> Xamarin.AndroidX.AppCompat.dll.so
1>[3/73] Microsoft.Extensions.DependencyInjection.dll -> Microsoft.Extensions.DependencyInjection.dll.so
1>[17/73] Xamarin.AndroidX.CursorAdapter.dll -> Xamarin.AndroidX.CursorAdapter.dll.so
1>[18/73] Xamarin.AndroidX.Lifecycle.Common.dll -> Xamarin.AndroidX.Lifecycle.Common.dll.so
1>[19/73] Xamarin.AndroidX.Lifecycle.ViewModel.dll -> Xamarin.AndroidX.Lifecycle.ViewModel.dll.so
1>[4/73] Microsoft.Extensions.DependencyInjection.Abstractions.dll -> Microsoft.Extensions.DependencyInjection.Abstractions.dll.so
1>[4/73] Microsoft.Extensions.DependencyInjection.Abstractions.dll -> Microsoft.Extensions.DependencyInjection.Abstractions.dll.so
1>[4/73] Microsoft.Extensions.DependencyInjection.Abstractions.dll -> Microsoft.Extensions.DependencyInjection.Abstractions.dll.so
1>[20/73] Xamarin.AndroidX.Lifecycle.ViewModelSavedState.dll -> Xamarin.AndroidX.Lifecycle.ViewModelSavedState.dll.so
1>[21/73] Xamarin.AndroidX.Loader.dll -> Xamarin.AndroidX.Loader.dll.so
1>[5/73] Microsoft.Extensions.Logging.dll -> Microsoft.Extensions.Logging.dll.so
1>[5/73] Microsoft.Extensions.Logging.dll -> Microsoft.Extensions.Logging.dll.so
1>[22/73] Xamarin.AndroidX.CustomView.dll -> Xamarin.AndroidX.CustomView.dll.so
1>[23/73] Xamarin.AndroidX.DrawerLayout.dll -> Xamarin.AndroidX.DrawerLayout.dll.so
1>[24/73] Xamarin.AndroidX.Navigation.Common.dll -> Xamarin.AndroidX.Navigation.Common.dll.so
1>[25/73] Xamarin.AndroidX.Navigation.Fragment.dll -> Xamarin.AndroidX.Navigation.Fragment.dll.so
1>[5/73] Microsoft.Extensions.Logging.dll -> Microsoft.Extensions.Logging.dll.so
1>[6/73] Microsoft.Extensions.Logging.Abstractions.dll -> Microsoft.Extensions.Logging.Abstractions.dll.so
1>[6/73] Microsoft.Extensions.Logging.Abstractions.dll -> Microsoft.Extensions.Logging.Abstractions.dll.so
1>[26/73] Xamarin.AndroidX.ViewPager.dll -> Xamarin.AndroidX.ViewPager.dll.so
1>[27/73] Xamarin.AndroidX.RecyclerView.dll -> Xamarin.AndroidX.RecyclerView.dll.so
1>[6/73] Microsoft.Extensions.Logging.Abstractions.dll -> Microsoft.Extensions.Logging.Abstractions.dll.so
1>[7/73] Microsoft.Extensions.Options.dll -> Microsoft.Extensions.Options.dll.so
1>[7/73] Microsoft.Extensions.Options.dll -> Microsoft.Extensions.Options.dll.so
1>[7/73] Microsoft.Extensions.Options.dll -> Microsoft.Extensions.Options.dll.so
1>[28/73] Xamarin.AndroidX.Navigation.UI.dll -> Xamarin.AndroidX.Navigation.UI.dll.so
1>[29/73] Xamarin.AndroidX.SwipeRefreshLayout.dll -> Xamarin.AndroidX.SwipeRefreshLayout.dll.so
1>[30/73] Xamarin.AndroidX.SavedState.dll -> Xamarin.AndroidX.SavedState.dll.so
1>[31/73] Xamarin.AndroidX.Fragment.dll -> Xamarin.AndroidX.Fragment.dll.so
1>[32/73] Xamarin.AndroidX.Window.dll -> Xamarin.AndroidX.Window.dll.so
1>[33/73] Xamarin.AndroidX.Navigation.Runtime.dll -> Xamarin.AndroidX.Navigation.Runtime.dll.so
1>[34/73] Xamarin.AndroidX.Lifecycle.LiveData.Core.dll -> Xamarin.AndroidX.Lifecycle.LiveData.Core.dll.so
1>[35/73] Xamarin.AndroidX.ViewPager2.dll -> Xamarin.AndroidX.ViewPager2.dll.so
1>[8/73] Microsoft.Extensions.Primitives.dll -> Microsoft.Extensions.Primitives.dll.so
1>[8/73] Microsoft.Extensions.Primitives.dll -> Microsoft.Extensions.Primitives.dll.so
1>[8/73] Microsoft.Extensions.Primitives.dll -> Microsoft.Extensions.Primitives.dll.so
1>[36/73] System.ComponentModel.TypeConverter.dll -> System.ComponentModel.TypeConverter.dll.so
1>[37/73] System.Collections.NonGeneric.dll -> System.Collections.NonGeneric.dll.so
1>[38/73] Xamarin.KotlinX.Coroutines.Core.Jvm.dll -> Xamarin.KotlinX.Coroutines.Core.Jvm.dll.so
1>[39/73] System.Collections.dll -> System.Collections.dll.so
1>[40/73] System.ComponentModel.Primitives.dll -> System.ComponentModel.Primitives.dll.so
1>[41/73] Xamarin.Kotlin.StdLib.dll -> Xamarin.Kotlin.StdLib.dll.so
1>[42/73] System.Collections.Concurrent.dll -> System.Collections.Concurrent.dll.so
1>[43/73] Xamarin.Google.Android.Material.dll -> Xamarin.Google.Android.Material.dll.so
1>[9/73] Microsoft.Maui.Graphics.dll -> Microsoft.Maui.Graphics.dll.so
1>[9/73] Microsoft.Maui.Graphics.dll -> Microsoft.Maui.Graphics.dll.so
1>[44/73] System.ComponentModel.dll -> System.ComponentModel.dll.so
1>[45/73] System.Console.dll -> System.Console.dll.so
1>[46/73] System.IO.Compression.dll -> System.IO.Compression.dll.so
1>[47/73] System.Net.Primitives.dll -> System.Net.Primitives.dll.so
1>[48/73] System.Memory.dll -> System.Memory.dll.so
1>[49/73] System.Net.Http.dll -> System.Net.Http.dll.so
1>[9/73] Microsoft.Maui.Graphics.dll -> Microsoft.Maui.Graphics.dll.so
1>[50/73] System.Linq.dll -> System.Linq.dll.so
1>[51/73] System.Linq.Expressions.dll -> System.Linq.Expressions.dll.so
1>[10/73] Xamarin.AndroidX.Activity.dll -> Xamarin.AndroidX.Activity.dll.so
1>[52/73] System.Numerics.Vectors.dll -> System.Numerics.Vectors.dll.so
1>[53/73] System.Net.Requests.dll -> System.Net.Requests.dll.so
1>[54/73] System.Runtime.InteropServices.dll -> System.Runtime.InteropServices.dll.so
1>[10/73] Xamarin.AndroidX.Activity.dll -> Xamarin.AndroidX.Activity.dll.so
1>[55/73] System.Runtime.dll -> System.Runtime.dll.so
1>[56/73] System.ObjectModel.dll -> System.ObjectModel.dll.so
1>[57/73] System.Private.Uri.dll -> System.Private.Uri.dll.so
1>[58/73] System.Private.Xml.dll -> System.Private.Xml.dll.so
1>[10/73] Xamarin.AndroidX.Activity.dll -> Xamarin.AndroidX.Activity.dll.so
1>[59/73] System.Security.Cryptography.dll -> System.Security.Cryptography.dll.so
1>[11/73] Xamarin.AndroidX.AppCompat.dll -> Xamarin.AndroidX.AppCompat.dll.so
1>[60/73] System.Threading.dll -> System.Threading.dll.so
1>[61/73] System.Threading.Thread.dll -> System.Threading.Thread.dll.so
1>[62/73] System.Xml.ReaderWriter.dll -> System.Xml.ReaderWriter.dll.so
1>[63/73] System.Text.RegularExpressions.dll -> System.Text.RegularExpressions.dll.so
1>[11/73] Xamarin.AndroidX.AppCompat.dll -> Xamarin.AndroidX.AppCompat.dll.so
1>[64/73] System.dll -> System.dll.so
1>[11/73] Xamarin.AndroidX.AppCompat.dll -> Xamarin.AndroidX.AppCompat.dll.so
1>[65/73] Java.Interop.dll -> Java.Interop.dll.so
1>[12/73] Xamarin.AndroidX.AppCompat.AppCompatResources.dll -> Xamarin.AndroidX.AppCompat.AppCompatResources.dll.so
1>[66/73] Microsoft.Maui.Essentials.dll -> Microsoft.Maui.Essentials.dll.so
1>[67/73] Microsoft.Maui.Controls.Xaml.dll -> Microsoft.Maui.Controls.Xaml.dll.so
1>[68/73] Microsoft.Maui.Controls.Compatibility.dll -> Microsoft.Maui.Controls.Compatibility.dll.so
1>[12/73] Xamarin.AndroidX.AppCompat.AppCompatResources.dll -> Xamarin.AndroidX.AppCompat.AppCompatResources.dll.so
1>[69/73] Mono.Android.dll -> Mono.Android.dll.so
1>[12/73] Xamarin.AndroidX.AppCompat.AppCompatResources.dll -> Xamarin.AndroidX.AppCompat.AppCompatResources.dll.so
1>[70/73] Microsoft.Maui.dll -> Microsoft.Maui.dll.so
1>[13/73] Xamarin.AndroidX.CardView.dll -> Xamarin.AndroidX.CardView.dll.so
1>[71/73] MauiApp3.dll -> MauiApp3.dll.so
1>[13/73] Xamarin.AndroidX.CardView.dll -> Xamarin.AndroidX.CardView.dll.so
1>[13/73] Xamarin.AndroidX.CardView.dll -> Xamarin.AndroidX.CardView.dll.so
1>[14/73] Xamarin.AndroidX.Collection.dll -> Xamarin.AndroidX.Collection.dll.so
1>[14/73] Xamarin.AndroidX.Collection.dll -> Xamarin.AndroidX.Collection.dll.so
1>[14/73] Xamarin.AndroidX.Collection.dll -> Xamarin.AndroidX.Collection.dll.so
1>[15/73] Xamarin.AndroidX.CoordinatorLayout.dll -> Xamarin.AndroidX.CoordinatorLayout.dll.so
1>[15/73] Xamarin.AndroidX.CoordinatorLayout.dll -> Xamarin.AndroidX.CoordinatorLayout.dll.so
1>[15/73] Xamarin.AndroidX.CoordinatorLayout.dll -> Xamarin.AndroidX.CoordinatorLayout.dll.so
1>[16/73] Xamarin.AndroidX.Core.dll -> Xamarin.AndroidX.Core.dll.so
1>[72/73] Microsoft.Maui.Controls.dll -> Microsoft.Maui.Controls.dll.so
1>[16/73] Xamarin.AndroidX.Core.dll -> Xamarin.AndroidX.Core.dll.so
1>[17/73] Xamarin.AndroidX.CursorAdapter.dll -> Xamarin.AndroidX.CursorAdapter.dll.so
1>[16/73] Xamarin.AndroidX.Core.dll -> Xamarin.AndroidX.Core.dll.so
1>[17/73] Xamarin.AndroidX.CursorAdapter.dll -> Xamarin.AndroidX.CursorAdapter.dll.so
1>[18/73] Xamarin.AndroidX.CustomView.dll -> Xamarin.AndroidX.CustomView.dll.so
1>[17/73] Xamarin.AndroidX.CursorAdapter.dll -> Xamarin.AndroidX.CursorAdapter.dll.so
1>[73/73] System.Private.CoreLib.dll -> System.Private.CoreLib.dll.so
1>[18/73] Xamarin.AndroidX.CustomView.dll -> Xamarin.AndroidX.CustomView.dll.so
1>[19/73] Xamarin.AndroidX.DrawerLayout.dll -> Xamarin.AndroidX.DrawerLayout.dll.so
1>[18/73] Xamarin.AndroidX.CustomView.dll -> Xamarin.AndroidX.CustomView.dll.so
1>[19/73] Xamarin.AndroidX.DrawerLayout.dll -> Xamarin.AndroidX.DrawerLayout.dll.so
1>[19/73] Xamarin.AndroidX.DrawerLayout.dll -> Xamarin.AndroidX.DrawerLayout.dll.so
1>[20/73] Xamarin.AndroidX.Fragment.dll -> Xamarin.AndroidX.Fragment.dll.so
1>[21/73] Xamarin.AndroidX.Lifecycle.Common.dll -> Xamarin.AndroidX.Lifecycle.Common.dll.so
1>[20/73] Xamarin.AndroidX.Fragment.dll -> Xamarin.AndroidX.Fragment.dll.so
1>[20/73] Xamarin.AndroidX.Fragment.dll -> Xamarin.AndroidX.Fragment.dll.so
1>[22/73] Xamarin.AndroidX.Lifecycle.LiveData.Core.dll -> Xamarin.AndroidX.Lifecycle.LiveData.Core.dll.so
1>[21/73] Xamarin.AndroidX.Lifecycle.Common.dll -> Xamarin.AndroidX.Lifecycle.Common.dll.so
1>[21/73] Xamarin.AndroidX.Lifecycle.Common.dll -> Xamarin.AndroidX.Lifecycle.Common.dll.so
1>[23/73] Xamarin.AndroidX.Lifecycle.ViewModel.dll -> Xamarin.AndroidX.Lifecycle.ViewModel.dll.so
1>[22/73] Xamarin.AndroidX.Lifecycle.LiveData.Core.dll -> Xamarin.AndroidX.Lifecycle.LiveData.Core.dll.so
1>[22/73] Xamarin.AndroidX.Lifecycle.LiveData.Core.dll -> Xamarin.AndroidX.Lifecycle.LiveData.Core.dll.so
1>[24/73] Xamarin.AndroidX.Lifecycle.ViewModelSavedState.dll -> Xamarin.AndroidX.Lifecycle.ViewModelSavedState.dll.so
1>[23/73] Xamarin.AndroidX.Lifecycle.ViewModel.dll -> Xamarin.AndroidX.Lifecycle.ViewModel.dll.so
1>[23/73] Xamarin.AndroidX.Lifecycle.ViewModel.dll -> Xamarin.AndroidX.Lifecycle.ViewModel.dll.so
1>[25/73] Xamarin.AndroidX.Loader.dll -> Xamarin.AndroidX.Loader.dll.so
1>[24/73] Xamarin.AndroidX.Lifecycle.ViewModelSavedState.dll -> Xamarin.AndroidX.Lifecycle.ViewModelSavedState.dll.so
1>[24/73] Xamarin.AndroidX.Lifecycle.ViewModelSavedState.dll -> Xamarin.AndroidX.Lifecycle.ViewModelSavedState.dll.so
1>[25/73] Xamarin.AndroidX.Loader.dll -> Xamarin.AndroidX.Loader.dll.so
1>[25/73] Xamarin.AndroidX.Loader.dll -> Xamarin.AndroidX.Loader.dll.so
1>[26/73] Xamarin.AndroidX.Navigation.Common.dll -> Xamarin.AndroidX.Navigation.Common.dll.so
1>[26/73] Xamarin.AndroidX.Navigation.Common.dll -> Xamarin.AndroidX.Navigation.Common.dll.so
1>[26/73] Xamarin.AndroidX.Navigation.Common.dll -> Xamarin.AndroidX.Navigation.Common.dll.so
1>[27/73] Xamarin.AndroidX.Navigation.Fragment.dll -> Xamarin.AndroidX.Navigation.Fragment.dll.so
1>[27/73] Xamarin.AndroidX.Navigation.Fragment.dll -> Xamarin.AndroidX.Navigation.Fragment.dll.so
1>[27/73] Xamarin.AndroidX.Navigation.Fragment.dll -> Xamarin.AndroidX.Navigation.Fragment.dll.so
1>[28/73] Xamarin.AndroidX.Navigation.Runtime.dll -> Xamarin.AndroidX.Navigation.Runtime.dll.so
1>[28/73] Xamarin.AndroidX.Navigation.Runtime.dll -> Xamarin.AndroidX.Navigation.Runtime.dll.so
1>[28/73] Xamarin.AndroidX.Navigation.Runtime.dll -> Xamarin.AndroidX.Navigation.Runtime.dll.so
1>[29/73] Xamarin.AndroidX.Navigation.UI.dll -> Xamarin.AndroidX.Navigation.UI.dll.so
1>[29/73] Xamarin.AndroidX.Navigation.UI.dll -> Xamarin.AndroidX.Navigation.UI.dll.so
1>[29/73] Xamarin.AndroidX.Navigation.UI.dll -> Xamarin.AndroidX.Navigation.UI.dll.so
1>[30/73] Xamarin.AndroidX.RecyclerView.dll -> Xamarin.AndroidX.RecyclerView.dll.so
1>[31/73] Xamarin.AndroidX.SavedState.dll -> Xamarin.AndroidX.SavedState.dll.so
1>[30/73] Xamarin.AndroidX.RecyclerView.dll -> Xamarin.AndroidX.RecyclerView.dll.so
1>[30/73] Xamarin.AndroidX.RecyclerView.dll -> Xamarin.AndroidX.RecyclerView.dll.so
1>[31/73] Xamarin.AndroidX.SavedState.dll -> Xamarin.AndroidX.SavedState.dll.so
1>[31/73] Xamarin.AndroidX.SavedState.dll -> Xamarin.AndroidX.SavedState.dll.so
1>[32/73] Xamarin.AndroidX.SwipeRefreshLayout.dll -> Xamarin.AndroidX.SwipeRefreshLayout.dll.so
1>[32/73] Xamarin.AndroidX.SwipeRefreshLayout.dll -> Xamarin.AndroidX.SwipeRefreshLayout.dll.so
1>[32/73] Xamarin.AndroidX.SwipeRefreshLayout.dll -> Xamarin.AndroidX.SwipeRefreshLayout.dll.so
1>[33/73] Xamarin.AndroidX.ViewPager.dll -> Xamarin.AndroidX.ViewPager.dll.so
1>[33/73] Xamarin.AndroidX.ViewPager.dll -> Xamarin.AndroidX.ViewPager.dll.so
1>[33/73] Xamarin.AndroidX.ViewPager.dll -> Xamarin.AndroidX.ViewPager.dll.so
1>[34/73] Xamarin.AndroidX.ViewPager2.dll -> Xamarin.AndroidX.ViewPager2.dll.so
1>[34/73] Xamarin.AndroidX.ViewPager2.dll -> Xamarin.AndroidX.ViewPager2.dll.so
1>[34/73] Xamarin.AndroidX.ViewPager2.dll -> Xamarin.AndroidX.ViewPager2.dll.so
1>[35/73] Xamarin.AndroidX.Window.dll -> Xamarin.AndroidX.Window.dll.so
1>[35/73] Xamarin.AndroidX.Window.dll -> Xamarin.AndroidX.Window.dll.so
1>[35/73] Xamarin.AndroidX.Window.dll -> Xamarin.AndroidX.Window.dll.so
1>[36/73] Xamarin.Google.Android.Material.dll -> Xamarin.Google.Android.Material.dll.so
1>[36/73] Xamarin.Google.Android.Material.dll -> Xamarin.Google.Android.Material.dll.so
1>[36/73] Xamarin.Google.Android.Material.dll -> Xamarin.Google.Android.Material.dll.so
1>[37/73] Xamarin.Kotlin.StdLib.dll -> Xamarin.Kotlin.StdLib.dll.so
1>[37/73] Xamarin.Kotlin.StdLib.dll -> Xamarin.Kotlin.StdLib.dll.so
1>[37/73] Xamarin.Kotlin.StdLib.dll -> Xamarin.Kotlin.StdLib.dll.so
1>[38/73] Xamarin.KotlinX.Coroutines.Core.Jvm.dll -> Xamarin.KotlinX.Coroutines.Core.Jvm.dll.so
1>[38/73] Xamarin.KotlinX.Coroutines.Core.Jvm.dll -> Xamarin.KotlinX.Coroutines.Core.Jvm.dll.so
1>[38/73] Xamarin.KotlinX.Coroutines.Core.Jvm.dll -> Xamarin.KotlinX.Coroutines.Core.Jvm.dll.so
1>[39/73] System.Collections.Concurrent.dll -> System.Collections.Concurrent.dll.so
1>[39/73] System.Collections.Concurrent.dll -> System.Collections.Concurrent.dll.so
1>[39/73] System.Collections.Concurrent.dll -> System.Collections.Concurrent.dll.so
1>[40/73] System.Collections.NonGeneric.dll -> System.Collections.NonGeneric.dll.so
1>[40/73] System.Collections.NonGeneric.dll -> System.Collections.NonGeneric.dll.so
1>[40/73] System.Collections.NonGeneric.dll -> System.Collections.NonGeneric.dll.so
1>[41/73] System.Collections.dll -> System.Collections.dll.so
1>[41/73] System.Collections.dll -> System.Collections.dll.so
1>[41/73] System.Collections.dll -> System.Collections.dll.so
1>[42/73] System.ComponentModel.Primitives.dll -> System.ComponentModel.Primitives.dll.so
1>[42/73] System.ComponentModel.Primitives.dll -> System.ComponentModel.Primitives.dll.so
1>[42/73] System.ComponentModel.Primitives.dll -> System.ComponentModel.Primitives.dll.so
1>[43/73] System.ComponentModel.TypeConverter.dll -> System.ComponentModel.TypeConverter.dll.so
1>[43/73] System.ComponentModel.TypeConverter.dll -> System.ComponentModel.TypeConverter.dll.so
1>[44/73] System.ComponentModel.dll -> System.ComponentModel.dll.so
1>[43/73] System.ComponentModel.TypeConverter.dll -> System.ComponentModel.TypeConverter.dll.so
1>[44/73] System.ComponentModel.dll -> System.ComponentModel.dll.so
1>[44/73] System.ComponentModel.dll -> System.ComponentModel.dll.so
1>[45/73] System.Console.dll -> System.Console.dll.so
1>[45/73] System.Console.dll -> System.Console.dll.so
1>[45/73] System.Console.dll -> System.Console.dll.so
1>[46/73] System.IO.Compression.dll -> System.IO.Compression.dll.so
1>[46/73] System.IO.Compression.dll -> System.IO.Compression.dll.so
1>[46/73] System.IO.Compression.dll -> System.IO.Compression.dll.so
1>[47/73] System.Linq.Expressions.dll -> System.Linq.Expressions.dll.so
1>[47/73] System.Linq.Expressions.dll -> System.Linq.Expressions.dll.so
1>[47/73] System.Linq.Expressions.dll -> System.Linq.Expressions.dll.so
1>[48/73] System.Linq.dll -> System.Linq.dll.so
1>[48/73] System.Linq.dll -> System.Linq.dll.so
1>[48/73] System.Linq.dll -> System.Linq.dll.so
1>[49/73] System.Memory.dll -> System.Memory.dll.so
1>[49/73] System.Memory.dll -> System.Memory.dll.so
1>[49/73] System.Memory.dll -> System.Memory.dll.so
1>[50/73] System.Net.Http.dll -> System.Net.Http.dll.so
1>[50/73] System.Net.Http.dll -> System.Net.Http.dll.so
1>[50/73] System.Net.Http.dll -> System.Net.Http.dll.so
1>[51/73] System.Net.Primitives.dll -> System.Net.Primitives.dll.so
1>[51/73] System.Net.Primitives.dll -> System.Net.Primitives.dll.so
1>[51/73] System.Net.Primitives.dll -> System.Net.Primitives.dll.so
1>[52/73] System.Net.Requests.dll -> System.Net.Requests.dll.so
1>[52/73] System.Net.Requests.dll -> System.Net.Requests.dll.so
1>[53/73] System.Numerics.Vectors.dll -> System.Numerics.Vectors.dll.so
1>[52/73] System.Net.Requests.dll -> System.Net.Requests.dll.so
1>[53/73] System.Numerics.Vectors.dll -> System.Numerics.Vectors.dll.so
1>[53/73] System.Numerics.Vectors.dll -> System.Numerics.Vectors.dll.so
1>[54/73] System.ObjectModel.dll -> System.ObjectModel.dll.so
1>[54/73] System.ObjectModel.dll -> System.ObjectModel.dll.so
1>[54/73] System.ObjectModel.dll -> System.ObjectModel.dll.so
1>[55/73] System.Private.Uri.dll -> System.Private.Uri.dll.so
1>[55/73] System.Private.Uri.dll -> System.Private.Uri.dll.so
1>[55/73] System.Private.Uri.dll -> System.Private.Uri.dll.so
1>[56/73] System.Private.Xml.dll -> System.Private.Xml.dll.so
1>[56/73] System.Private.Xml.dll -> System.Private.Xml.dll.so
1>[57/73] System.Runtime.InteropServices.dll -> System.Runtime.InteropServices.dll.so
1>[56/73] System.Private.Xml.dll -> System.Private.Xml.dll.so
1>[57/73] System.Runtime.InteropServices.dll -> System.Runtime.InteropServices.dll.so
1>[58/73] System.Runtime.dll -> System.Runtime.dll.so
1>[57/73] System.Runtime.InteropServices.dll -> System.Runtime.InteropServices.dll.so
1>[58/73] System.Runtime.dll -> System.Runtime.dll.so
1>[58/73] System.Runtime.dll -> System.Runtime.dll.so
1>[59/73] System.Security.Cryptography.dll -> System.Security.Cryptography.dll.so
1>[59/73] System.Security.Cryptography.dll -> System.Security.Cryptography.dll.so
1>[59/73] System.Security.Cryptography.dll -> System.Security.Cryptography.dll.so
1>[60/73] System.Text.RegularExpressions.dll -> System.Text.RegularExpressions.dll.so
1>[60/73] System.Text.RegularExpressions.dll -> System.Text.RegularExpressions.dll.so
1>[61/73] System.Threading.Thread.dll -> System.Threading.Thread.dll.so
1>[60/73] System.Text.RegularExpressions.dll -> System.Text.RegularExpressions.dll.so
1>[61/73] System.Threading.Thread.dll -> System.Threading.Thread.dll.so
1>[62/73] System.Threading.dll -> System.Threading.dll.so
1>[61/73] System.Threading.Thread.dll -> System.Threading.Thread.dll.so
1>[62/73] System.Threading.dll -> System.Threading.dll.so
1>[63/73] System.Xml.ReaderWriter.dll -> System.Xml.ReaderWriter.dll.so
1>[62/73] System.Threading.dll -> System.Threading.dll.so
1>[63/73] System.Xml.ReaderWriter.dll -> System.Xml.ReaderWriter.dll.so
1>[64/73] System.dll -> System.dll.so
1>[63/73] System.Xml.ReaderWriter.dll -> System.Xml.ReaderWriter.dll.so
1>[64/73] System.dll -> System.dll.so
1>[64/73] System.dll -> System.dll.so
1>[65/73] Java.Interop.dll -> Java.Interop.dll.so
1>[65/73] Java.Interop.dll -> Java.Interop.dll.so
1>[65/73] Java.Interop.dll -> Java.Interop.dll.so
1>[66/73] Mono.Android.dll -> Mono.Android.dll.so
1>[66/73] Mono.Android.dll -> Mono.Android.dll.so
1>[66/73] Mono.Android.dll -> Mono.Android.dll.so
1>[67/73] Microsoft.Maui.dll -> Microsoft.Maui.dll.so
1>[67/73] Microsoft.Maui.dll -> Microsoft.Maui.dll.so
1>[67/73] Microsoft.Maui.dll -> Microsoft.Maui.dll.so
1>[68/73] Microsoft.Maui.Controls.Compatibility.dll -> Microsoft.Maui.Controls.Compatibility.dll.so
1>[68/73] Microsoft.Maui.Controls.Compatibility.dll -> Microsoft.Maui.Controls.Compatibility.dll.so
1>[68/73] Microsoft.Maui.Controls.Compatibility.dll -> Microsoft.Maui.Controls.Compatibility.dll.so
1>[69/73] Microsoft.Maui.Controls.Xaml.dll -> Microsoft.Maui.Controls.Xaml.dll.so
1>[69/73] Microsoft.Maui.Controls.Xaml.dll -> Microsoft.Maui.Controls.Xaml.dll.so
1>[69/73] Microsoft.Maui.Controls.Xaml.dll -> Microsoft.Maui.Controls.Xaml.dll.so
1>[70/73] Microsoft.Maui.Controls.dll -> Microsoft.Maui.Controls.dll.so
1>[70/73] Microsoft.Maui.Controls.dll -> Microsoft.Maui.Controls.dll.so
1>[70/73] Microsoft.Maui.Controls.dll -> Microsoft.Maui.Controls.dll.so
1>[71/73] Microsoft.Maui.Essentials.dll -> Microsoft.Maui.Essentials.dll.so
1>[71/73] Microsoft.Maui.Essentials.dll -> Microsoft.Maui.Essentials.dll.so
1>[71/73] Microsoft.Maui.Essentials.dll -> Microsoft.Maui.Essentials.dll.so
1>[72/73] MauiApp3.dll -> MauiApp3.dll.so
1>[System.Private.CoreLib.dll] Exec (with response file contents expanded) in C:\DONNEES\PROJETS\MAUIAPP3\MAUIAPP3: MONO_PATH=C:\Donnees\Projets\MauiApp3\MauiApp3\obj\Release\net7.0-android\android-arm64\linked; MONO_ENV_OPTIONS= C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Runtime.AOT.win-x64.Cross.android-arm64\7.0.9\Sdk\..\tools\mono-aot-cross.exe --debug --nollvm "--aot=asmwriter,temp-path=obj\Release\net7.0-android\android-arm64\aot\arm64-v8a\System.Private.CoreLib,profile-only,profile=C:\Program Files\dotnet\packs\Microsoft.Maui.Sdk\7.0.86\Sdk\maui.aotprofile,profile=C:\Program Files\dotnet\packs\Microsoft.Maui.Sdk\7.0.86\Sdk\maui-blazor.aotprofile,mtriple=aarch64-linux-android,tool-prefix=C:\Program Files\dotnet\packs\Microsoft.Android.Sdk.Windows\33.0.46\tools\binutils\bin\aarch64-linux-android-,outfile=obj\Release\net7.0-android\android-arm64\aot\System.Private.CoreLib.dll.so,ld-name=ld,ld-flags=--no-relax -s" "obj\Release\net7.0-android\android-arm64\linked\System.Private.CoreLib.dll"
1>C:\Program Files\dotnet\packs\Microsoft.Android.Sdk.Windows\33.0.46\targets\Microsoft.Android.Sdk.Aot.targets(91,5): error : Precompiling failed for C:\Donnees\Projets\MauiApp3\MauiApp3\obj\Release\net7.0-android\android-arm64\linked\System.Private.CoreLib.dll with exit code 1.
1>C:\Program Files\dotnet\packs\Microsoft.Android.Sdk.Windows\33.0.46\targets\Microsoft.Android.Sdk.Aot.targets(91,5): error : Error: Loaded assembly 'C:\Donnees\Projets\MauiApp3\MauiApp3\obj\Release\net7.0-android\android-arm64\linked\System.Private.CoreLib.dll' doesn't match original file name 'C:\DONNEES\PROJETS\MAUIAPP3\MAUIAPP3\obj\Release\net7.0-android\android-arm64\linked\System.Private.CoreLib.dll'. Set MONO_PATH to the assembly's location.
1>Done building project "MauiApp3.csproj" -- FAILED.
1>[72/73] MauiApp3.dll -> MauiApp3.dll.so
1>[72/73] MauiApp3.dll -> MauiApp3.dll.so
1>[73/73] System.Private.CoreLib.dll -> System.Private.CoreLib.dll.so
1>[73/73] System.Private.CoreLib.dll -> System.Private.CoreLib.dll.so
========== Rebuild All: 0 succeeded, 1 failed, 0 skipped ==========
========== Rebuild started at 9:43 AM and took 02:15.555 minutes ==========

![image](https://github.com/dotnet/maui/assets/22406408/e2177da3-62a5-43a0-97f6-eb9da9b62889)

Activity

  1. drasticactions commented on Aug 4, 2023

    @drasticactions

    @evertefeuille If you build a .NET Android app in release mode without the MAUI UI, does it fail in the same way?

    Try creating a new .NET Android app from CLI:

    dotnet workload install android
    dotnet new android

    Does it fail in the same way?

  2. evertefeuille commented on Aug 4, 2023

    @evertefeuille
    Author

    @drasticactions same error

    Rebuild started...
    1>------ Rebuild All started: Project: android, Configuration: Release Any CPU ------
    Restored C:\Donnees\divers\android\android.csproj (in 7 ms).
    1>android -> C:\Donnees\divers\android\bin\Release\net7.0-android\android.dll
    1>Optimizing assemblies for size may change the behavior of the app. Be sure to test after publishing. See: https://aka.ms/dotnet-illink
    1>Optimizing assemblies for size. This process might take a while.
    1>Optimizing assemblies for size may change the behavior of the app. Be sure to test after publishing. See: https://aka.ms/dotnet-illink
    1>Optimizing assemblies for size. This process might take a while.
    1>Optimizing assemblies for size may change the behavior of the app. Be sure to test after publishing. See: https://aka.ms/dotnet-illink
    1>Optimizing assemblies for size. This process might take a while.
    1>Optimizing assemblies for size may change the behavior of the app. Be sure to test after publishing. See: https://aka.ms/dotnet-illink
    1>Optimizing assemblies for size. This process might take a while.
    1>[1/8] System.Runtime.dll -> System.Runtime.dll.so
    1>[2/8] System.Console.dll -> System.Console.dll.so
    1>[3/8] System.Runtime.InteropServices.dll -> System.Runtime.InteropServices.dll.so
    1>[4/8] System.Linq.dll -> System.Linq.dll.so
    1>[5/8] android.dll -> android.dll.so
    1>[6/8] Mono.Android.dll -> Mono.Android.dll.so
    1>[7/8] Java.Interop.dll -> Java.Interop.dll.so
    1>[1/8] android.dll -> android.dll.so
    1>[1/8] android.dll -> android.dll.so
    1>[1/8] android.dll -> android.dll.so
    1>[2/8] System.Console.dll -> System.Console.dll.so
    1>[2/8] System.Console.dll -> System.Console.dll.so
    1>[2/8] System.Console.dll -> System.Console.dll.so
    1>[3/8] System.Linq.dll -> System.Linq.dll.so
    1>[3/8] System.Linq.dll -> System.Linq.dll.so
    1>[8/8] System.Private.CoreLib.dll -> System.Private.CoreLib.dll.so
    1>[3/8] System.Linq.dll -> System.Linq.dll.so
    1>[4/8] System.Runtime.InteropServices.dll -> System.Runtime.InteropServices.dll.so
    1>[4/8] System.Runtime.InteropServices.dll -> System.Runtime.InteropServices.dll.so
    1>[4/8] System.Runtime.InteropServices.dll -> System.Runtime.InteropServices.dll.so
    1>[5/8] System.Runtime.dll -> System.Runtime.dll.so
    1>[5/8] System.Runtime.dll -> System.Runtime.dll.so
    1>[5/8] System.Runtime.dll -> System.Runtime.dll.so
    1>[6/8] Java.Interop.dll -> Java.Interop.dll.so
    1>[6/8] Java.Interop.dll -> Java.Interop.dll.so
    1>[6/8] Java.Interop.dll -> Java.Interop.dll.so
    1>[7/8] Mono.Android.dll -> Mono.Android.dll.so
    1>[7/8] Mono.Android.dll -> Mono.Android.dll.so
    1>[7/8] Mono.Android.dll -> Mono.Android.dll.so
    1>[System.Private.CoreLib.dll] Exec (with response file contents expanded) in C:\DONNEES\DIVERS\ANDROID: MONO_PATH=C:\Donnees\divers\android\obj\Release\net7.0-android\android-arm64\linked; MONO_ENV_OPTIONS= C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Runtime.AOT.win-x64.Cross.android-arm64\7.0.9\Sdk..\tools\mono-aot-cross.exe --debug --nollvm "--aot=asmwriter,temp-path=obj\Release\net7.0-android\android-arm64\aot\arm64-v8a\System.Private.CoreLib,profile-only,profile=C:\Program Files\dotnet\packs\Microsoft.Android.Sdk.Windows\33.0.46\targets\dotnet.aotprofile,mtriple=aarch64-linux-android,tool-prefix=C:\Program Files\dotnet\packs\Microsoft.Android.Sdk.Windows\33.0.46\tools\binutils\bin\aarch64-linux-android-,outfile=obj\Release\net7.0-android\android-arm64\aot\System.Private.CoreLib.dll.so,ld-name=ld,ld-flags=--no-relax -s" "obj\Release\net7.0-android\android-arm64\linked\System.Private.CoreLib.dll"
    1>C:\Program Files\dotnet\packs\Microsoft.Android.Sdk.Windows\33.0.46\targets\Microsoft.Android.Sdk.Aot.targets(91,5): error : Precompiling failed for C:\Donnees\divers\android\obj\Release\net7.0-android\android-arm64\linked\System.Private.CoreLib.dll with exit code 1.
    1>C:\Program Files\dotnet\packs\Microsoft.Android.Sdk.Windows\33.0.46\targets\Microsoft.Android.Sdk.Aot.targets(91,5): error : Error: Loaded assembly 'C:\Donnees\divers\android\obj\Release\net7.0-android\android-arm64\linked\System.Private.CoreLib.dll' doesn't match original file name 'C:\DONNEES\DIVERS\ANDROID\obj\Release\net7.0-android\android-arm64\linked\System.Private.CoreLib.dll'. Set MONO_PATH to the assembly's location.
    1>Done building project "android.csproj" -- FAILED.
    1>[8/8] System.Private.CoreLib.dll -> System.Private.CoreLib.dll.so
    1>[8/8] System.Private.CoreLib.dll -> System.Private.CoreLib.dll.so
    ========== Rebuild All: 0 succeeded, 1 failed, 0 skipped ==========
    ========== Rebuild started at 8:09 AM and took 23.570 seconds ==========

  3. drasticactions commented on Aug 4, 2023

    @drasticactions

    @evertefeuille Thank you!

    This isn't an issue that can be fixed in this repo. This repo is for the MAUI UI project, and from the looks of it, your issue is particular to compiling .NET Android apps.

    @jonathanpeppers Do you think this should be moved somewhere else? Do you know what this issue is?

  4. jonathanpeppers commented on Aug 4, 2023

    @jonathanpeppers
    Member

    This looks like the <MonoAOTCompiler/> failing, but it fails on a BCL assembly?

    C:\DONNEES\DIVERS\ANDROID\obj\Release\net7.0-android\android-arm64\linked\System.Private.CoreLib.dll
    

    The path looks OK (there are some known issues for certain characters in the path), so we can move this to dotnet/runtime.

    @evertefeuille can you share a .binlog file of this error? https://aka.ms/binlog

  5. transferred this issue fromdotnet/mauion Aug 4, 2023
  6. ghost added
    untriaged
    on Aug 4, 2023
  7. evertefeuille commented on Aug 4, 2023

    @evertefeuille
    Author
  8. jonathanpeppers commented on Aug 4, 2023

    @jonathanpeppers
    Member

    It's complaining about the casing?

    Precompiling failed for C:\Donnees\divers\android\obj\Release\net7.0-android\android-arm64\linked\System.Private.CoreLib.dll with exit code 1.
    Error: Loaded assembly 'C:\Donnees\divers\android\obj\Release\net7.0-android\android-arm64\linked\System.Private.CoreLib.dll' doesn't match original file name 'C:\DONNEES\DIVERS\ANDROID\obj\Release\net7.0-android\android-arm64\linked\System.Private.CoreLib.dll'. Set MONO_PATH to the assembly's location.
    

    I'm looking at CentralNode_devenv_PID=9928_x64_BuildManager_Default.binlog.

    /cc @steveisok

  9. steveisok commented on Aug 4, 2023

    @steveisok
    Member

    @vargaz should this hold true even when aot compiling on windows?

  10. removed
    untriaged
    on Aug 4, 2023
  11. vargaz commented on Aug 4, 2023

    @vargaz
    Contributor

    Guess not, that check fail with casing.

  12. steveisok commented on Aug 4, 2023

    @steveisok
    Member

    @vargaz, use g_strcasecmp in the HOST_WIN32 case?

    if (img && strcmp (img->name, assembly->image->name)) {

  13. ghost added
    in-pr
    on Aug 5, 2023
  14. ghost removed
    in-pr
    on Aug 7, 2023
  15. almostEric commented on Aug 15, 2023

    @almostEric

    I am running into this issue as well. It looks like the issue has been identified and fixed, my question is how do we get this fix? Do we need to wait for next release of Visual Studio? Is there a NuGet package?

  16. steveisok commented on Aug 15, 2023

    @steveisok
    Member

    I am running into this issue as well. It looks like the issue has been identified and fixed, my question is how do we get this fix? Do we need to wait for next release of Visual Studio? Is there a NuGet package?

    The fix to this will be in .NET 8 RC1 and in .NET 7 as part of the September servicing release.

  17. ghost locked as resolved and limited conversation to collaborators on Sep 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions