Closed Trinitek closed 7 months ago
I'm having a hard time getting the build to work, which is stopping me from adding tests:
-------- dotnet pack -c Release in c:\source\repos\SQLitePCL.raw\src\SQLitePCLRaw.lib.e_sqlite3.android
MSBuild version 17.6.3+07e294721 for .NET
Determining projects to restore...
c:\source\repos\SQLitePCL.raw\src\SQLitePCLRaw.lib.e_sqlite3.android\SQLitePCLRaw.lib.e_sqlite3.android.csproj : error MSB4057: The target "_GetRestoreSettingsPerFramework" does not exist in the project. [TargetFramework=monoandroid9.0
I already have MAUI and Xamarin workloads installed for VS 2022. Not sure what I'm missing.
You may want to compare what you have installed against what is installed by the GitHub action in this repo. We're probably still building with stuff a bit older than VS 2022 for classic Xamarin.
@Trinitek target issue for monoandroid9.0
means it can't find the android 9.0 libs it needs to target it. It is usually an issue with not finding the right Android API in this case API 28.
To install API 28, open visual studio without opening a project.
Go to Tools
--> Android
--> Android SDK Manager
Install Android SDK platform 28
Thanks @farzonl. I've made some progress on this but I'm now blocked on the iOS project, similar to the issue with Android.
I'm actually wondering if I truly need to have VS 2019 instead of 2022? I wondered if that was the README being out of date, but maybe not. I'll give that a try next.
-------- dotnet pack -c Release in C:\Users\trini\source\repos\sqlitepcl-serialize-deserialize\SQLitePCL.raw\src\SQLitePCLRaw.lib.e_sqlite3.ios
MSBuild version 17.7.3+4fca21998 for .NET
Determining projects to restore...
C:\Users\trini\source\repos\sqlitepcl-serialize-deserialize\SQLitePCL.raw\src\SQLitePCLRaw.lib.e_sqlite3.ios\SQLitePCLRaw.lib.e_sqlite3.ios.csproj : error MSB4057: The target "_GetRestoreSettingsPerFramework" does not exist in the project. [TargetFramework=xamarin.ios10]
I am running this from the VS 2022 Developer prompt as mentioned by the README. Here are my workloads:
> dotnet workload list
Installed Workload Id Manifest Version Installation Source
-------------------------------------------------------------------------------
android 33.0.95/7.0.100 SDK 7.0.400, VS 17.7.34221.43
ios 16.4.7124/7.0.100 SDK 7.0.400, VS 17.7.34221.43
maccatalyst 16.4.7124/7.0.100 SDK 7.0.400, VS 17.7.34221.43
maui-ios 7.0.100/7.0.100 SDK 7.0.400, VS 17.7.34221.43
tvos 16.4.7124/7.0.100 SDK 7.0.400
maui-windows 7.0.100/7.0.100 VS 17.7.34221.43
maui-maccatalyst 7.0.100/7.0.100 VS 17.7.34221.43
maui-android 7.0.100/7.0.100 VS 17.7.34221.43
I'm actually wondering if I truly need to have VS 2019 instead of 2022? I wondered if that was the README being out of date, but maybe not. I'll give that a try next.
Yeah that was it. 🤦 VS 2019 with the dotnet 3.1 SDK.
@ericsink This is ready for a re-review whenever you have a chance.
Hmmm. I wonder why Github isn't offering me a chance to run the build/test action on this PR.
Never mind previous comment. The tests do pass. I'm still reviewing the diffs.
Nice work on this PR. Thanks, and I apologize for all the delays.
Closes #530.
This also exposes
sqlite3_malloc
,sqlite3_malloc64
, andsqlite3_free
because these are necessary for consumers to fully utilize the serialization functions.For
sqlite3_deserialize
I decided to takeIntPtr
andlong
size parameters instead of aReadOnlySpan<byte>
as I originally wanted to do because spans only have anint
Length property, which would cap the database size at 2 GB. I did not want to impose that sort of artificial limitation.