我从事的项目需要在 WPF 窗口内显示来自 UWP 库的 UWP 控件.这是我的工作所基于的文档页面(检查添加自定义 UWP 控件的部分):docs.microsoft/en-us/windows/communitytoolkit/controls/wpf-winforms/windowsxamlhost#add-a-custom-uwp-control
Project I work on need to show UWP control from UWP library inside of WPF window. Here is the document page on which I had based my work (check section for adding custom UWP control): docs.microsoft/en-us/windows/communitytoolkit/controls/wpf-winforms/windowsxamlhost#add-a-custom-uwp-control
设置了 WPF 窗口,它在运行时显示标准的 UWP 控件(如按钮)就好了.但是,当我包含 UWP 项目时,WPF 窗口在开始时(在 EF 的上下文初始化时)抛出异常.
Had setup WPF window and it shows standard UWP controls (like button) at the runtime just fine. However, when I include UWP project, WPF window throws exception at start (at the moment of context initialization of EF).
Could not load file or assembly 'Windows.Foundation.UniversalApiContract, Version=7.0.0.0, Culture=neutral, PublicKeyToken=null, ContentType=WindowsRuntime' or one of its dependencies. Operation is not supported. (Exception from HRESULT: 0x80131515)我使用的 Sqlite 版本是 1.0.88.0,EF 是 5.但它与这些库冲突没有任何意义?
Sqlite version I'm using is 1.0.88.0 and EF is 5. But it doesn't make any sense that it clashes with these libraries?
推荐答案通过将 SQLite 包更新到 1.0.111.0 和 EF 到 6.2.0 版,修复了启动时的问题.
Ffixed an issue on startup by updating SQLite package to 1.0.111.0 and EF to version 6.2.0.
更多推荐
在 WPF 项目中包含 UWP 项目会引发运行时错误
发布评论