使用Nuget.exe下载Nuget包

问题描述 投票:0回答:1

我正在开发一个自动化解决方案,用于将 nuget 包从 nuget.org 传输到私有 nuget feed。是否可以使用 nuget.exe 下载 nuget 包?如果我运行以下命令,它会失败,因为它尝试将其安装到目录中,但我不需要安装包,我只需要下载它。

.\nuget.exe install Microsoft.AspNetCore.App.Runtime.linux-x64 -source nuget.org -force

这会引发以下错误:

Error NU5000: Package 'Microsoft.AspNetCore.App.Runtime.linux-x64 7.0.1' has a package type 'DotnetPlatform' that is not supported by project 'C:\foo'.

我正在寻找类似 -force 选项的东西,这样我就可以直接下载包而不安装它。

nuget nuget-package
1个回答
0
投票

我也有同样的问题! nuget.exe 似乎有一些关于目标是什么的提示: 错误 NU5000:包“Microsoft.NETCore.App.Host.win-x64 7.0.14”具有项目“c:\Nuget”不支持的包类型“DotnetPlatform”。

似乎没有不可知论的方法可以把金块带回家,除此之外别无其他。

© www.soinside.com 2019 - 2024. All rights reserved.