windows-8 - 如何使用 nuget 分发特定于处理器的 WindowsStore 程序集

标签 windows-8 windows-runtime windows-store-apps nuget

我有一个程序集,它链接到 Windows 应用商店应用程序的 native Sqlite。

由于 Sqlite 是 native 的,因此该程序集无法使用 AnyCPU 配置文件 - 相反,它必须提供单独的 AnyCPU/x86/x64 程序集。

我想通过 nuget 分发这组程序集 - 以便在导入包时,nuget 安装程序将单独的程序集安装到 csproj 文件中的每个平台配置中。

以前有人这样做过或者有这样做的例子吗?有人对如何做到这一点有任何建议吗?

更新 使用 Nuget2.5 我被告知这是可能的 - 请参阅 https://nuget.codeplex.com/discussions/396720 - 但我不知道如何...有人有这个工作的任何样本吗?

谢谢

斯图尔特

最佳答案

它无法使用 NuGet 完成,因为它不支持特定于架构的部署。

摘自 Tim Heuer 的博客页面 SQLite with Windows 8 Apps :

Why no NuGet? Well, the NuGet infrastructure right now doesn’t support some of these semantics around native components to deal with headers, linking and architecture-specific deployments. We’ll continue to work with them to see if we can drive these changes into that platform.

另请参阅 Nuget 问题跟踪器中的工作项:Add 1st class support for assembly platform

一种方法可能与 SQLite 相同,通过扩展包。不过,我个人并没有这样做,尽管谷歌搜索似乎确实提供了有关如何创建扩展的示例。

关于windows-8 - 如何使用 nuget 分发特定于处理器的 WindowsStore 程序集,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15726996/

相关文章:

c# - 如何在 WinRT 应用程序中获取实际语言?

c# - 在 WinRT 中处理控件上的水平滑动

c# - 如何在 Windows 应用商店应用程序中获取本地主机 IP 地址?

performance - 在另一台计算机上查看 xperf ETL 文件时出错

javascript - 如何在 Windows 8 中进行 JSON 解析

c# - 在 Windows 8/8.1 商店应用程序中搜索并连接到蓝牙设备?

c# - gridview C# 中滚动查看器的水平偏移

c# - WinRT 定时注销

xaml - 在 FlipView 上禁用导航

c# - 在动画中使用时模糊的文本 block