如何使用 nuget 分发特定于处理器的 WindowsStore 程序集 [英] How to distribute processor-specific WindowsStore assemblies with nuget

查看:55
本文介绍了如何使用 nuget 分发特定于处理器的 WindowsStore 程序集的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个程序集,它链接到适用于 Windows 应用商店应用程序的本机 Sqlite.

I've got an assembly which links to native Sqlite for Windows Store apps.

因为 Sqlite 是原生的,所以这个程序集不能使用 AnyCPU 配置文件 - 相反,它必须提供单独的 AnyCPU/x86/x64 程序集.

Because Sqlite is native, then this assembly cannot use the AnyCPU profile - instead it has to supply separate AnyCPU/x86/x64 assemblies.

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

I'd like to distribute this set of assemblies via nuget - so that when the package is imported then the nuget installer installs separate assemblies into each platform configuration within the csproj file.

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

Has anyone done this before or have an example of it being done? Does anyone have any suggestions for how it can be done?

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

Update With Nuget2.5 I have been told this is possible - see https://nuget.codeplex.com/discussions/396720 - but I can't work out how... does anyone have any samples of this working?

谢谢

斯图尔特

推荐答案

NuGet 无法做到,因为它不支持特定于架构的部署.

It cannot be done with NuGet, as it does not support architecture specific deployments.

来自 Tim Heuer 的博客页面 SQLite 与 Windows 8 应用程序:

From Tim Heuer's blog page SQLite with Windows 8 Apps:

为什么没有 NuGet?好吧,NuGet 基础结构现在不支持这些围绕本机组件的语义中的一些来处理标头、链接和特定于体系结构的部署.我们将继续与他们合作,看看我们是否可以将这些变化引入该平台.

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 问题跟踪器中的工作项:为装配平台添加第一类支持

See also the work item in the Issue Tracker for Nuget: Add 1st class support for assembly platform

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

One way to do it is probably the same way as SQLite, via an extension package. I have personally not done that though, although googling does seem to bring up examples on how to create extensions.

这篇关于如何使用 nuget 分发特定于处理器的 WindowsStore 程序集的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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