Skip to content

Switch to using a LICENSE expression instead of a file #804

@Haplois

Description

@Haplois

What needs to be done:

  • Update the .nuspec files to use a LICENSE expression instead of an embedded file.
  • Add licenseUrl pointing https://licenses.nuget.org/MIT for backwards compatibility.

This package is a better example since Microsoft owns it.


Nuget seems to have problems linking to extension-less license files

image

Scenario: I use Get-Package | Select-Object Id,LicenseUrl to list all licenses in my projects and for MSTest.TestAdapter it prints

MSTest.TestAdapter                                              https://aka.ms/deprecateLicenseUrl

As far as I understand the license displayed on show on https://www.nuget.org/packages/MSTest.TestAdapter/
is generated upon ingestion of the nuget package where it stores the license file from <PackageLicenseFile> and generates a valid link to it.

If this is changed to

<PackageLicenseExpression>MIT</PackageLicenseExpression>

the nuget pack will include https://licenses.nuget.org/MIT in the generated .nuspec file.

Optionally use a combined approach, using <PackageLicenseExpression> and embedding the license file, see https://github.com/JamesNK/Newtonsoft.Json/blob/master/Src/Newtonsoft.Json/Newtonsoft.Json.csproj

Originally posted by @jnyrup in #777 (comment)

AB#1335541

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions