[UWP] [桌面桥]在Appx包中嵌入DLL [英] [UWP] [Desktop Bridge] Embedding DLLs in Appx package

查看:83
本文介绍了[UWP] [桌面桥]在Appx包中嵌入DLL的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在为UWP桌面应用程序创作Appx包时,可以将哪些类型的库(DLL)作为Appx包的一部分嵌入是否有任何限制? 


我的应用程序我想要"包装"使用Appx包使用一些DLL。我将这些DLL作为解决方案的一部分 - 作为"内容",附带  "总是复制"选项。其中一些DLL是由我的解决方案构建的,其他的是第三个
派对。我的DLL可以打包到Appx包中。然而,有些第三方DLL无法


当我构建Packaging项目时,我收到以下错误(总是关于
无法序列化baml
[我猜这些第三方DLL的一部分)) 


"错误MSB4018"GenerateResource""任务意外失败。 System.InvalidOperationException:类型为'System.IO.UnmanagedMemoryStream'的名为'themes / generic / vectorlayer.baml'的项目无法添加到资源文件中,因为它不是
serializable。"


例如:DevExpress.Xpf.Map.v11.2.dll,WPFToolkit.dll - 我无法弄清楚如何将这两个作为appx包的一部分...(在构建期间获得上述序列化错误) )。但是在最终的应用程序中仍然需要这些 


更新:似乎我的问题缩小到了嵌入在这些DLL中的BAML(预编译的XAML)的WPF DLL。任何想法如何将这样的DLL作为Appx包的一部分包含在内?  

解决方案

您好,


您能解释为什么将这些dll作为内容嵌入吗?  


Are there any limitations on what kind of libraries (DLL) can be embedded as part of Appx package when authoring Appx package for UWP Desktop Application ? 

My application which I want to "wrap" with Appx package uses some DLLs. I enclosed these DLLs as part of the solution - as "content", with  "copy always" option. Some of these DLLs are built by my solution, other are 3rd party ones. My DLLs can be packaged into the Appx bundle. Some of the 3rd party DLLs however can't

When I build the Packaging project I get the following error (always about not being able to serialize baml [i guess being part of these 3rd party DLLs)) 

"Error MSB4018 The "GenerateResource" task failed unexpectedly. System.InvalidOperationException: Item named 'themes/generic/vectorlayer.baml' of type 'System.IO.UnmanagedMemoryStream' cannot be added to the resource file because it is not serializable."

For example: DevExpress.Xpf.Map.v11.2.dll, WPFToolkit.dll - I can't figure out how to enclose these two as part of appx package... (getting the above serialization error during build). But still need these in the final application 

Update: it seems that my problem is narrowed down to WPF DLLs with BAML (precompiled XAML) embedded in these DLLs. Any ideas how to enclose such DLL as part of Appx package ?  

解决方案

Hello,

Can you explain why you embed these dll's as content? 


这篇关于[UWP] [桌面桥]在Appx包中嵌入DLL的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