ericsink / SQLitePCL.raw

A Portable Class Library (PCL) for low-level (raw) access to SQLite
Apache License 2.0
512 stars 106 forks source link

Problem with using Visual Studio for Mac #489

Closed beeradmoore closed 1 year ago

beeradmoore commented 2 years ago

Issue

Crash when running .NET MAUI application on macOS.

Unhandled Exception:
System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation.
 ---> System.TypeInitializationException: The type initializer for 'SQLite.SQLiteConnection' threw an exception.
 ---> System.DllNotFoundException: sqlite3
   at SQLitePCL.SQLite3Provider_sqlite3.SQLitePCL.ISQLite3Provider.sqlite3_libversion_number()
   at SQLitePCL.raw.SetProvider(ISQLite3Provider imp)
   at SQLitePCL.Batteries_V2.Init()
   at SQLite.SQLiteConnection..cctor()
   --- End of inner exception stack trace ---
   at SQLiteMAUITest.MainPage..ctor() in /Users/bradmoore/SQLiteMAUITest/MainPage.xaml.cs:line 16
   at System.Reflection.RuntimeConstructorInfo.InternalInvoke(Object obj, Object[] parameters, Boolean wrapExceptions)
   --- End of inner exception stack trace ---
   at System.Reflection.RuntimeConstructorInfo.InternalInvoke(Object obj, Object[] parameters, Boolean wrapExceptions)
   at System.RuntimeType.CreateInstanceMono(Boolean nonPublic, Boolean wrapExceptions)
   at System.RuntimeType.CreateInstanceDefaultCtor(Boolean publicOnly, Boolean wrapExceptions)
   at System.Activator.CreateInstance(Type type, Boolean nonPublic, Boolean wrapExceptions)
   at System.Activator.CreateInstance(Type type, Boolean nonPublic)
   at System.Activator.CreateInstance(Type type)
   at Microsoft.Maui.Controls.ShellContent.<>c__DisplayClass19_0.<Microsoft.Maui.Controls.IShellContentController.GetOrCreateContent>b__0()
   at Microsoft.Maui.Controls.ElementTemplate.CreateContent()
   at Microsoft.Maui.Controls.Internals.DataTemplateExtensions.CreateContent(DataTemplate self, Object item, BindableObject container)
   at Microsoft.Maui.Controls.ShellContent.Microsoft.Maui.Controls.IShellContentController.GetOrCreateContent()
   at Microsoft.Maui.Controls.Platform.Compatibility.ShellSectionRootRenderer.LoadRenderers()
   at Microsoft.Maui.Controls.Platform.Compatibility.ShellSectionRootRenderer.ViewDidLoad()
   at UIKit.UIApplication.Main(String[] args, Type principalClass, Type delegateClass)
   at SQLiteMAUITest.Program.Main(String[] args) in /Users/bradmoore/SQLiteMAUITest/Platforms/MacCatalyst/Program.cs:line 13
2022-05-25 11:52:32.989 SQLiteMAUITest[6111:133232] Unhandled managed exception: Exception has been thrown by the target of an invocation. (System.Reflection.TargetInvocationException)
   at System.Reflection.RuntimeConstructorInfo.InternalInvoke(Object obj, Object[] parameters, Boolean wrapExceptions)
   at System.RuntimeType.CreateInstanceMono(Boolean nonPublic, Boolean wrapExceptions)
   at System.RuntimeType.CreateInstanceDefaultCtor(Boolean publicOnly, Boolean wrapExceptions)
   at System.Activator.CreateInstance(Type type, Boolean nonPublic, Boolean wrapExceptions)
   at System.Activator.CreateInstance(Type type, Boolean nonPublic)
   at System.Activator.CreateInstance(Type type)
   at Microsoft.Maui.Controls.ShellContent.<>c__DisplayClass19_0.<Microsoft.Maui.Controls.IShellContentController.GetOrCreateContent>b__0()
   at Microsoft.Maui.Controls.ElementTemplate.CreateContent()
   at Microsoft.Maui.Controls.Internals.DataTemplateExtensions.CreateContent(DataTemplate self, Object item, BindableObject container)
   at Microsoft.Maui.Controls.ShellContent.Microsoft.Maui.Controls.IShellContentController.GetOrCreateContent()
   at Microsoft.Maui.Controls.Platform.Compatibility.ShellSectionRootRenderer.LoadRenderers()
   at Microsoft.Maui.Controls.Platform.Compatibility.ShellSectionRootRenderer.ViewDidLoad()
   at UIKit.UIApplication.Main(String[] args, Type principalClass, Type delegateClass)
   at SQLiteMAUITest.Program.Main(String[] args) in /Users/bradmoore/SQLiteMAUITest/Platforms/MacCatalyst/Program.cs:line 13
