简体   繁体   中英

Can't create tables with some reference to SQLiteNetExtensions in UWP Xamarin.Forms

I am trying to implement the SQLiteNetExtensions.Async nuget in a Xamarin.Forms project but when I try to create a table with some reference to SQLiteNetExtensions I get the following exception when trying to create a table ( only happens in UWP, in the rest of platforms it works well ): Could not load file or assembly 'SQLite-net, Version=1.4.118.0, Culture=neutral, PublicKeyToken=null'. The system cannot find the specified file.

I use these versions:

SQLiteNetExtensions.Async version 2.1.0: https://www.nuget.org/packages/SQLiteNetExtensions.Async/

Xamarin.Forms version 5.0.0.2012

I have managed to solve this problem, after downloading the source code of SQLite-Net Extensions from the original repository I have proceeded to update the target framework from the version .NET Standard 1.1 to .NET Standard 2.0 of the SQLiteNetExtensions project and SQLiteNetExtensionsAsync from the original repository and I have created a local nuget of those two projects which I have imported into my project.

I have also posted a pull request in the original repository to integrate the fix: https://bitbucket.org/twincoders/sqlite-net-extensions/pull-requests/32/fix-crash-in-uwp-for-xamarinforms

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM