UWP中用于SQLite的PCL与.NET标准库 [英] PCL vs .NET Standard library for SQLite in UWP
问题描述
我有以下问题.
我在UWP应用程序中使用可移植库(便携式库与Xamarin应用程序共享).该可移植库引用了SQLite.在此可移植库中,我还使用Prism和Unity.因此,我仍然无法将它们升级到.NET Standard.我使用的SQLite库是SQLite-net-pcl版本1.4.18.
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.
在我的UWP应用中,我添加了相同的块包.问题在于该块包还支持.net标准,因此,当我构建UWP库时,我从netstandard1.1获得了不同版本的SQLite-net.dll.
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:
无法加载文件或程序集'SQLite-net,版本= 1.4.118.0, 文化=中性,PublicKeyToken =空".找到的程序集清单 定义与程序集引用不匹配. (来自的例外 HRESULT:0x80131040).这是可以理解的,因为SQLite-net dll bin文件夹中的文件夹是不同的(甚至具有不同的版本).
"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).
我现在想做的是在我的UWP应用中使用PCL dll,有没有办法强制使用它?还有其他解决方法吗?
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?
推荐答案
将此问题提交到 Github
应该在 1.5.166-beta
这篇关于UWP中用于SQLite的PCL与.NET标准库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!