SQLitePCL.raw: MissingMethod exceptions on Xamarin Targets

This seems to happen with later versions of VS2019 and VS2022

But when moving the same app with no modification on VS 2022, I get a

System.MissingMethodException: Method not found: int SQLitePCL.raw.sqlite3_bind_blob(SQLitePCL.sqlite3_stmt,int,System.ReadOnlySpan1)'

It wasn’t happening before then. Only happens on certain Xamarin targets.

Here are some other links to repos where the issue is happening https://github.com/praeclarum/sqlite-net/issues/1074 https://github.com/reactiveui/Akavache/issues/735

There is a minimal repro in this closed issue which was a duplicate https://github.com/reactiveui/Akavache/issues/738

I’ve released a new version of Akavache with all the latest libraries and built with VS2022 but doesn’t seem to help users

About this issue

  • Original URL
  • State: open
  • Created 3 years ago
  • Reactions: 2
  • Comments: 36 (15 by maintainers)

Most upvoted comments

I’m using the repro project mentioned above, in VS 2022. I’ve updated the Akavache nuget package. I’m using a default-ish Android emulator, a Pixel 5, API 30, which Visual Studio offered to setup for me yesterday.

When I run the app in Debug, I see the MissingMethod exception.

When I run it in Release, it seems to work fine, with no exception.

Anybody else seeing this?

Visual Studio 2022 17.0.3 just released, and it seems to have resolved the issue for me. I noticed an issue in the release notes, Bug in Visual studio 2022 + Xamarin + SignalR (method not found), that seems to have been the culprit.

It is my understanding that this problem is due to a bug in Mono. The following link (also posted in a comment above) contains more information:

https://developercommunity.visualstudio.com/t/Bug-in-Visual-studio-2022--Xamarin--Si/1528510

In terms of “things that might make the bug go away”, that page mentions some people having success with turning off XAML Hot Reload?

I don’t currently know of any way I could even do a workaround.