tomchavakis / nuget-license

.NET Core tool to print or save all the licenses of a project
Apache License 2.0
280 stars 83 forks source link

Add option to show only runtime dependencies (no analyzers, local tools, etc) #166

Open OwnageIsMagic opened 2 years ago

OwnageIsMagic commented 2 years ago

It can possibly detected if <PrivateAssets> or <ExcludeAssets> within <PackageReference> contains all or combination of compile; runtime; contentFiles; native or

    <packageTypes>
      <packageType name="DotnetTool" /> <!-- or Template-->
    </packageTypes>

in package manifest

https://learn.microsoft.com/en-us/nuget/consume-packages/package-references-in-project-files#controlling-dependency-assets https://learn.microsoft.com/en-us/nuget/create-packages/set-package-type?tabs=dotnet


i.e. https://www.nuget.org/packages/SonarAnalyzer.CSharp/ is using LGPL and it sometimes hard to fight with legal department about LGPL/GPL.

sensslen commented 1 year ago

What is the output of dotnet list package --include-transitive? Does it include the analyzer? If not, please consider using Version 3.0.0-alpha which uses the same machanisms as dotnet.