Reputation: 7692
We have a UWP app that leverages Xamarin Forms. It uses SQLite via this .NET Standard library:
https://github.com/MelbourneDeveloper/SQLite.Net.Standard (this is my library which is a fork of https://github.com/oysteinkrog/SQLite.Net-PCL)
SQLite works fine in debug mode, and it also works fine when compiled for .NET Native. I believe we are referencing the physical C sqlite3 library file through a Visual Studio plugin like this:
However, when we try to upload this to the store, we get this series of error messages:
API sqlite3_backup_finish in libsqlite3_for_net.dll is not supported for this application type. SQLite.Net.Standard.dll calls this API.
API sqlite3_backup_init in libsqlite3_for_net.dll is not supported for this application type. SQLite.Net.Standard.dll calls this API.
API sqlite3_backup_pagecount in libsqlite3_for_net.dll is not supported for this application type. SQLite.Net.Standard.dll calls this API.
API sqlite3_backup_remaining in libsqlite3_for_net.dll is not supported for this application type. SQLite.Net.Standard.dll calls this API.
API sqlite3_backup_step in libsqlite3_for_net.dll is not supported for this application type. SQLite.Net.Standard.dll calls this API.
API sqlite3_bind_blob in libsqlite3_for_net.dll is not supported for this application type. SQLite.Net.Standard.dll calls this API.
API sqlite3_bind_double in libsqlite3_for_net.dll is not supported for this application type. SQLite.Net.Standard.dll calls this API.
API sqlite3_bind_int in libsqlite3_for_net.dll is not supported for this application type. SQLite.Net.Standard.dll calls this API.
API sqlite3_bind_int64 in libsqlite3_for_net.dll is not supported for this application type. SQLite.Net.Standard.dll calls this API.
API sqlite3_bind_null in libsqlite3_for_net.dll is not supported for this application type. SQLite.Net.Standard.dll calls this API.
API sqlite3_bind_parameter_index in libsqlite3_for_net.dll is not supported for this application type. SQLite.Net.Standard.dll calls this API.
API sqlite3_bind_text16 in libsqlite3_for_net.dll is not supported for this application type. SQLite.Net.Standard.dll calls this API.
API sqlite3_busy_timeout in libsqlite3_for_net.dll is not supported for this application type. SQLite.Net.Standard.dll calls this API.
API sqlite3_changes in libsqlite3_for_net.dll is not supported for this application type. SQLite.Net.Standard.dll calls this API.
API sqlite3_close in libsqlite3_for_net.dll is not supported for this application type. SQLite.Net.Standard.dll calls this API.
API sqlite3_column_blob in libsqlite3_for_net.dll is not supported for this application type. SQLite.Net.Standard.dll calls this API.
API sqlite3_column_bytes in libsqlite3_for_net.dll is not supported for this application type. SQLite.Net.Standard.dll calls this API.
API sqlite3_column_count in libsqlite3_for_net.dll is not supported for this application type. SQLite.Net.Standard.dll calls this API.
API sqlite3_column_double in libsqlite3_for_net.dll is not supported for this application type. SQLite.Net.Standard.dll calls this API.
API sqlite3_column_int in libsqlite3_for_net.dll is not supported for this application type. SQLite.Net.Standard.dll calls this API.
API sqlite3_column_int64 in libsqlite3_for_net.dll is not supported for this application type. SQLite.Net.Standard.dll calls this API.
API sqlite3_column_name16 in libsqlite3_for_net.dll is not supported for this application type. SQLite.Net.Standard.dll calls this API.
API sqlite3_column_text16 in libsqlite3_for_net.dll is not supported for this application type. SQLite.Net.Standard.dll calls this API.
API sqlite3_column_type in libsqlite3_for_net.dll is not supported for this application type. SQLite.Net.Standard.dll calls this API.
API sqlite3_config in libsqlite3_for_net.dll is not supported for this application type. SQLite.Net.Standard.dll calls this API.
API sqlite3_enable_load_extension in libsqlite3_for_net.dll is not supported for this application type. SQLite.Net.Standard.dll calls this API.
API sqlite3_errmsg16 in libsqlite3_for_net.dll is not supported for this application type. SQLite.Net.Standard.dll calls this API.
API sqlite3_extended_errcode in libsqlite3_for_net.dll is not supported for this application type. SQLite.Net.Standard.dll calls this API.
API sqlite3_finalize in libsqlite3_for_net.dll is not supported for this application type. SQLite.Net.Standard.dll calls this API.
API sqlite3_initialize in libsqlite3_for_net.dll is not supported for this application type. SQLite.Net.Standard.dll calls this API.
API sqlite3_last_insert_rowid in libsqlite3_for_net.dll is not supported for this application type. SQLite.Net.Standard.dll calls this API.
API sqlite3_libversion_number in libsqlite3_for_net.dll is not supported for this application type. SQLite.Net.Standard.dll calls this API.
API sqlite3_open in libsqlite3_for_net.dll is not supported for this application type. SQLite.Net.Standard.dll calls this API.
API sqlite3_open16 in libsqlite3_for_net.dll is not supported for this application type. SQLite.Net.Standard.dll calls this API.
API sqlite3_open_v2 in libsqlite3_for_net.dll is not supported for this application type. SQLite.Net.Standard.dll calls this API.
API sqlite3_prepare16_v2 in libsqlite3_for_net.dll is not supported for this application type. SQLite.Net.Standard.dll calls this API.
API sqlite3_reset in libsqlite3_for_net.dll is not supported for this application type. SQLite.Net.Standard.dll calls this API.
API sqlite3_shutdown in libsqlite3_for_net.dll is not supported for this application type. SQLite.Net.Standard.dll calls this API.
API sqlite3_sleep in libsqlite3_for_net.dll is not supported for this application type. SQLite.Net.Standard.dll calls this API.
API sqlite3_sourceid in libsqlite3_for_net.dll is not supported for this application type. SQLite.Net.Standard.dll calls this API.
API sqlite3_step in libsqlite3_for_net.dll is not supported for this application type. SQLite.Net.Standard.dll calls this API.
API sqlite3_win32_set_directory in libsqlite3_for_net.dll is not supported for this application type. SQLite.Net.Standard.dll calls this API.
So, my question is: why is Microsoft rejecting this?
From looking around, it seems like we might be using the wrong version of the sqlite 3 library. But, which one are we supposed to use? Is there a specific one for Xamarin? Why is the package spitting out a file called libsqlite3_for_net.dll? Why not just sqlite3.dll?
Is there a document somewhere on how to get SQLite in to an app in the Windows Store?
Upvotes: 1
Views: 352
Reputation: 942
The problem is that libsqlite3_for_net.dll is only available on iOS. Remove the DllImport for that dll from the shared code so that the dll is not required on platforms that do not have that dll available.
Upvotes: 1