我有一个程序集,它链接到 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/