PCL vs .NET Standard library for SQLite in UWP

2019-06-27 00:01发布

问题:

I have following problem.

I use Portable library in my UWP application (Portable library is shared with Xamarin app). This portable library references SQLite. In this Portable library I also use Prism and Unity. For that reason I still can't upgrade them to .NET Standard. SQLite library I use is SQLite-net-pcl version 1.4.18.

In my UWP app I add same nugget package. The problem is that this nugget package also support .net standard, as result, when I build my UWP library, I got different version of SQLite-net.dll, from netstandard1.1.

And as result of this, when I run application I got an exception:

"Could not load file or assembly 'SQLite-net, Version=1.4.118.0, Culture=neutral, PublicKeyToken=null'. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)". Which is understandable, since SQLite-net dll in bin folder is different (it even has different version).

What I would want to do is to use PCL dll in my UWP app at this point, is there a way to force it? Any other ideas how to solve it?

回答1:

Filed this issue on Github

Should be resolved in 1.5.166-beta