Skip to content

Use MIT SPDX license identifier in Nuget metadata#84

Open
tsondergaard wants to merge 1 commit intonreco:masterfrom
tsondergaard:use-spdx-license-identifier
Open

Use MIT SPDX license identifier in Nuget metadata#84
tsondergaard wants to merge 1 commit intonreco:masterfrom
tsondergaard:use-spdx-license-identifier

Conversation

@tsondergaard
Copy link

licenseUrl is deprecated in the nuget spec. Using an SPDX identifier for the license is the recommended approach.

https://learn.microsoft.com/en-us/nuget/reference/nuspec#licenseurl
https://learn.microsoft.com/en-us/nuget/reference/msbuild-targets#packing-a-license-expression-or-a-license-file

This is of practical importance for downstream projects that use automatic tools to inspect and document licenses. This is the "licenses" element that dotnet-CycloneDX currently generates for NReco.Logging:

"licenses": [
  {
    "license": {
      "name": "Unknown - See URL",
      "url": "https://raw.githubusercontent.com/nreco/logging/master/LICENSE"
    }
  }
]

With this commit it becomes simply:

"licenses": [
  {
    "license": {
      "id": "MIT"
    }
  }
]

licenseUrl is deprecated in the nuget spec. Using an SPDX identifier
for the license is the recommended approach.

https://learn.microsoft.com/en-us/nuget/reference/nuspec#licenseurl
https://learn.microsoft.com/en-us/nuget/reference/msbuild-targets#packing-a-license-expression-or-a-license-file

This is of practical importance for downstream projects that use
automatic tools to inspect and document licenses. This is the
"licenses" element that dotnet-CycloneDX currently generates for
NReco.Logging:

    "licenses": [
      {
        "license": {
          "name": "Unknown - See URL",
          "url": "https://raw.githubusercontent.com/nreco/logging/master/LICENSE"
        }
      }
    ]

With this commit it becomes simply:

    "licenses": [
      {
        "license": {
          "id": "MIT"
        }
      }
    ]
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 this pull request may close these issues.

1 participant