【发布时间】:2019-12-10 07:59:33
【问题描述】:
我从事的项目需要在 WPF 窗口内显示来自 UWP 库的 UWP 控件。 这是我的工作所依据的文档页面(查看添加自定义 UWP 控件的部分): https://docs.microsoft.com/en-us/windows/communitytoolkit/controls/wpf-winforms/windowsxamlhost#add-a-custom-uwp-control
已设置 WPF 窗口,它在运行时显示标准 UWP 控件(如按钮)就好了。但是,当我包含 UWP 项目时,WPF 窗口会在启动时抛出异常(在 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。但是和这些库冲突没有任何意义?
【问题讨论】:
标签: wpf xaml uwp shared-libraries