-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Does SQLite-net-pcl support .NET 6.0 and .NET Maui? #1102
Comments
I can confirm it works (tested on win/android) using latest SQLitePCLRaw 2.1.0 prerelease. |
Hey @IndianaGary! Just like @ZoranUnkovic I find that it "just works" ™️ I have to add these to my .NET MAUI csproj (see underneath) but with that it works as before. <PackageReference Include="sqlite-net-pcl" Version="1.8.116" />
<PackageReference Include="SQLitePCLRaw.core" Version="2.1.0-pre20220207221914" />
<PackageReference Include="SQLitePCLRaw.bundle_green" Version="2.1.0-pre20220207221914" />
<PackageReference Include="SQLitePCLRaw.provider.dynamic_cdecl" Version="2.1.0-pre20220207221914" />
<PackageReference Include="SQLitePCLRaw.provider.sqlite3" Version="2.1.0-pre20220207221914" /> |
Hi Gerald, yes, I confirmed that it works just last week. Regards, Gary |
When I tried it, the app works normally in debug mode. But when deployed in release mode, encountering the following startup crash in .NET 6, MAUI RC3, Android 11
|
What finally worked for me is
Hope it helps someone. Thanks |
Came across this issue right now. Looked into However it's still somewhat broke here. iOS simulator debug runs fine. |
@beeradmoore Please log an issue in the SQLitePCL.raw repo and include full details of your configuration and the error. If possible, attach a minimal reproduction project. |
I've found that this workaround from @jfversluis works for Android, but it works without it on Windows, and breaks it on Windows if included. Adding |
Just working on a net6 project on a M1 Mac. Using sqlite-net-pcl did not work (as previously reported by @beeradmoore : macOS debug dies with ---> System.DllNotFoundException: sqlite3) The workaround I found for the net6 project is to add these package references to the .csproj
and add SQLite.cs and SQLiteAsync.cs directly to the project. I will test that this also works for windows, linux, iOS and android in a foreseeable future. If this works then the issue could be somewhere in the packaging of sqlite-net-pcl in terms on selecting the correct platform target? |
That issues I reported went away with an update. I don't recall if it was workload, SDK, dotnet, or IDE. I may have said it in the issue before I closed it. For those iOS/macOS at least it working out of the box again. |
My experience with Maui was that it worked fine for WinUI but when switching to the Android platform, I got an "Unable to load DLL 'e_sqlite3'" error. I then took a look at Vladislav Antonyuks MauiSamples ( https://github.com/VladislavAntonyuk/MauiSamples ) that worked well. The only difference to my code was that he didn't host the database service in the main Maui project but in a subproject, referencing the four SQLitePCLRaw.* packages in the main project and only the sqlite-net in the subproject. After I changed my code accordingly, the DLL load exception went away. |
・実行時のDllNotFoundException回避のためSQLitePCLRaw追加 praeclarum/sqlite-net#1102 ・以下のエラー回避のため、AssemblyAttributesの生成を無効化 https://stackoverflow.com/questions/61997928/errorcs0579duplicate-globalsystem-runtime-versioning-targetframeworkattribu .NETCoreApp,Version=v6.0.AssemblyAttributes.cs(12,12): Error CS0579: 'global::System.Runtime.Versioning.TargetFrameworkAttribute' 属性が重複しています (CS0579)
I've been using SQLite-net-pcl with nearly all my Xamarin Forms projects for nearly 3 years and I am about to port some of them to .NET Maui. I am blocked from doing so at this point for lack of an equivalent SQLite implementation; or, at least, I'm unaware of the existence of one. I really don't want to have to rewrite my data access code if I can avoid it, but at this point, I need to make a move soon. I really don't like the overhead of EF and I am unsure of whether any of the SQLite NuGet packages are viable. I really like the simplicity of the current implementation.
My question is: are there plans to provide equivalent functionality for .NET 6.0 and .NET Maui?
I thank you for your past efforts and hope that the future brings SQLite to .NET 6 and Maui.
UPDATE: I just discovered #1056 from August of last year. Unless something undocumented has occurred in the last 7-8 months, I can't say I'm very optimistic about the future.
The text was updated successfully, but these errors were encountered: