-
Notifications
You must be signed in to change notification settings - Fork 291
Switch to using a LICENSE expression instead of a file #804
Description
What needs to be done:
- Update the .nuspec files to use a LICENSE expression instead of an embedded file.
- Add
licenseUrlpointinghttps://licenses.nuget.org/MITfor backwards compatibility.
This package is a better example since Microsoft owns it.
Nuget seems to have problems linking to extension-less license files
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)