The type initializer for 'SQLite.SQLiteConnection' threw an exception. (System.TypeInitializationException)
   at SQLiteMAUITest.MainPage..ctor() in /Users/bradmoore/SQLiteMAUITest/MainPage.xaml.cs:line 16
   at System.Reflection.RuntimeConstructorInfo.InternalInvoke(Object obj, Object[] parameters, Boolean wrapExceptions)
sqlite3 (System.DllNotFoundException)
   at SQLitePCL.SQLite3Provider_sqlite3.SQLitePCL.ISQLite3Provider.sqlite3_libversion_number()
   at SQLitePCL.raw.SetProvider(ISQLite3Provider imp)
   at SQLitePCL.Batteries_V2.Init()
   at SQLite.SQLiteConnection..cctor()

Repro:

SQLiteMAUITest.zip

Project

I've taken the standard .NET MAUI template and added SQLite to try add a local DB cache. In this example I added sqlite-net-pcl. Based on some other issues I realised I needed to install SQLitePCLRaw.bundle_green to at least v2.1.0 (which conveniently went full release just yesterday). It looks like sqlite-net-pcl has a dependency on v2.0.4 but that gave me different issues on other platforms.

All the code related to the database is in MainPage.xaml.cs. I just load the entry from the db. When user taps the the button we update the db record.

I have tested this and it appears to work on :

I am unable to deploy debug/release to my iOS device.

It does not work when I deploy as a macOS app. I am unsure if this is because it is running as a Mac Catalyst app.

I also have this nuget warning but I am unsure if it is 100% related to the main problem that is happening.

SQLitePCLRaw.core 2.1.0' was resolved as a dependency of 'SQLiteMAUITest', but the dependency is using 'Xamarin.iOS' while 'SQLiteMAUITest' is using 'net6.0-maccatalyst15.4' as its TargetFramework. There might be compatibility issues when MacCatalyst projects depend on Xamarin.iOS projects.

Attempted Workaround

Looking into some older issues I thought maybe if I add the native library so I added SQLitePCLRaw.lib.e_sqlite3.osx but it also failed with the same error.

Additional information

I am using the latest non-beta macOS 12.4, the latest stable MAUI, the latest stable VS4Mac, latest .NET 6.0 SDK.

