Guidance for library authors

October 15th, 2018

We’ve just published our first cut of the .NET Library Guidance. It’s brand new set of articles for .NET developers who want to create high-quality libraries for .NET. The guidance contains recommendations we’ve identified as common best practices that apply to most public .NET libraries.

We want to help .NET developers build great libraries with these aspects:

Inclusive – Good .NET libraries strive to support many platforms and applications.

– Good .NET libraries strive to support many platforms and applications. Stable – Good .NET libraries coexist in the .NET ecosystem, running in applications built with many libraries.

– Good .NET libraries coexist in the .NET ecosystem, running in applications built with many libraries. Designed to evolve – .NET libraries should improve and evolve over time, while supporting existing users.

– .NET libraries should improve and evolve over time, while supporting existing users. Debuggable – A high-quality .NET library should use the latest tools to create a great debugging experience for users.

– A high-quality .NET library should use the latest tools to create a great debugging experience for users. Trusted – .NET libraries have developers’ trust by publishing to NuGet using security best practices.​

As well as a source of information, we hope the guidance can be a topic of discussion between Microsoft and the .NET open-source community: when creating a .NET library, what feels good and what are the points of friction. In recent years, Microsoft has made large investments in .NET tooling to make it easier to build .NET libraries, including cross-platform targeting, .NET Standard, and close integration with NuGet. We want your feedback to help improve .NET, and the .NET open-source ecosystem into the future.

Finally, the guidance isn’t complete. We want input from authors of .NET libraries to help improve and expand the documentation as .NET continues to grow and improve.

Video

.NET Conf 2018 featured a video that demonstrates many of the same guidelines:

Closing

Please check out the .NET Library Guidance and use the Feedback section to leave any comments. We hope to see your fantastic .NET libraries on NuGet soon!