PaGetto.Protocol
1.2.0
Prefix Reserved
dotnet add package PaGetto.Protocol --version 1.2.0
NuGet\Install-Package PaGetto.Protocol -Version 1.2.0
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="PaGetto.Protocol" Version="1.2.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="PaGetto.Protocol" Version="1.2.0" />
<PackageReference Include="PaGetto.Protocol" />
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add PaGetto.Protocol --version 1.2.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: PaGetto.Protocol, 1.2.0"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package PaGetto.Protocol@1.2.0
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=PaGetto.Protocol&version=1.2.0
#tool nuget:?package=PaGetto.Protocol&version=1.2.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
PaGetto.Protocol
PaGetto's client library for the NuGet protocol. PaGetto uses it for feed mirrors, and you can use it to talk to nuget.org or any other NuGet v3 server. See the documentation and the samples.
Getting started
dotnet add package PaGetto.Protocol
Examples
List Package Versions
Find all versions of the Newtonsoft.Json package:
NuGetClient client = new NuGetClient("https://api.nuget.org/v3/index.json");
IReadOnlyList<NuGetVersion> versions = await client.ListPackageVersionsAsync("Newtonsoft.Json");
foreach (NuGetVersion version in versions)
{
Console.WriteLine($"Found version: {version}");
}
Download a package
NuGetClient client = new NuGetClient("https://api.nuget.org/v3/index.json");
string packageId = "Newtonsoft.Json";
NuGetVersion packageVersion = new NuGetVersion("12.0.1");
using (Stream packageStream = await client.DownloadPackageAsync(packageId, packageVersion))
{
Console.WriteLine($"Downloaded package {packageId} {packageVersion}");
}
Find Package Metadata
NuGetClient client = new NuGetClient("https://api.nuget.org/v3/index.json");
// Find the metadata for all versions of a package.
IReadOnlyList<PackageMetadata> items = await client.GetPackageMetadataAsync("Newtonsoft.Json");
if (!items.Any())
{
Console.WriteLine($"Package 'Newtonsoft.Json' does not exist");
return;
}
foreach (var metadata in items)
{
Console.WriteLine($"Version: {metadata.Version}");
Console.WriteLine($"Listed: {metadata.Listed}");
Console.WriteLine($"Tags: {metadata.Tags}");
Console.WriteLine($"Description: {metadata.Description}");
}
// Or, find the metadata for a single version of a package.
string packageId = "Newtonsoft.Json";
NuGetVersion packageVersion = new NuGetVersion("12.0.1");
PackageMetadata versionMetadata = await client.GetPackageMetadataAsync(packageId, packageVersion);
Console.WriteLine($"Listed: {versionMetadata.Listed}");
Console.WriteLine($"Tags: {versionMetadata.Tags}");
Console.WriteLine($"Description: {versionMetadata.Description}");
Search for packages
Search for "json" packages:
NuGetClient client = new NuGetClient("https://api.nuget.org/v3/index.json");
IReadOnlyList<SearchResult> results = await client.SearchAsync("json");
foreach (SearchResult result in results)
{
Console.WriteLine($"Found package {result.PackageId} {result.Version}");
}
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
| .NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
| .NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
| .NET Framework | net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
| MonoAndroid | monoandroid was computed. |
| MonoMac | monomac was computed. |
| MonoTouch | monotouch was computed. |
| Tizen | tizen40 was computed. tizen60 was computed. |
| Xamarin.iOS | xamarinios was computed. |
| Xamarin.Mac | xamarinmac was computed. |
| Xamarin.TVOS | xamarintvos was computed. |
| Xamarin.WatchOS | xamarinwatchos was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
.NETStandard 2.0
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 10.0.12)
- Microsoft.Extensions.Logging.Abstractions (>= 10.0.12)
- NuGet.Frameworks (>= 6.14.3)
- NuGet.Versioning (>= 6.14.3)
- System.Text.Json (>= 10.0.12)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on PaGetto.Protocol:
| Package | Downloads |
|---|---|
|
PaGetto.Core
The core libraries that power PaGetto. |
GitHub repositories
This package is not used by any popular GitHub repositories.