LicenseGatherer provides license information from all transitive NuGet dependencies of your solution.
This tool only gathers licenses from projects using the project SDK.
As global tool
dotnet tool install --global LicenseGatherer
As local tool
dotnet tool install LicenseGatherer
Usage: LicenseGatherer [options]
Options:
-p|--path <PATH_TO_PROJECT_OR_SOLUTION> The path of the project or solution to gather the licenses. A directory can be specified, the value
must end with \, then for a solution in the working directory is searched. (optional)
-o|--outputpath <OUTPUT_PATH> The path of the JSON content output. If the no value is specified some information is printed into
the console. (optional)
-s|--skipdownload Skip the download of licenses
-?|-h|--help Show help information
The generated JSON file consists of the following schema:
An array of packages.
One package has these properties
Name | Type | Explanation |
---|---|---|
PackageReference | object | An object containing information of the package. |
LicenseContent | string | The content of the license. |
OriginalLicenseLocation | string | The url of the given license. |
DownloadedLicenseLocation | string | The corrected url of the license. E.g. It replaces the github url with the raw once. |
LicenseExpression | object | The license expression of the package. |
Authors | string | The authors of the package. |
Contains an object of the type NuGet.Packaging.Licenses.NuGetLicense
Name | Type | Explanation |
---|---|---|
Identifier | string | The identifier according to spdx |
Plus | boolean | Signifies whether the plus operator has been specified on this license |
IsStandardLicense | boolean | Signifies whether this is a standard license known by the NuGet APIs |
Type | integer | 0: License, 1: Operator |
Name | Type | Explanation |
---|---|---|
Name | string | The name of the package dependency |
ResolvedVersion | object | The runtime version. This value can differ from the version in the configuration |
Contains an object of the type NuGet.Versioning.NuGetVersion.
Name | Type | Explanation |
---|---|---|
Version | string | A System.Version representation of the version without metadata or release labels. |
IsLegacyVersion | boolean | True if the NuGetVersion is using legacy behavior. |
Revision | integer | Revision version R (x.y.z.R) |
IsSemVer2 | boolean | Returns true if version is a SemVer 2.0.0 version |
OriginalVersion | string | Returns the original, non-normalized version string. |
Major | integer | Major version X (X.y.z) |
Minor | integer | Minor version Y (x.Y.z) |
Patch | integer | Patch version Z (x.y.Z) |
ReleaseLabels | array of string | A collection of pre-release labels attached to the version. |
Release | string | The full pre-release label for the version. |
IsPrerelease | boolean | True if pre-release labels exist for the version. |
HasMetadata | boolean | True if metadata exists for the version. |
Metadata | string | Build metadata attached to the version. |
- Create a fork and make a Pull Request
- Submit a bug
- Submit an idea
Licensed under MIT