Detailed system information πŸ‘ˆ ``` Visual Studio Community 2022 for Mac Version 17.0 (build 8989) Installation UUID: 4ee827da-73c9-408a-b91f-216db80a725a Runtime .NET 6.0.3 (64-bit) Architecture: X64 Roslyn (Language Service) 4.1.0-3.22075.3+592501cbb9c9394072a245c15b3458ff88155d85 NuGet Version: 6.0.0.262 .NET SDK (x64) SDK: /usr/local/share/dotnet/sdk/6.0.300/Sdks SDK Versions: 6.0.300 6.0.202 6.0.201 6.0.200 6.0.105 6.0.102 6.0.101 5.0.408 5.0.407 5.0.406 5.0.405 5.0.404 5.0.403 5.0.402 5.0.401 5.0.400 5.0.302 5.0.301 5.0.203 5.0.202 5.0.201 5.0.200 5.0.103 5.0.102 5.0.101 3.1.419 3.1.418 3.1.417 3.1.416 3.1.415 3.1.414 3.1.413 3.1.412 3.1.411 3.1.410 3.1.409 3.1.408 3.1.407 3.1.406 3.1.405 3.1.404 MSBuild SDKs: /usr/local/share/dotnet/sdk/6.0.300/Sdks .NET Runtime (x64) Runtime: /usr/local/share/dotnet/dotnet Runtime Versions: 6.0.5 6.0.4 6.0.3 6.0.2 6.0.1 5.0.17 5.0.16 5.0.15 5.0.14 5.0.13 5.0.12 5.0.11 5.0.10 5.0.9 5.0.8 5.0.7 5.0.6 5.0.5 5.0.4 5.0.3 5.0.2 5.0.1 3.1.25 3.1.24 3.1.23 3.1.22 3.1.21 3.1.20 3.1.19 3.1.18 3.1.17 3.1.16 3.1.15 3.1.14 3.1.13 3.1.12 3.1.11 3.1.10 Xamarin.Profiler Version: 1.8.0.19 Location: /Applications/Xamarin Profiler.app/Contents/MacOS/Xamarin Profiler Updater Version: 11 Xamarin.Android Version: 12.3.0.3 (Visual Studio Community) Commit: xamarin-android/d17-2/bbba5a2 Android SDK: /Users/bradmoore/Library/Developer/Xamarin/android-sdk-macosx Supported Android versions: 12.0 (API level 31) 11.0 (API level 30) 10.0 (API level 29) SDK Command-line Tools Version: 5.0 SDK Platform Tools Version: 31.0.3 SDK Build Tools Version: 30.0.3 Build Information: Mono: adf1bc4 Java.Interop: xamarin/java.interop/d17-2@9760f0a9 ProGuard: Guardsquare/proguard/v7.0.1@912d149 SQLite: xamarin/sqlite/3.38.2@7b1e016 Xamarin.Android Tools: xamarin/xamarin-android-tools/d17-2@fc3c2ac Microsoft Build of OpenJDK Java SDK: /Library/Java/JavaVirtualMachines/microsoft-11.jdk 11.0.12 Android Designer EPL code available here: https://github.com/xamarin/AndroidDesigner.EPL Eclipse Temurin JDK Java SDK: /Library/Java/JavaVirtualMachines/temurin-8.jdk 1.8.0.302 Android Designer EPL code available here: https://github.com/xamarin/AndroidDesigner.EPL Android SDK Manager Version: 17.2.0.37 Hash: 7f5a6ef Branch: remotes/origin/d17-2 Build date: 2022-05-18 17:27:49 UTC Android Device Manager Version: 0.0.0.1116 Hash: e47e6c8 Branch: remotes/origin/d17-2 Build date: 2022-05-18 17:27:49 UTC Apple Developer Tools Xcode 13.4 (20503) Build 13F17a Xamarin.Mac Version: 8.10.0.1 (Visual Studio Community) Hash: 568bdb24e Branch: d17-2 Build date: 2022-04-08 18:52:56-0400 Xamarin.iOS Version: 15.10.0.1 (Visual Studio Community) Hash: 568bdb24e Branch: d17-2 Build date: 2022-04-08 18:52:57-0400 Xamarin Designer Version: 17.1.5.90 Hash: 53f47efde Branch: remotes/origin/d17-0-vsmac Build date: 2022-05-18 17:27:43 UTC Build Information Release ID: 1700008989 Git revision: 55998773faa2cb1dda7aab5fecd1625f7b664d10 Build date: 2022-05-18 17:25:21+00 Build branch: release-17.0 Build lane: release-17.0 Operating System Mac OS X 12.4.0 Darwin 21.5.0 Darwin Kernel Version 21.5.0 Tue Apr 26 21:08:22 PDT 2022 root:xnu-8020.121.3~4/RELEASE_X86_64 x86_64 ```
ericsink commented 2 years ago

VERY nice bug report.

I'm looking into it.

ericsink commented 2 years ago

Hmmm. Your repro sample works for me. :-) From the command line anyway.

Can you try running it from the command line, just to see if this is one of those cases where it works from dotnet run but not from inside the IDE?

beeradmoore commented 2 years ago

Can confirm dotnet run works, IDE still does not.

% dotnet run --framework net6.0-maccatalyst The launch profile "(Default)" could not be applied. A usable launch profile could not be located.

Does this make it an IDE bug I need to go file over there or possibly a MAUI bug to go file over there?

ericsink commented 2 years ago

Well it looks like an IDE bug, but I couldn't rule out the possibility that I've got something broken that just happens to be IDE-specific.

beeradmoore commented 2 years ago

Ah I see. Let me know if there is anything else I can do or if/when you want me to go report it to the VS team.

tipa commented 2 years ago

I get the (presumably) same crash in a "classic" Xamarin.Mac app (no .NET6) - same stack trace.

System.DllNotFoundException has been thrown
e_sqlite3 assembly:<unknown assembly> type:<unknown type> member:(null)

I've reported this before here with a workaround that seems to work, but it didn't get any traction.

ericsink commented 2 years ago

