Open Meir017 opened 1 year ago
Hey @Meir017,
There should be simpler ways to achieve that via the SDK. You can check out an implementation of a tool I started some time ago.
In order to consider adding something like that as a first level command, we would need to know about the scenarios and get more upvotes.
@nkolev92 my scenario is to download a package and it's dependencies. The dependencies part is the MVP of this
@Meir017 Does nuget.exe install fit your needs?
@nkolev92 I don't want to extract the nupkg files, basically I wabt something like nuget install --DownloadType nupkg
NuGet install has a -PackageSaveMode
option, but it seems like all these commands have an implied default, which is a unusual when there's an explicit option, but probably too risky to change. https://github.com/NuGet/NuGet.Client/blob/19d1a116a44313910dc9c9a9d1e274727ad82830/src/NuGet.Clients/NuGet.CommandLine/Commands/DownloadCommandBase.cs#L68-L70
@nkolev92 maybe adding a new explict flag for specifying to skip archive extraction?
@Meir017
Sure that could be option, which is why we're keeping this issue open. We're not necessarily prescribing a specific solution yet.
Please refer to https://github.com/NuGet/Home/blob/dev/Issue-Triage-Policy.md. At this point, we want to listen for community feedback and if there's enough feedback on the topic, we can retriage and reprioritize this issue.
Our use-case is that we package our app-suite in nuget packages (1 per app/service), and through the package dependencies can create a customized download for each customer. We want to pre-download all packages before we run the actual installation process that unpacks everything because our customers do not always have stable and fast internet available.
The nuget install <PackageIdHere> -DirectDownload -PackageSaveMode nupkg
does almost what we want, except that it also unpacks the nupkg.
A -PackageSaveMode nupkgonly
that prevents unpacking would be nice.
So, basically i'm asking for the return of the mirror command that can only mirror to a local folder.
NuGet Product(s) Involved
NuGet.exe
The Elevator Pitch
to allow working in an closed network we need to upload multiple nupkg files to our internal nuget registry (ex: artifactory).
Additional Context and Details
I'm able to achieve this using nuget's SDK (see https://github.com/Meir017/nupkg-downloader)