20 Nuget Packages You Need To Know About

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.

Quartz.NetAutofacSwashbuckleMediatR
HangfireNoda TimeNewtonsoft Json.NETRestSharp
AutomapperSerilogXUnitFluentEmail
FluentValidationDapperFakeItEasyiTextSharp
PollyHumanizerBenchmarkDotNetLazyCache

Quartz.Net

Quartz Logo

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.

Website: https://www.quartz-scheduler.net

GitHub: https://github.com/quartznet/quartznet

Nuget: https://www.nuget.org/packages/Quartz


Hangfire

Nuget Logo

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.

Website: https://www.hangfire.io

GitHub: https://github.com/HangfireIO/Hangfire

Nuget: https://www.nuget.org/packages/Hangfire


Automapper

Automapper Logo

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.

Website: https://automapper.org

GitHub: https://github.com/AutoMapper/AutoMapper

Nuget: https://www.nuget.org/packages/automapper


FluentValidation

FluentValidation Logo

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.

Website: https://fluentvalidation.net

GitHub: https://github.com/FluentValidation/FluentValidation

Nuget: https://www.nuget.org/packages/fluentvalidation


Polly

Polly Logo

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.

Website: http://www.thepollyproject.org

GitHub: https://github.com/App-vNext/Polly

Nuget: https://www.nuget.org/packages/polly


Autofac

Autofac Logo

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.

Website: https://autofac.org

GitHub: https://github.com/autofac/Autofac

Nuget: https://www.nuget.org/packages/Autofac


Noda Time

Noda Time Logo

It’s a library that makes working with time easier and doing more precise operations on time.

Website: https://nodatime.org

GitHub: https://github.com/nodatime/nodatime

Nuget: https://www.nuget.org/packages/NodaTime


Serilog

Serilog Logo

A logging library that can be used to record your application logs in different outputs like console, file, and others.

Website: https://serilog.net

GitHub: https://github.com/serilog/serilog

Nuget: https://www.nuget.org/packages/serilog


Dapper

Dapper Logo

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.

Website: https://dapperlib.github.io/Dapper

GitHub: https://github.com/DapperLib/Dapper

Nuget: https://www.nuget.org/packages/Dapper


Humanizer

Humanizer Logo

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.

GitHub: https://github.com/Humanizr/Humanizer

Nuget: https://www.nuget.org/packages/Humanizer


Swashbuckle

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.

Website: https://swagger.io

GitHub: https://github.com/domaindrivendev/Swashbuckle.AspNetCore

Nuget: https://www.nuget.org/packages/swashbuckle.aspnetcore.swagger


Newtonsoft Json.NET

Newtonsoft Json.NET Logo

Fairly popular JSON serializer and deserializer.

Website: https://www.newtonsoft.com/json

GitHub: https://github.com/JamesNK/Newtonsoft.Json

Nuget: https://www.nuget.org/packages/Newtonsoft.Json


XUnit

XUnit Logo

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.

Website: https://xunit.net

GitHub: https://github.com/xunit/xunit

Nuget: https://www.nuget.org/packages/xunit


FakeItEasy

FakeItEasy Logo

a .NET library for making fake objects, mocks, stubs, etc. It’s very useful for unit testing.

Website: https://fakeiteasy.github.io

GitHub: https://github.com/FakeItEasy/FakeItEasy

Nuget: https://www.nuget.org/packages/FakeItEasy


BenchmarkDotNet

BenchmarkDotNet Logo

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.

Website: https://benchmarkdotnet.org

GitHub: https://github.com/dotnet/BenchmarkDotNet

Nuget: https://www.nuget.org/packages/BenchmarkDotNet


MediatR

MediatR Logo

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.

GitHub: https://github.com/jbogard/MediatR

Nuget: https://www.nuget.org/packages/MediatR


RestSharp

RestSharp Logo

A very clean and easy-to-use library for Rest API client-side calls in .NET Framework.

Website: https://restsharp.dev

GitHub: https://github.com/restsharp/RestSharp

Nuget: https://www.nuget.org/packages/RestSharp


FluentEmail

FluentEmail Logo

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.

GitHub: https://github.com/lukencode/FluentEmail

Nuget: https://www.nuget.org/packages/FluentEmail.Core


iText7

iText7 Logo

iText7 is a library to create or modify PDF files.

Website: https://itextpdf.com

GitHub: https://github.com/itext/itext7-dotnet

Nuget: https://www.nuget.org/packages/itext7


LazyCache

LazyCache Logo

It’s an easy-to-add and high-performance caching library. It uses a “GetOrAdd” pattern for caching.

Nuget: https://www.nuget.org/packages/LazyCache

GitHub: https://github.com/alastairtree/LazyCache


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.