@tipa There are many different ways to get a DllNotFoundException -- your problem appears to be very different from the one in this issue.

One big difference is that in the original problem at the top of this issue, the DLL not found is "sqlite3" (the System-installed SQLite library), but in your case it is "e_sqlite3" (the custom builds I include with packages).

The other weird thing about this issue is that it appears to only happen in the IDE.

Now, let's talk about your problem for a moment. First of all, it appears you tagged me over in the other issue and I missed it -- my apologies.

Your problem is more likely a bug in SQLitePCLRaw and its dependencies. However, it's quite possible that the combination of Xamarin.macOS and arm64 is one case I simply didn't get right.

I'm going to open a separate issue here for that possible problem.

ericsink commented 2 years ago

From over in #497, @richardschoen : To confirm, that your problem is this one, I need the actual error message, which nuget packages you are using, etc.

VladislavAntonyuk commented 2 years ago

VS for Mac 17.3 will support .NET MAUI. Current version is 17.0

beeradmoore commented 2 years ago

Double checked and I get the same issue on the latest VS for Mac 17.3 preview.

Detailed system information πŸ‘ˆ ``` Visual Studio Community 2022 for Mac Preview Version 17.3 Preview (17.3 build 1038) Installation UUID: 17858189-979e-4185-bbb7-408693e9f40a Runtime .NET 6.0.5 (64-bit) Architecture: X64 Roslyn (Language Service) 4.3.0-2.22307.14+b91fc5b06135deb5bd72c105a1b96ce278ad6beb NuGet Version: 6.0.0.262 .NET SDK (x64) SDK: /usr/local/share/dotnet/sdk/6.0.301/Sdks SDK Versions: 6.0.301 3.1.420 MSBuild SDKs: /Applications/Visual Studio (Preview).app/Contents/MonoBundle/MSBuild/Current/bin/Sdks .NET Runtime (x64) Runtime: /usr/local/share/dotnet/dotnet Runtime Versions: 6.0.6 5.0.17 3.1.26 Xamarin.Profiler Version: 1.8.0.19 Location: /Applications/Xamarin Profiler.app/Contents/MacOS/Xamarin Profiler Updater Version: 11 Xamarin.Android Version: 12.3.3.3 (Visual Studio Community) Commit: xamarin-android/d17-2/4e061b7 Android SDK: /Volumes/Storage/Library/Developer/Xamarin/android-sdk-macosx Supported Android versions: 12.0 (API level 31) 11.0 (API level 30) SDK Command-line Tools Version: 5.0 SDK Platform Tools Version: 31.0.3 SDK Build Tools Version: 30.0.3 Build Information: Mono: dffa5ab Java.Interop: xamarin/java.interop/d17-2@9760f0a9 ProGuard: Guardsquare/proguard/v7.0.1@912d149 SQLite: xamarin/sqlite/3.38.2@7b1e016 Xamarin.Android Tools: xamarin/xamarin-android-tools/d17-2@fc3c2ac Microsoft Build of OpenJDK Java SDK: /Library/Java/JavaVirtualMachines/microsoft-11.jdk 11.0.12 Android Designer EPL code available here: https://github.com/xamarin/AndroidDesigner.EPL Eclipse Temurin JDK Java SDK: /Library/Java/JavaVirtualMachines/temurin-8.jdk 1.8.0.302 Android Designer EPL code available here: https://github.com/xamarin/AndroidDesigner.EPL Android SDK Manager Version: 17.2.0.47 Hash: d6dd135 Branch: remotes/origin/dev/tondat/main-menues~3 Build date: 2022-06-17 20:21:57 UTC Android Device Manager Version: 0.0.0.1127 Hash: 4bb4d48 Branch: remotes/origin/dev/tondat/main-1536295~1 Build date: 2022-06-17 20:21:57 UTC Apple Developer Tools Xcode 13.4.1 (20504) Build 13F100 Xamarin.Mac Version: 8.10.0.5 (Visual Studio Community) Hash: 96b3edb6d Branch: d17-2 Build date: 2022-05-18 07:32:06-0400 Xamarin.iOS Version: 15.10.0.5 (Visual Studio Community) Hash: 96b3edb6d Branch: d17-2 Build date: 2022-05-18 07:32:07-0400 Xamarin Designer Version: 17.3.0.110 Hash: 01d90a6c4 Branch: remotes/origin/d17-3 Build date: 2022-06-17 20:21:53 UTC Build Information Release ID: 1703001038 Git revision: ab015cef741e20e3cc212648659ecbd4ed089d5a Build date: 2022-06-17 20:19:58+00 Build branch: release-17.3 Build lane: release-17.3 Operating System Mac OS X 12.4.0 Darwin 21.5.0 Darwin Kernel Version 21.5.0 Tue Apr 26 21:08:22 PDT 2022 root:xnu-8020.121.3~4/RELEASE_X86_64 x86_64 ```
Dokug commented 1 year ago

