Inedo.UPack 2.1.4

The ID prefix of this package has been reserved for one of the owners of this package by NuGet.org. Prefix Reserved
dotnet add package Inedo.UPack --version 2.1.4
NuGet\Install-Package Inedo.UPack -Version 2.1.4
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="Inedo.UPack" Version="2.1.4" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Inedo.UPack --version 2.1.4
#r "nuget: Inedo.UPack, 2.1.4"
#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 Inedo.UPack as a Cake Addin
#addin nuget:?package=Inedo.UPack&version=2.1.4

// Install Inedo.UPack as a Cake Tool
#tool nuget:?package=Inedo.UPack&version=2.1.4

UpackLib.NET

Build status

This library is a work-in-progress set of utilities for working with Universal Packages and feeds.

Installation

Add a reference to Inedo.UPack using NuGet package manager.

Creating a Package

Use the UniversalPackageBuilder class to create a new .upack file:

var metadata = new UniversalPackageMetadata
{
    Group = "my/group",
    Name = "MyPackage",
    Version = UniversalPackageVersion.Parse("1.0.0"),
    Title = "My Test Package",
    Description = "This is where a useful description would go.",
    ["_customProperty"] = "I am a custom, extended property."
};

using (var builder = new UniversalPackageBuilder("MyPackage.upack", metadata))
{
    // Recursively add all files and directories from C:\Test\MyFiles to the package
    await builder.AddContentsAsync(@"C:\Test\MyFiles", "", true);
}

Opening a Package

Create an instance of the UniversalPackage class:

using (var package = new UniversalPackage("MyPackage.upack"))
{
}

Read Package Metadata

Access the properties on a UniversalPackage instance:

Console.WriteLine($"Package name: {package.Name}");
Console.WriteLine($"Package version: {package.Version}");

// The UniversalPackage class only provides basic metadata.
// To get a copy of all metadata, call the GetFullMetadata method.
var fullMetadata = package.GetFullMetadata();
Console.WriteLine($"Package title: {fullMetadata.Title}");

Extract Package Contents

Use the ExtractContentItemsAsync method on a UniversalPackage instance:

await package.ExtractContentItemsAsync(@"C:\Test\UnpackedPackage");

Opening the Package Registry

Use the GetRegistry method on the PackageRegistry class:

using (var registry = PackageRegistry.GetRegistry(true /*true for user registry*/))
{
}

Registering a Package

Lock the package registry and call the RegisterPackageAsync method on a PackageRegistry instance:

await registry.LockAsync();
await registry.RegisterPackageAsync(
    new RegisteredPackage
    {
        Group = "my/group",
        Name = "MyPackage",
        Version = "1.0.0",
        InstallPath = @"C:\Test\UnpackedPackage",
        InstallationDate = DateTimeOffset.Now.ToString("o"),
        InstallationReason = "No reason - just a test!",
        InstalledUsing = "My upack client",
        InstalledBy = "Steve"
    }
);

Getting a List of Registered Packages

Call the GetInstalledPackagesAsync method on a PackageRegistry instance:

foreach (var p in await registry.GetInstalledPackagesAsync())
    Console.WriteLine($"{p.Name} {p.Version}");

Connecting to a Universal Package Feed

Create a new instance of the UniversalFeedClient class:

var feed = new UniversalFeedClient("http://upack.example.com/feed");

List Feed Packages in a Group

Call ListPackagesAsync on a UniversalFeedClient instance:

var packages = await feed.ListPackagesAsync("my/group", null);

Download a Feed Package to a File

Call GetPackageStreamAsync on a UniversalFeedClient instance to get a stream:

using (var packageStream = await feed.GetPackageStreamAsync(UniversalPackageId.Parse("my/group/MyPackage"), UniversalPackageVersion.Parse("1.0.0")))
using (var fileStream = File.Create(@"C:\Test\DownloadedPackage.upack"))
{
    await packageStream.CopyToAsync(fileStream);
}

Upload a Package to a Feed

Call UploadPackageAsync on a UniversalFeedClient instance:

using (var fileStream = File.OpenRead(@"C:\Test\SourcePackage.upack"))
{
    await feed.UploadPackageAsync(fileStream);
}
Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 is compatible.  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 is compatible.  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 is compatible.  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 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

  • net6.0

    • No dependencies.
  • net7.0

    • No dependencies.
  • net8.0

    • No dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
2.1.4 35 4/25/2024
2.1.4-rc.1 35 4/25/2024
2.1.3 1,032 6/25/2023
2.1.3-rc.1 65 6/25/2023
2.1.1 711 2/20/2023
2.1.1-rc.5 85 2/20/2023
2.1.0 865 12/12/2022
2.1.0-rc.1 82 12/12/2022
2.0.4 652 11/30/2022
2.0.4-rc.5 88 11/30/2022
2.0.3 1,157 11/10/2022
2.0.3-rc.1 87 11/10/2022
2.0.2 842 10/18/2022
2.0.2-rc.10 84 10/18/2022
2.0.2-rc.6 92 8/30/2022
2.0.1 1,044 5/23/2022
2.0.1-rc.1 115 5/23/2022
2.0.0 778 5/6/2022
2.0.0-rc.5 114 5/6/2022
1.1.1 1,146 2/15/2022
1.1.1-rc.1 110 2/15/2022
1.1.0 799 2/8/2022
1.1.0-rc.1 107 2/8/2022
1.0.11 1,109 7/13/2021
1.0.11-rc.2 158 7/13/2021
1.0.10 798 4/1/2021
1.0.10-rc.3 152 3/31/2021
1.0.10-rc.2 148 3/31/2021
1.0.9 1,325 11/20/2020
1.0.9-rc.1 208 11/20/2020
1.0.8 2,992 4/1/2020
1.0.8-rc.2 300 4/1/2020
1.0.7 927 3/31/2020
1.0.7-rc.7 257 3/30/2020
1.0.7-pre0001 919 2/5/2019
1.0.6 2,548 1/14/2019
1.0.6-pre0001 943 1/14/2019
1.0.5 1,237 1/11/2019
1.0.5-pre0001 914 1/11/2019
1.0.4 1,083 12/6/2018
1.0.4-pre0001 999 12/6/2018
1.0.3 1,101 11/20/2018
1.0.3-pre0001 929 11/20/2018
1.0.2 1,178 9/19/2018
1.0.2-pre0001 983 9/19/2018
1.0.1 1,249 8/16/2018
1.0.1-pre0001 1,063 8/16/2018
1.0.0 1,372 6/13/2018
1.0.0-pre0002 1,087 6/13/2018
0.8.1-pre0004 1,205 5/25/2018
0.8.1-pre0001 1,164 5/23/2018
0.8.0-pre0001 1,136 5/7/2018