Chapter 12. Preparing for release
Once your library is coded, tested, and localized, you’re ready to release it to your organization or the world. This chapter covers a few of the considerations for release. You want credit for your hard work, and there are ways to prevent someone else from copying it and taking credit themselves. You also want to ensure that developers using your library have a way to verify that they’re getting the real version.
Let’s first explore how to build a package.
Back in chapter 2 you learned about the dotnet pack command. This is the simplest way to build a NuGet package. You can easily share the resulting NuGet package with others in your organization through a custom NuGet store. You can also publish to the official nuget.org site and allow developers from all over the world to use it.
Before publishing to nuget.org, take a moment to consider some of the properties of your package that will be displayed on nuget.org. Figure 12.1 shows an example package and highlights the properties under your control.
Let’s assume you’re the author of the package in figure 12.1. Your code could be in a folder called Newtonsoft.Json with a project file named Newtonsoft.Json.csproj, which would look something like the following.