Have you ever heard people saying “you don’t need to reinvent the wheel”? This article is exactly about that. I’m going to list the top Nuget packages that I think every Asp.net core developer needs to know and use in the projects to keep their life easier and benefit from the great work people already did in the open source community.
This list has the Nuget packages which are widely used and already passed their early days. They are being used in serious projects with big teams, so feel confident using them in your next project.
|Hangfire||Noda Time||Newtonsoft Json.NET||RestSharp|
Quartz is a job scheduler library that is pretty neat and can be used in small or big projects. It also has load-balancing capability.
If you are interested to know more about this library I have another article here that goes more into the details of Quartz.
It’s another tool for running background jobs. With Hangfire you can also have a chain of jobs running after each other. It’s a free library but it also has a paid version for advanced features.
This library maps one object’s data to another object with a different type. It’s very useful, especially when you need to do the mapping in many places. It will make your code look ugly very soon if you repeatedly do the mapping manually in different places and they don’t act the same way. So, this package can increase your code readability and your development speed.
This library helps you make strongly-typed validation rules for your .NET applications. It’s using lambada expression for defining the rules which makes it very clean and consolidated. You can define custom and complicated validations in a very neat way.
It’s a library that helps you create resilient microservices in .NET and help create policies to have better fault handling. The policies are retry, circuit breaker, timeout, bulkhead isolation, and fallback in a fluent and thread-safe manner.
Autofac is an advanced IoC container for .NET projects and does a good job with complicated dependency injections. It has a simple interface and broadly being used in the .NET community.
It’s a library that makes working with time easier and doing more precise operations on time.
A logging library that can be used to record your application logs in different outputs like console, file, and others.
Dapper a very lightweight Micro ORM (Object-Relational Mapping) and can be used instead of Entity Framework. It’s working with SQL Server, MySQL, and Postgresql. It can be much faster than Entity Framework.
Humanizer is a useful library for making your data more readable for humans. It has helpers for displaying strings, enums, dates, times, timespans, numbers, and quantities.
It’s a great package for generating documentation for API. Swagger UI can add web pages for your API documentation which also gives clients the ability to test the endpoints.
Fairly popular JSON serializer and deserializer.
It’s a popular open-source unit test library for .NET, and it’s written by the authors of NUnit v2. It’s compatible with C#, F#, and VB.NET.
a .NET library for making fake objects, mocks, stubs, etc. It’s very useful for unit testing.
A great library for measuring code performance. It makes it easy to generate different types of reports and export them to different formats like md, html, csv, xml, json, etc.
A library for mediator pattern implementation in .NET, helps to handle request/response style messages, where a single request is handled by a single handler.
A very clean and easy-to-use library for Rest API client-side calls in .NET Framework.
This library uses Razor for email templates and it can be used to send emails with SendGrid, MailGun, SMTP, and more. It can be used in .NET and .NET Core.
iText7 is a library to create or modify PDF files.
It’s an easy-to-add and high-performance caching library. It uses a “GetOrAdd” pattern for caching.
There are over 100,000 Nuget packages and these 20 are the ones that I think are used very often by Asp.Net Core developers. There are definitely other interesting Nuget packages that I don’t know about and you might have used them, please share your favorite ones in the comments so I can try them in the future.
Thank you for reading this far.