我应该如何创建或上传32位和64位的NuGet包?上传、NuGet

2023-09-07 23:10:26 作者:软肋

我有我想要上传到的NuGet二进制的x86和x64版本。什么是创建/上传一个包的建议或要求的方法?我不能find很多立足我的决定。我看到两种方法...

上传他们两个在同一个包 在哪一个我应该安装在默认情况下? 有没有一种方法来测试项目的处理器架构做出决定? 上传两个独立的包

奖金的问题:如果我使用像巧克力,它包装起来的NuGet与包管理器语义是什么?我可能需要/想安装在我的系统的x86和x64包。 解决方案

我们一直讨论在巧克力谷歌集团类似的问题。有没有内置的NuGet任何语义。要求不会,你的的运行的处理器架构。它必须是什么处理器架构是项目目标。的然后说复杂的事情......你要明白值为anycpu 以及

我觉得现在,我要上传两个包。我总能发表联合之一,当我确定了一个 install.ps1 ,可处理查询该项目的目标。

  mypackage.x86
mypackage.x64
 

基于微软开发平台构建和使用私有NuGet托管库

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...

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? 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