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/coding-guidelines/libraries-packaging.md
+18-11
Original file line number
Diff line number
Diff line change
@@ -40,22 +40,29 @@ Libraries to be packaged must set `IsPackable` to true. By default, all `librari
40
40
41
41
Package versions and shipping state should be controlled using the properties defined by the [Arcade SDK](https://github.com/dotnet/arcade/blob/master/Documentation/ArcadeSdk.md#project-properties-defined-by-the-sdk). Typically libraries should not need to explicitly set any of these properties.
42
42
43
-
Most metadata for packages is controlled centrally in the repository and individual projects may not need to make any changes to these. One property is required to be set in each project: `PackageDescription`. This should be set to a descriptive summary of the purpose of the package, and a list of common entry-point types for the package: to aide in search engine optimization. Example:
43
+
Most metadata for packages is controlled centrally in the repository and individual projects may not need to make any changes to these. One property is required to be set in each project: `PackageDescription`. This should be set to a descriptive summary of the purpose of the package. Example:
44
+
44
45
```xml
45
-
<PackageDescription>Logging abstractions for Microsoft.Extensions.Logging.
<PackageDescription>Logging abstractions for Microsoft.Extensions.Logging.</PackageDescription>
55
47
```
56
48
57
49
Package content can be defined using any of the publicly defined Pack inputs: https://docs.microsoft.com/en-us/nuget/reference/msbuild-targets
58
50
51
+
### Package Readme
52
+
53
+
Packages can include a Markdown Readme file with a short usage documentation. To include a package Readme, create a `PACKAGE.md` file in the library `src` directory. The file will be automatically included in the package and used as a Readme if its name matches this convention.
54
+
55
+
The package Readme is displayed on the package details page on [NuGet gallery](https://nuget.org/). You can include the following content in it:
56
+
57
+
- A description of the package purpose.
58
+
- Information when package should be used. For example, if the library is included in the shared framework in .NET, but needs to be installed via NuGet on .NET Framework, it should be mentioned.
59
+
- Information on how to get started with the package.
60
+
- Links to related documentation.
61
+
- A list of common entry-point types for the package, with links to their API docs under [.NET API Browser](https://learn.microsoft.com/dotnet/api/).
62
+
- A short code example that demostrates the package usage.
63
+
64
+
For a list of supported Markdown features, see [NuGet documentation](https://learn.microsoft.com/nuget/nuget-org/package-readme-on-nuget-org#supported-markdown-features).
65
+
59
66
### Build props / targets and other content
60
67
61
68
Build props and targets may be needed in NuGet packages. To define these, author a build folder in your src project and place the necessary props/targets in this subfolder. You can then add items to include these in the package by defining `Content` items and setting `PackagePath` as follows:
0 commit comments