Reference to SQLitePCL.Ext needed; buggy nuget package?

Apr 27, 2014 at 8:36 PM
I have two Windows Store projects.
One project I've created just for testing the portable Sqlite library. Everythings works fine.
In the other existing project I've added the same library for accessing the Sqlite db.
But in this solution I get an error that a SQLitePCL.Ext library is missing.
If I reference this library in the nuget build folder, the project is running well.

If I compare the two solutions I cannot find a reason why I once have to add the Ext library and why once I haven't.

Is it possible the the nuget package is buggy?
Why do you have a build folder in it?
Why is the content of the bulid folder not part of the lib folder?
In the lib/wp8 folder also the sqlite.ext library is embedded, but not in the lib win8 folder.
Developer
Apr 28, 2014 at 9:13 PM
Hi @judgy,

At package installation we're adding architecture specific SQLitePCL.Ext.dll (x86/x64/ARM) for the Platforms that require this, and that cannot use an 'Any CPU' dll. That's the reason why we do this through the build folder, using the SQLitePCL.props file (adding the required dlls as Copy Always content), instead of using a regular reference in the lib folder.

The NuGet package installation needs to be performed on each project using this solution, in order to make sure the required steps are done.
May 20, 2014 at 3:50 PM
I have similar issues when trying to use the sqllitepcl.ext.dll via the Azure Mobile Services SQL Lite Sync integration. I created 2 test projects to try and diagnose the issue and saw some interesting results.

The first Project is just a Windows 8.1 project (non universal) and the SQLitePCL.props file copies the SQLitePCL.EXT.dll correctly into the bin/x86/Debug directory for x86 and everything works fine.

The second Project is a Windows 8.1 universal project and the SQLLitePCL.props file copies the SQLitePCL.EXT.dll into a location that is not picked up during runtime, it copies the dll into bin/x86/Debug/x86.

I have been trying to figure out why this happens and I get the error:

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."} System.Exception {System.InvalidOperationException}

Any insight would be useful to allow me to continue to use this in a Universal project.
May 20, 2014 at 4:04 PM
I updated my SQLitePCL.props file in packages\SQLitePCL.3.8.4.3\build\netcore45 as follows to get it to work on my universal project.

<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Content  Include="$(MSBuildThisFileDirectory)$(Platform)\SQLitePCL.Ext.dll" >
<Link>%(Filename)%(Extension)</Link>
  <CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
<Content  Include="$(MSBuildThisFileDirectory)$(Platform)\SQLitePCL.Ext.pri" >
<Link>%(Filename)%(Extension)</Link>
  <CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
</ItemGroup>
</Project>

This seemed to resolve my issue.
Developer
Jun 21, 2014 at 8:01 PM
Hi,

We've added WP81 support, both Runtime and Silverlight, in the latest release.

We're also supporting W81 universal apps.

We've incorporated @jslavin62 fix to the package.
Marked as answer by leotilli on 9/5/2014 at 11:28 AM
Mar 8, 2015 at 11:25 AM
I'm getting same error for windows phone 8.1 project.
package is SQLitePCL.3.8.7.2.

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.

i have updated it to sqlite-wp81-winrt-3080803.vsix extensions too, but same error.

what could be the problem?. Here is my project references. Screen shot