Skip to content

.NET Core tool to print or save all the licenses of a project

License

Notifications You must be signed in to change notification settings

jmartasek/nuget-license

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

73 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Nuget License Utility Build Status NuGet

A .net core tool to print the licenses of a project. This tool support .NET Core and .NET Standard Projects.

dotnet-project-licenses tool

Install tool

dotnet tool install --global dotnet-project-licenses

Uninstall tool

dotnet tool uninstall --global dotnet-project-licenses

Usage

Usage: dotnet-project-licenses [options]

** Options:

Option Description
-i, --input Project Folder
--allowed-license-types Simple json file of a text array of allowable licenses, if no file is given, all are assumed allowed
-j, --json (Default: false) Saves licenses list in a json file (licenses.json)
--include-project-file (Default: false) Adds project file path to information when enabled.
-l, --log-level (Default: Error) Sets log level for output display. Options: Error,Warning,Information,Verbose.
--manual-package-information Simple json file of an array of LibraryInfo objects for manually determined packages.
--licenseurl-to-license-mappings Simple json file of Dictinary<string,string> to override default mappings
--include-transitive Include distinct transitive package licenses per project file.
-o, --output (Default: false) Saves as text file (licenses.txt)
--outfile Output filename
--projects-filter Simple json file of a text array of projects to skip. Supports Ends with matching such as 'Tests.csproj'
--packages-filter Simple json file of a text array of packages to skip.
-u, --unique (Default: false) Unique licenses list by Id/Version
-p, --print (Default: true) Print licenses.
--export-license-texts Exports the raw license texts
--help Display this help screen.
--version Display version information.

Example tool commands

dotnet-project-licenses --help
dotnet-project-licenses -i projectFolder

Print unique licenses

Values for the input may include a folder path, a Visual Studio '.sln' file, or a '.csproj' file.

dotnet-project-licenses -i projectFolder -u

Creates output file of unique licenses in a plain text 'licenses.txt' file in current directory

dotnet-project-licenses -i projectFolder -u -o

Create output file 'new-name.txt' in another directory

dotnet-project-licenses -i projectFolder -o --outfile ../../../another/folder/new-name.txt

Creates output json file of unique licences in a file 'licenses.json' in the current directory

dotnet-project-licenses -i projectFolder -u -o -j

Exports all license texts in the current directory

dotnet-project-licenses -i projectFolder --export-license-texts

CONTRIBUTORS

  • bmcdavid

  • mersadk

  • devproffesional

  • fjaouani

  • mkuckert

  • sensslen

  • amis92

  • rafntor

About

.NET Core tool to print or save all the licenses of a project

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C# 100.0%