I am building a .net Maui Android app. I have no problem deploying my app to an Android emulator or real device when in Debug mode. However if I deploy in Release mode, the app crashes on load. The android device log, shows the following error,
Assertion at /__w/1/s/src/mono/mono/mini/aot-runtime.c:3678, condition `is_ok (error)' not met, function:decode_patch, module is unusable (GUID of dependent assembly Microsoft.EntityFrameworkCore.Sqlite doesn't match (expected 'DE191E13-E625-494C-862B-66ABDC9BC3C8', got '0C0A2DB6-8411-4D35-912B-740A5B7BC5CE')).
I had no problem running this in Release mode earlier in the development cycle. I have updated both Visual Studio and Microsoft.EntityFrameworkCore.Sqlite probably several times since I last tested in Release mode.
My project does reference a DbClassLibrary. Both projects reference the same version of Microsoft.EntityFrameworkCore.Sqlite, 6.0.9 which is the latest at the time of writing.
I have tried deleting the App from the Android device, cleaned my solution and re-published.
My Visual Studio specs are as follows:
Visual Studio Community 2022 for Mac Preview Version 17.4 Preview (17.4 build 1583) Installation UUID: 10e52aa0-ff80-4b74-8350-1c794fdcca3c
Runtime .NET 6.0.5 (64-bit) Architecture: Arm64
Roslyn (Language Service) 4.4.0-2.22419.1+ae5663806be933515723b2d5a85faf5d378f460d
NuGet Version: 6.3.0.128
.NET SDK (Arm64) SDK: /usr/local/share/dotnet/sdk/6.0.401/Sdks SDK Versions: 6.0.401 6.0.400 6.0.400-preview.22330.6 MSBuild SDKs: /Applications/Visual Studio (Preview).app/Contents/MonoBundle/MSBuild/Current/bin/Sdks
.NET SDK (x64) SDK Versions: 5.0.408 3.1.423 3.1.422 3.1.421
.NET Runtime (Arm64) Runtime: /usr/local/share/dotnet/dotnet Runtime Versions: 6.0.9 6.0.8 6.0.6
.NET Runtime (x64) Runtime: /usr/local/share/dotnet/x64/dotnet Runtime Versions: 5.0.17 3.1.29 3.1.28 3.1.27
Xamarin.Profiler Version: 1.8.0.19 Location: /Applications/Xamarin Profiler.app/Contents/MacOS/Xamarin Profiler
Updater Version: 11 ...