I just wanted to "confirm" that I have the same issue with VS Mac preview 17.3, where the project crashes when built and deployed by VS and works when built through the CLI.

Also, would it be possible to change the Project SDKs from "Xamarin.Legacy.Sdk" to "Microsoft.NET.Sdk"? That would just be a convenience item, as my projects (net6.0) generate several build warnings regarding the possible "incompatibility issues when MacCatalyst projects depend on Xamarin.iOS projects. (NU1703)"

Kylar182 commented 1 year ago

Most people said to do this but LinkDescription is no longer a Build action option from what I've seen

daletman commented 1 year ago

For me the SQLiteMAUITest.zip Repro does work on my Mac with the latest VS. Full information of my system:

Visual Studio Community 2022 for Mac Preview
Version 17.4 Preview (17.4 build 715)
Installation UUID: d3a415a0-815f-4d2a-b4f2-68876eb19e2f

Runtime
.NET 6.0.5 (64-bit)
Architecture: X64

Roslyn (Language Service)
4.4.0-1.22371.1+c07f2571612b471671c809b5b0db59b0c37aab57

NuGet
Version: 6.2.1.2

.NET SDK (x64)
SDK: /usr/local/share/dotnet/sdk/6.0.400/Sdks
SDK Version: 6.0.400
MSBuild SDKs: /Applications/Visual Studio (Preview).app/Contents/MonoBundle/MSBuild/Current/bin/Sdks

.NET Runtime (x64)
Runtime: /usr/local/share/dotnet/dotnet
Runtime Version: 6.0.8

Xamarin.Profiler
Version: 1.8.0.19
Location: /Applications/Xamarin Profiler.app/Contents/MacOS/Xamarin Profiler

Updater
Version: 11

Xamarin.Android
Version: 13.0.99.36 (Visual Studio Community)
Commit: xamarin-android/main/b4998c8
Android SDK: /Users/home/Library/Android/sdk
    Supported Android versions:
        12.0 (API level 31)
        8.1  (API level 27)
        11.0 (API level 30)
        7.1  (API level 25)

SDK Command-line Tools Version: 7.0
SDK Platform Tools Version: 33.0.1
SDK Build Tools Version: 32.1.0 rc1

Build Information: 
Mono: dffa5ab
Java.Interop: xamarin/java.interop/main@032f1e71
SQLite: xamarin/sqlite/3.39.2@40e8743
Xamarin.Android Tools: xamarin/xamarin-android-tools/main@9c641b3

Microsoft Build of OpenJDK
Java SDK: /Library/Java/JavaVirtualMachines/microsoft-11.jdk
11.0.12
Android Designer EPL code available here:
https://github.com/xamarin/AndroidDesigner.EPL

Eclipse Temurin JDK
Java SDK: /Library/Java/JavaVirtualMachines/temurin-8.jdk
1.8.0.302
Android Designer EPL code available here:
https://github.com/xamarin/AndroidDesigner.EPL

Android SDK Manager
Version: 17.4.0.24
Hash: b3b6672
Branch: remotes/origin/HEAD~1
Build date: 2022-08-04 16:27:22 UTC

Android Device Manager
Version: 0.0.0.1179
Hash: 0f220c0
Branch: main
Build date: 2022-08-04 16:27:22 UTC

Xamarin Designer
Version: 17.4.0.32
Hash: 439b92ed7b
Branch: remotes/origin/d17-4
Build date: 2022-08-04 16:27:17 UTC

Apple Developer Tools
Xcode 13.3 (20102)
Build 13E113

Xamarin.Mac
Version: 8.12.0.2 (Visual Studio Community)
Hash: 87f98a75e
Branch: d17-3
Build date: 2022-07-25 20:18:54-0400

Xamarin.iOS
Version: 15.12.0.2 (Visual Studio Community)
Hash: 87f98a75e
Branch: d17-3
Build date: 2022-07-25 20:18:55-0400

