The PackagingTools.Sdk assembly provides a thin PackagingClient facade for running packaging pipelines directly inside custom build automation, MSBuild tasks, or orchestration services.
using PackagingTools.Core.Models;
using PackagingTools.Sdk;
var client = PackagingClient.CreateDefault();
var options = new PackagingRunOptions("./projects/sample.json", PackagingPlatform.Windows)
{
Configuration = "Release",
OutputDirectory = "./artifacts/windows"
};
options.Formats.Add("msi");
options.Properties["windows.signing.certificatePath"] = "certs/code-sign.pfx";
var result = await client.PackAsync(options);
if (!result.Success)
{
foreach (var issue in result.Issues)
{
Console.Error.WriteLine($"{issue.Severity}: {issue.Code} - {issue.Message}");
}
return 1;
}
foreach (var artifact in result.Artifacts)
{
Console.WriteLine($"Created {artifact.Format} -> {artifact.Path}");
}
IncludeWindows, IncludeMac, or IncludeLinux when you want to inject custom pipelines.options.PolicyEvaluator and options.AgentBroker.options.ConfigureServices to extend the internal service collection (e.g., register stub pipelines in tests or swap telemetry channels).PackagingClientOptions.PluginDirectories to add folders that every run should probe.PackagingRunOptions.PluginDirectories; relative paths are resolved against the project file.plugins.directories metadata key (the Avalonia workspace exposes a multi-line editor).PACKAGINGTOOLS_PLUGIN_PATHS for environment-specific locations. The SDK also probes <app base>/plugins and %APPDATA%/PackagingTools/plugins (or their macOS/Linux equivalents).IPlugin implementations; disabled manifests are skipped so the host keeps running even if individual plugins fail to load.PackAsync(PackagingProject, PackagingRequest) when you already have a deserialised project and wish to control the request lifecycle explicitly.