ericsink / SQLitePCL.raw

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

Missing methods with SQLitePCLRaw.bundle_green (Xamarin.Forms UWP, Net standard 2.0) #313

Closed E75 closed 2 years ago

E75 commented 4 years ago

Compiling release builds using SQLitePCLRaw.bundle_green 2.0.2 is broken as it features missing methods.

Errors: afbeelding

Targeting: afbeelding

Note: This is in a Xamarin.Forms UWP C# application with a .NET standard 2.0 target. Building without "Compile with .Net Native tool chain" option seems to be working

xanderh commented 4 years ago

I have a similar issue on Xamarin.android with version 2.0.2. The error we're getting is the following: Method not found: string SQLitePCL.raw.sqlite3_column_name(SQLitePCL.sqlite3_stmt,int)

Unfortunately, this crashes our app on startup.

demogog commented 4 years ago

I have the same issue with Xamarin.iOS

ericsink commented 4 years ago

@xanderh The original problem at the top of this issue is very specific to UWP. Your Android problem may be similar, but it cannot be the same. Please open a new issue and include full details.

ericsink commented 4 years ago

@demogog The original problem at the top of this issue is very specific to UWP. Your iOS problem may be similar, but it cannot be the same. Please open a new issue and include full details.

E75 commented 4 years ago

@ericsink any updates about the UWP issue?

ericsink commented 4 years ago

@E75 I can't reproduce the problem. My UWP test project builds in release mode with 2.0.2 with no errors. I tried various combinations of Min and Target version, including the exact settings you showed above, and it works for me.

demogog commented 4 years ago

@E75 we have resolved our iOS issue by triple-checking the package version. As it turned out, SQLitePCLRaw.Core and SQLitePCLRaw.bundle_green were updated from 1.1.13 to 2.0.2 in one of the projects. We ended up removing all sqlite packages from all projects and installed sqlite-net-pcl package version 1.6.292 again. And it installed all the required dependencies in with the correct versions.

E75 commented 4 years ago

@ericsink I'm using the following packages:

<PackageReference Include="akavache">
  <Version>6.9.10</Version>
</PackageReference>
<PackageReference Include="Microsoft.AppCenter">
  <Version>2.6.2</Version>
</PackageReference>
<PackageReference Include="Microsoft.AppCenter.Analytics">
  <Version>2.6.2</Version>
</PackageReference>
<PackageReference Include="Microsoft.AppCenter.Crashes">
  <Version>2.6.2</Version>
<PackageReference Include="SQLitePCLRaw.bundle_green">
  <Version>2.0.2</Version>
  <ExcludeAssets>All</ExcludeAssets>
</PackageReference>
<PackageReference Include="Newtonsoft.Json">
  <Version>12.0.3</Version>
</PackageReference>
<PackageReference Include="Xamarin.Forms" Version="4.1.0.778454" />
<PackageReference Include="Microsoft.NETCore.UniversalWindowsPlatform" Version="6.2.9" />

Maybe the Akavache version 6.9.10 and AppCenter SDK components cause this problem?

ericsink commented 4 years ago

Yes. AppCenter currently uses SQLitePCLRaw 1.x, and is therefore incompatible with SQLitePCLRaw 2.0. I've been told they're working on a fix.

E75 commented 4 years ago

@ericsink okey, thanks :). is there no temporary solution that I can use it for now?

ericsink commented 4 years ago

There is a mention of a possible workaround in aspnet/EntityFrameworkCore#19156, but I have not tried it myself.

E75 commented 4 years ago

@ericsink nope doesn't work. I removed the AppCenter SDK from UWP app, but without success :( This is really a mess..

ericsink commented 2 years ago

Closing old/stale issue.