Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
2 tasks done
Haplois opened this issue Mar 22, 2021 · 0 comments · Fixed by #846
Closed
2 tasks done

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

Haplois opened this issue Mar 22, 2021 · 0 comments · Fixed by #846
Assignees

Comments

@Haplois
Copy link
Contributor

Haplois commented Mar 22, 2021

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

@Haplois Haplois added enhancement Help-Wanted The issue is up-for-grabs, and can be claimed by commenting labels Mar 22, 2021
@Haplois Haplois self-assigned this May 30, 2021
@Haplois Haplois added sprint and removed Help-Wanted The issue is up-for-grabs, and can be claimed by commenting labels May 30, 2021
@pavelhorak pavelhorak removed the sprint label Sep 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants