Events
17 Mar, 11 pm - 21 Mar, 11 pm
Join the meetup series to build scalable AI solutions based on real-world use cases with fellow developers and experts.
Register nowThis browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
This guidance provides recommendations for developers to create high-quality .NET libraries. This documentation focuses on the what and the why when building a .NET library, not the how.
Aspects of high-quality .NET libraries:
Each article presents four types of recommendations: Do, Consider, Avoid, and Do not. The type of recommendation indicates how strongly it should be followed.
You should almost always follow a Do recommendation. For example:
✔️ DO distribute your library using a NuGet package.
On the other hand, Consider recommendations should generally be followed, but there are legitimate exceptions to the rule and you shouldn't feel bad about not following the guidance:
✔️ CONSIDER using SemVer 2.0.0 to version your NuGet package.
Avoid recommendations mention things that are generally not a good idea, but breaking the rule sometimes makes sense:
❌ AVOID NuGet package references that demand an exact version.
And finally, Do not recommendations indicate something you should almost never do:
❌ DO NOT publish strong-named and non-strong-named versions of your library. For example, Contoso.Api
and Contoso.Api.StrongNamed
.
.NET feedback
.NET is an open source project. Select a link to provide feedback:
Events
17 Mar, 11 pm - 21 Mar, 11 pm
Join the meetup series to build scalable AI solutions based on real-world use cases with fellow developers and experts.
Register nowTraining
Module
Call methods from the .NET Class Library using C# - Training
Use functionality in the .NET Class Library by calling methods that return values, accept input parameters, and more.
Documentation
Learn to use .NET to create applications on any platform using C#, F#, and Visual Basic. Browse API reference, sample code, tutorials, and more.
Learn about .NET. .NET is a free, open-source development platform for building many kinds of apps.
Find out the meaning of selected terms used in the .NET documentation.