mercredi 29 avril 2015

SQLitePCL - A SQLite Wrapper assembly for the current platform was not found

I had a previous WP8 cordova project that I would like to run on windows, so i have built my project using the command

cordova build windows

I now have a cordova project that targets windows 8, windows 8.1 and windows phone 8.1. I am using the cordova plugin to access SQLite via my web UI, which works perfectly fine.

In my previous WP8 project, i could call c# code by creating a new plugin, and thus acccessed the SQLite database.

In my new project, i have had to create a new portable class library and to access SQLite in this library, i have added a reference to SQLitePCL via

install-package SQLitePCL

Upon running this command, a readme file appears and tells you to install the following files, which i have done

Windows Store 8.0

Please, verify that the extension SDK SQLite for Windows Runtime v3.8.7.2, from the SQLite.org site (http://ift.tt/1HQUWUN), has been properly installed.

Windows Store 8.1

Please, verify that the extension SDK SQLite for Windows Runtime (Windows 8.1) v3.8.7.2, from the SQLite.org site (http://ift.tt/1bDdUSs), has been properly installed.

Windows Phone 8

Please, verify that the extension SDK SQLite for Windows Phone v3.8.7.2, from the SQLite.org site (http://ift.tt/1HQUWUP), has been properly installed.

Windows Phone 8.1

Please, verify that the extension SDK SQLite for Windows Phone 8.1 v3.8.7.2, from the SQLite.org site (http://ift.tt/1bDdX0z), has been properly installed.

So i am guessing that i have completed the installation successfully?

Now when i try to access this class library via my web ui, i get the following error

System.InvalidOperationException: A SQLite Wrapper assembly for the current platform was not found. Ensure that the current project references both SQLitePCL and the following platform-specific assembly: SQLitePCL.Ext. at System.Runtime.InteropServices.WindowsRuntime.ManagedActivationFactory.ActivateInstance()

and

WinRT information: System.InvalidOperationException: A SQLite Wrapper assembly for the current platform was not found. Ensure that the current project references both SQLitePCL and the following platform-specific assembly: SQLitePCL.Ext. at System.Runtime.InteropServices.WindowsRuntime.ManagedActivationFactory.ActivateInstance()

Why am i getting this error? I am running this on a windows 8.1 laptop.

Aucun commentaire:

Enregistrer un commentaire