Skip to main content

Provides build-time licensing validation used by Six Labors libraries. Not intended or supported for use outside Six Labors projects.

Total Downloads
11.1K
11,122
Published
Oct 9, 2026
28d ago

Get Started

dotnet add package SixLabors.Licensing --version 1.0.3
ProductVersions
.NET
net6.0net8.0
Other
.NETFramework4.7.2

README

SixLabors.Licensing

Build-time licensing validation for Six Labors libraries. Not for third-party use.

This package enables build-time license checks for projects that directly reference Six Labors libraries (e.g., ImageSharp). It does not flow transitively and is not intended or supported outside Six Labors projects.

Usage (for consumers of Six Labors libraries)

Add a license file named sixlabors.lic to your repo root, or set this property:

  path/to/sixlabors.lic

To avoid storing the license on disk, set the license key directly from your environment or secret storage:

  $(SIXLABORS_LICENSE_KEY)

With the project property above, set SIXLABORS_LICENSE_KEY to the complete contents of your issued license. Use the original value without escaping. The following examples show an assembly-scoped community license. Replace the entire example value with your issued license contents.

In PowerShell, use:

# Quotes preserve the semicolons between fields and the pipe between signatures.
$env:SIXLABORS_LICENSE_KEY = 'Id=;Kind=Community;ExpiryDateUtc=;Key=Assembly:|'
dotnet build
dotnet publish

In Bash, use:

# Quotes preserve the semicolons between fields and the pipe between signatures.
export SIXLABORS_LICENSE_KEY='Id=;Kind=Community;ExpiryDateUtc=;Key=Assembly:|'
dotnet build
dotnet publish

Passing the license through a command-line property

If you pass the license directly through -p:SixLaborsLicenseKey, escape every semicolon as %253B. MSBuild treats semicolons as property separators even inside a quoted argument. Its command-line parser consumes %25, and the validator restores %3B to ;. This applies to both unrestricted and assembly-scoped licenses. The | between assembly signatures stays unchanged.

In PowerShell:

# Escape field separators only when passing the license through -p:.
dotnet build "-p:SixLaborsLicenseKey=$($env:SIXLABORS_LICENSE_KEY.Replace(';', '%253B'))"
dotnet publish "-p:SixLaborsLicenseKey=$($env:SIXLABORS_LICENSE_KEY.Replace(';', '%253B'))"

In Bash:

# Escape field separators only when passing the license through -p:.
dotnet build "-p:SixLaborsLicenseKey=${SIXLABORS_LICENSE_KEY//;/%253B}"
dotnet publish "-p:SixLaborsLicenseKey=${SIXLABORS_LICENSE_KEY//;/%253B}"

Build as normal. If the license is missing or invalid, the build fails with a clear error.

Notes

  • You do not need to reference this package directly; it is carried by Six Labors libraries.
  • External consumption is unsupported and may change without notice.

License

Copyright © Six Labors Licensed under the Six Labors Split License.

Downloads by Version

Depended On By

Find packages that declare this package as a dependency. NuGet does not provide a reverse-dependency endpoint, so candidates are checked on demand.

Adoption Assessment

A verified publisher signal is available. Assess fit from the package's supported frameworks, license and dependency graph rather than popularity alone.

No SPDX license expression is published. Review the license text and your organisation's policy before redistribution.Compatibility metadata lists 3 target frameworks; confirm the exact target used by your application.

Related Guides & Workflows

Learn how to evaluate, integrate, or audit this package in your .NET project.