NuGetMirror.exe is a command line tool to mirror nuget.org to disk, or any NuGet v3 feed. It supports filtering package ids and wildcards to narrow down the set of mirrored packages.
NuGet.CatalogReader is a library for reading package ids, versions, and the change history of a NuGet v3 feeds or nuget.org.
- Download the latest nupkg from NuGet.org
- Extract tools/NuGetMirror.exe to a local folder and run it.
dotnet tool install -g nugetmirror
nugetmirror
should now be on your PATH
- Download the latest nupkg from NuGet.org
- Extract the nupkg to a local folder
dotnet <PathToNupkg>/tools/netcoreapp2.1/any/NuGetMirror.dll
AppVeyor | Travis | Visual Studio Online |
---|---|---|
CI builds are located on the following NuGet feed:
https://nuget.blob.core.windows.net/packages/index.json
The list of packages on this feed is here.
Mirror all packages to a folder on disk.
NuGetMirror.exe nupkgs https://api.nuget.org/v3/index.json -o d:\tmp
Discover all packages in a feed using GetFlattenedEntriesAsync
. To see the complete history including edits use GetEntriesAsync
.
var feed = new Uri("https://api.nuget.org/v3/index.json");
using (var catalog = new CatalogReader(feed))
{
foreach (var entry in await catalog.GetFlattenedEntriesAsync())
{
Console.WriteLine($"[{entry.CommitTimeStamp}] {entry.Id} {entry.Version}");
}
}
This solution uses .NET Core, get the tools here.