Build Information
Release ID: 1704000715
Git revision: 09071dadfc1b81e4f0e2c9505cd8a5ef0b41d312
Build date: 2022-08-04 16:24:56+00
Build branch: release-17.4
Build lane: release-17.4

Operating System
Mac OS X 12.5.0
Darwin 21.6.0 Darwin Kernel Version 21.6.0
    Sat Jun 18 17:07:25 PDT 2022
    root:xnu-8020.140.41~1/RELEASE_X86_64 x86_64
beeradmoore commented 1 year ago

Also confirming I run through on current 17.3 stable and current 17.4 preview. MAUI development is recommended to be on 17.4 preview but did the test on both, from what I can tell on Twitter the previous MAUI stuff in 17.3 preview is now in 17.3 stable and 17.4 preview so far has very minimal changes.

Tested on debug iOS (iOS 16 beta 5), debug+release on macOS 12.5. Worked fine. Seems to be fixed so will be closing.

VS4Mac Stable system information πŸ‘ˆ ``` Visual Studio Community 2022 for Mac Version 17.3 (build 2102) Installation UUID: 1543f36a-53e7-40a1-9ee0-9b65d2718747 Runtime .NET 6.0.5 (64-bit) Architecture: X64 Roslyn (Language Service) 4.3.0-3.22312.2+52adfb8b2dc71ed4278debcf13960f2116868608 Xamarin Designer Version: 17.3.0.208 Hash: 0de472ea0 Branch: remotes/origin/d17-3 Build date: 2022-08-03 21:18:36 UTC NuGet Version: 6.2.1.2 .NET SDK (x64) SDK: /usr/local/share/dotnet/sdk/6.0.400/Sdks SDK Versions: 6.0.400 6.0.400-preview.22330.6 6.0.302 MSBuild SDKs: /Applications/Visual Studio.app/Contents/MonoBundle/MSBuild/Current/bin/Sdks .NET Runtime (x64) Runtime: /usr/local/share/dotnet/dotnet Runtime Versions: 6.0.8 6.0.7 5.0.17 3.1.27 Xamarin.Profiler Version: 1.8.0.19 Location: /Applications/Xamarin Profiler.app/Contents/MacOS/Xamarin Profiler Updater Version: 11 Apple Developer Tools Xcode 13.4.1 (20504) Build 13F100 Xamarin.Mac Version: 8.12.0.2 (Visual Studio Community) Hash: 87f98a75e Branch: d17-3 Build date: 2022-07-25 20:18:54-0400 Xamarin.iOS Version: 15.12.0.2 (Visual Studio Community) Hash: 87f98a75e Branch: d17-3 Build date: 2022-07-25 20:18:55-0400 Xamarin.Android Version: 13.0.0.0 (Visual Studio Community) Commit: xamarin-android/d17-3/030cd63 Android SDK: /Volumes/Storage/Library/Developer/Xamarin/android-sdk-macosx Supported Android versions: 12.0 (API level 31) 11.0 (API level 30) SDK Command-line Tools Version: 7.0 SDK Platform Tools Version: 33.0.2 SDK Build Tools Version: 33.0.0 Build Information: Mono: dffa5ab Java.Interop: xamarin/java.interop/d17-3@7716ae53 SQLite: xamarin/sqlite/3.38.5@df4deab Xamarin.Android Tools: xamarin/xamarin-android-tools/main@14076a6 Microsoft Build of OpenJDK Java SDK: /Library/Java/JavaVirtualMachines/microsoft-11.jdk 11.0.12 Android Designer EPL code available here: https://github.com/xamarin/AndroidDesigner.EPL Eclipse Temurin JDK Java SDK: /Library/Java/JavaVirtualMachines/temurin-8.jdk 1.8.0.302 Android Designer EPL code available here: https://github.com/xamarin/AndroidDesigner.EPL Android SDK Manager Version: 17.3.0.23 Hash: 965bf40 Branch: remotes/origin/d17-3 Build date: 2022-08-03 21:18:42 UTC Android Device Manager Version: 0.0.0.1169 Hash: fafb1d5 Branch: fafb1d5 Build date: 2022-08-03 21:18:42 UTC Build Information Release ID: 1703002102 Git revision: 7a27f71b7aeb9b846940c9f8994c9ef7a694f0c2 Build date: 2022-08-03 21:16:13+00 Build branch: release-17.3 Build lane: release-17.3 Operating System Mac OS X 12.5.0 Darwin 21.6.0 Darwin Kernel Version 21.6.0 Sat Jun 18 17:07:25 PDT 2022 root:xnu-8020.140.41~1/RELEASE_X86_64 x86_64 ```
VS4Mac Preview system information πŸ‘ˆ ``` Visual Studio Community 2022 for Mac Preview Version 17.4 Preview (17.4 build 715) Installation UUID: 87133677-f2cb-43d0-9202-f8abf65c33ba Runtime .NET 6.0.5 (64-bit) Architecture: X64 Xamarin Designer Version: 17.4.0.32 Hash: 439b92ed7b Branch: remotes/origin/d17-4 Build date: 2022-08-04 16:27:17 UTC Roslyn (Language Service) 4.4.0-1.22371.1+c07f2571612b471671c809b5b0db59b0c37aab57 NuGet Version: 6.2.1.2 .NET SDK (x64) SDK: /usr/local/share/dotnet/sdk/6.0.400/Sdks SDK Versions: 6.0.400 6.0.400-preview.22330.6 6.0.302 MSBuild SDKs: /Applications/Visual Studio (Preview).app/Contents/MonoBundle/MSBuild/Current/bin/Sdks .NET Runtime (x64) Runtime: /usr/local/share/dotnet/dotnet Runtime Versions: 6.0.8 6.0.7 5.0.17 3.1.27 Xamarin.Profiler Version: 1.8.0.19 Location: /Applications/Xamarin Profiler.app/Contents/MacOS/Xamarin Profiler Updater Version: 11 Apple Developer Tools Xcode 13.4.1 (20504) Build 13F100 Xamarin.Mac Version: 8.12.0.2 (Visual Studio Community) Hash: 87f98a75e Branch: d17-3 Build date: 2022-07-25 20:18:54-0400 Xamarin.iOS Version: 15.12.0.2 (Visual Studio Community) Hash: 87f98a75e Branch: d17-3 Build date: 2022-07-25 20:18:55-0400 Xamarin.Android Version: 13.0.0.0 (Visual Studio Community) Commit: xamarin-android/d17-3/030cd63 Android SDK: /Volumes/Storage/Library/Developer/Xamarin/android-sdk-macosx Supported Android versions: 12.0 (API level 31) 11.0 (API level 30) SDK Command-line Tools Version: 7.0 SDK Platform Tools Version: 33.0.2 SDK Build Tools Version: 33.0.0 Build Information: Mono: dffa5ab Java.Interop: xamarin/java.interop/d17-3@7716ae53 SQLite: xamarin/sqlite/3.38.5@df4deab Xamarin.Android Tools: xamarin/xamarin-android-tools/main@14076a6 Microsoft Build of OpenJDK Java SDK: /Library/Java/JavaVirtualMachines/microsoft-11.jdk 11.0.12 Android Designer EPL code available here: https://github.com/xamarin/AndroidDesigner.EPL Eclipse Temurin JDK Java SDK: /Library/Java/JavaVirtualMachines/temurin-8.jdk 1.8.0.302 Android Designer EPL code available here: https://github.com/xamarin/AndroidDesigner.EPL Android SDK Manager Version: 17.4.0.24 Hash: b3b6672 Branch: remotes/origin/HEAD~1 Build date: 2022-08-04 16:27:22 UTC Android Device Manager Version: 0.0.0.1179 Hash: 0f220c0 Branch: main Build date: 2022-08-04 16:27:22 UTC Build Information Release ID: 1704000715 Git revision: 09071dadfc1b81e4f0e2c9505cd8a5ef0b41d312 Build date: 2022-08-04 16:24:56+00 Build branch: release-17.4 Build lane: release-17.4 Operating System Mac OS X 12.5.0 Darwin 21.6.0 Darwin Kernel Version 21.6.0 Sat Jun 18 17:07:25 PDT 2022 root:xnu-8020.140.41~1/RELEASE_X86_64 x86_64 ```
ooikengsiang commented 1 year ago

Anyone who face the same problem and already updated to Visual Studio for Mac 17.4 you need the following nuget library: sqlite-net-pcl version 1.8.116
SQLitePCLRaw.bundle_green version at least 2.1.0

If you just install sqlite-net-pcl, the default version of SQLitePCLRaw.bundle_green came with it is still not enough.