JetBrains.NuGet.Packaging 6.9.20240506.130

Prefix Reserved
The owner has unlisted this package. This could mean that the package is deprecated, has security vulnerabilities or shouldn't be used anymore.
dotnet add package JetBrains.NuGet.Packaging --version 6.9.20240506.130                
NuGet\Install-Package JetBrains.NuGet.Packaging -Version 6.9.20240506.130                
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="JetBrains.NuGet.Packaging" Version="6.9.20240506.130" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add JetBrains.NuGet.Packaging --version 6.9.20240506.130                
#r "nuget: JetBrains.NuGet.Packaging, 6.9.20240506.130"                
#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.
// Install JetBrains.NuGet.Packaging as a Cake Addin
#addin nuget:?package=JetBrains.NuGet.Packaging&version=6.9.20240506.130

// Install JetBrains.NuGet.Packaging as a Cake Tool
#tool nuget:?package=JetBrains.NuGet.Packaging&version=6.9.20240506.130                

Nuget.Packaging

NuGet.Packaging is a NuGet client SDK library that provides a set of APIs to interact with .nupkg and .nuspec files from a stream. It provides a way for developers to create and read packages and work with the package metadata.

Usage

It is strongly recommended that NuGet packages are created using the official NuGet tooling and instead of this low-level API. There are a variety of characteristics important for a well-formed package and the latest version of tooling helps incorporate these best practices.

For more information about creating NuGet packages, see the overview of the package creation workflow and the documentation for official pack tooling (for example, using the dotnet CLI).

Examples

Create a package

Create a package, set metadata, and add dependencies.

PackageBuilder builder = new PackageBuilder();
builder.Id = "MyPackage";
builder.Version = new NuGetVersion("1.0.0-beta");
builder.Description = "My package created from the API.";
builder.Authors.Add("Sample author");
builder.DependencyGroups.Add(new PackageDependencyGroup(
    targetFramework: NuGetFramework.Parse("netstandard1.4"),
    packages: new[]
    {
        new PackageDependency("Newtonsoft.Json", VersionRange.Parse("10.0.1"))
    }));

using FileStream outputStream = new FileStream("MyPackage.nupkg", FileMode.Create);
builder.Save(outputStream);
Console.WriteLine($"Saved a package to {outputStream.Name}");

Read a package

Read a package from a file.

using FileStream inputStream = new FileStream("MyPackage.nupkg", FileMode.Open);
using PackageArchiveReader reader = new PackageArchiveReader(inputStream);
NuspecReader nuspec = reader.NuspecReader;
Console.WriteLine($"ID: {nuspec.GetId()}");
Console.WriteLine($"Version: {nuspec.GetVersion()}");
Console.WriteLine($"Description: {nuspec.GetDescription()}");
Console.WriteLine($"Authors: {nuspec.GetAuthors()}");

Console.WriteLine("Dependencies:");
foreach (PackageDependencyGroup dependencyGroup in nuspec.GetDependencyGroups())
{
    Console.WriteLine($" - {dependencyGroup.TargetFramework.GetShortFolderName()}");
    foreach (var dependency in dependencyGroup.Packages)
    {
        Console.WriteLine($"   > {dependency.Id} {dependency.VersionRange}");
    }
}

Additional documentation

More information about the NuGet.Packaging library can be found on the official Microsoft documentation page and NuGet API docs.

Product Compatible and additional computed target framework versions.
.NET net5.0 is compatible.  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. 
.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 is compatible.  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.

NuGet packages (14)

Showing the top 5 NuGet packages that depend on JetBrains.NuGet.Packaging:

Package Downloads
JetBrains.Platform.Core.Shell

JetBrains Platform Core Shell Package Version 233.0.20240606.110126

JetBrains.Platform.Core.Ide

JetBrains Platform Core Ide Package Version 233.0.20240606.111243

JetBrains.Psi.Features.Core

JetBrains Psi Features Core Package Version 233.0.20240606.112012

JetBrains.Psi.Features.src

JetBrains Psi Features src Package Version 233.0.20240606.112012

JetBrains.Psi.Features.UnitTesting

JetBrains Psi Features UnitTesting Package Version 233.0.20240606.112012

GitHub repositories (1)

Showing the top 1 popular GitHub repositories that depend on JetBrains.NuGet.Packaging:

Repository Stars
JetBrains/resharper-unity
Unity support for both ReSharper and Rider
Version Downloads Last updated