dotnet / runtime

.NET is a cross-platform runtime for cloud, mobile, desktop, and IoT apps.
https://docs.microsoft.com/dotnet/core/
MIT License
15.36k stars 4.74k forks source link

[Android] Error compiling in release mode #90030

Closed evertefeuille closed 1 year ago

evertefeuille commented 1 year ago

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)
drasticactions commented 1 year ago

@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?

ghost commented 1 year ago

Hi @evertefeuille. We have added the "s/needs-info" label to this issue, which indicates that we have an open question for you before we can take further action. This issue will be closed automatically in 7 days if we do not hear back from you by then - please feel free to re-open it if you come back to this issue after that time.

evertefeuille commented 1 year ago

@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 ==========

drasticactions commented 1 year ago

@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?

jonathanpeppers commented 1 year ago

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

evertefeuille commented 1 year ago

@jonathanpeppers The logs logs.zip

jonathanpeppers commented 1 year ago

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

steveisok commented 1 year ago

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

vargaz commented 1 year ago

Guess not, that check fail with casing.

steveisok commented 1 year ago

@vargaz, use g_strcasecmp in the HOST_WIN32 case?

https://github.com/dotnet/runtime/blob/dad076d4901e41bef45dae3b5f2a16337ff0a986/src/mono/mono/mini/driver.c#L1417

almostEric commented 1 year ago

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?

steveisok commented 1 year ago

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.