You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/reference/nuspec.md
+45Lines changed: 45 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -74,7 +74,52 @@ A comma-separated list of the package creators using profile names on nuget.org.
74
74
#### projectUrl
75
75
A URL for the package's home page, often shown in UI displays as well as nuget.org.
76
76
#### licenseUrl
77
+
> [!Important]
78
+
> licenseUrl is being deprecated. Use license instead.
79
+
77
80
A URL for the package's license, often shown in UI displays as well as nuget.org.
81
+
#### license
82
+
An SPDX license expression or path to a license file within the package, often shown in UI displays as well as nuget.org.
83
+
If you’re licensing the package under a common license such as BSD-2-Clause or MIT, use the associated SPDX license identifier.<br>For example:
84
+
`<license type="expression">MIT</license>`
85
+
86
+
Here is the complete list of [SPDX license identifiers](https://spdx.org/licenses/). NuGet.org accepts only OSI or FSF approved licenses when using license type expression.
87
+
88
+
If your package is licensed under multiple common licenses, you can specify a composite license using the [SPDX expression syntax version 2.0](https://spdx.org/spdx-specification-21-web-version#h.jxpfx0ykyb60).<br>For example:
89
+
`<license type="expression">BSD-2-Clause OR MIT</license>`
90
+
91
+
If you are using a license that hasn’t been assigned an SPDX identifier, or it is a custom license, you can package a file with the license text. For example:
92
+
```xml
93
+
<package>
94
+
<metadata>
95
+
...
96
+
<licensetype="file">LICENSE.txt</license>
97
+
...
98
+
</metadata>
99
+
<files>
100
+
...
101
+
<filesrc="licenses\LICENSE.txt"target="" />
102
+
...
103
+
</files>
104
+
</package>
105
+
```
106
+
The exact syntax of NuGet's license expressions is described below in [ABNF](https://tools.ietf.org/html/rfc5234).
107
+
```cli
108
+
license-id = <short form license identifier from https://spdx.org/spdx-specification-21-web-version#h.luq9dgcle9mo>
109
+
110
+
license-exception-id = <short form license exception identifier from https://spdx.org/spdx-specification-21-web-version#h.ruv3yl8g6czd>
A URL for a 64x64 image with transparency background to use as the icon for the package in UI display. Be sure this element contains the *direct image URL* and not the URL of a web page containing the image. For example, to use an image from GitHub, use the raw file URL like <em>https://github.com/\<username\>/\<repository\>/raw/\<branch\>/\<logo.png\></em>.
0 commit comments