我应该如何创建或上传 32 位和 64 位 NuGet 包? [英] How should I create or upload a 32-bit and 64-bit NuGet package?

查看:33
本文介绍了我应该如何创建或上传 32 位和 64 位 NuGet 包?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个 x86 和 x64 版本的二进制文件,我想上传到 NuGet.创建/上传该包的建议或所需方法是什么?我无法找到很多 以我的决定为基础.我看到两种方法...

  1. 将它们上传到同一个包中
    • 我应该默认安装哪个?
    • 有没有办法测试项目的处理器架构来做出决定?
  2. 上传两个单独的包

<小时>

额外问题:如果我使用像 Chocolatey 这样的东西,它用包管理器语义包装了 NuGet,该怎么办?我可能需要/想要在我的系统上安装 x86 和 x64 软件包.

解决方案

我们一直在讨论

a> Chocolatey Google Group 上的类似问题.NuGet 中没有内置任何语义.要求不是,你在什么处理器架构上运行.它必须是您的项目针对的是哪种处理器架构.然后这会使事情变得复杂……您还必须了解 AnyCPU.

我想现在,我要上传两个包.当我修复一个可以处理查询项目目标的 install.ps1 时,我总是可以发布一个组合的.

mypackage.x86mypackage.x64

I have an x86 and x64 version of a binary that I want to upload to NuGet. What's the recommendation or required method for creating/uploading that package? I can't find much to base my decision on. I see two methods...

  1. Upload them both in the same package
    • Which one should I install by default?
    • Is there a way to test the processor architecture of the project to make the decision?
  2. Upload two separate packages


Bonus question: What if I'm using something like Chocolatey, which wraps up NuGet with package manager semantics? I might need/want the x86 and x64 packages installed on my system.

解决方案

We've been discussing a similar issue on the Chocolatey Google Group. There aren't any semantics built into NuGet. The requirement wouldn't be, what processor architecture are you running on. It would have to be what processor architecture is your project targeting. And then that complicates things... you'd have to understand AnyCPU as well.

I think for now, I'm going to upload two packages. I can always published a combined one when I fix up an install.ps1 that can handle querying the project target.

mypackage.x86
mypackage.x64

这篇关于我应该如何创建或上传 32 位和 64 位 NuGet 包?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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