15 Nuget Packages that every .Net Developer should be familiar with?

15 Nuget Packages that every .Net Developer should be familiar with?

| packages make developer life easier

Introduction:

In this article, we will cover the 15 Nuget Packages that every.Net Developer commonly used in their projects

  1. Xunit

  2. NUnit

  3. Moq

  4. NSubstitute

  5. Swagger

  6. Serilog

  7. Dapper

  8. Entity Framework Core

  9. Fluent Validation

  10. Automapper

  11. Json.NET — Newtonsoft

  12. Polly

  13. Scrutor

  14. Nlog

  15. BenchmarkDotNet

Xunit

XUnit is a developer testing framework, built to support Test Driven Development with extreme flexibility in all areas and it supports in .Net Framework and .Net Core as well.

NUnit

NUnit is a testing framework where you can define your test cases and assertions. It can run all the tests and show you a report and also enables TDD(Test-Driven Development).

Moq

The Moq framework makes it easy to create mock objects that mimic the behavior of classes and interfaces for testing, with just the functionality you need.

NSubstitute

NSubstitute is designed for Arrange-Act-Assert (AAA) testing, so you just need to arrange how it should work, then assert it received the calls you expected once you’re done. Because you’ve got more important code to write than whether you need a mock or a stub.

Swagger

Swagger is a powerful yet easy-to-use API developer tool for teams and individuals, enabling development across the entire API lifecycle, from design and documentation, to test and deployment.

Serilog

Serilog is a diagnostic logging library for .Net applications. It is easy to set up, has a clean API, and runs on all recent .NET platforms. Serilog support for structured logging shines when instrumenting complex, distributed, and asynchronous applications and systems.

Dapper

Dapper is an ORM(Object-relational mapping) and is also known as the king of Micro ORM in terms of speed and is virtually as fast as using a raw ADO.Net data reader.

EntityFramework Core

Entity Framework Core is a lightweight, extensible, open-source, and cross-platform version of the popular Entity Framework data access technology. Ef Core can serve as an object-relational mapper which enables .Net developers to work with a database using .Net objects.

Fluent Validation

Fluent Validation is a .Net library for building strongly-typed validation rules. It uses a fluent interface and lambda expressions for building validation rules. It helps clean up your domain code and make it more cohesive, as well as giving you a single place to look for validation logic.

Automapper

Automapper is a simple little library built to solve a deceptively complex problem — getting rid of code that mapped one object to another. This type of code is rather dreary and boring to write, so why not invent a tool to do it for us?

Json.NET — Newtonsoft

Json.NET is a popular high-performance JSON framework for .Net

Benefits and Features

  • Flexible JSON serializer for converting between .NET objects and JSON

  • LINQ to JSON for manually reading and writing JSON

  • High performance: faster than .NET’s built-in JSON serializers

  • Write indented, easy-to-read JSON

  • Convert JSON to and from XML

Polly

Polly is an awesome open source project of the .Net Foundation. Polly has many options and excels with its circuit breaker mode and exception handling.

Scrutor

ASP.Net Core includes only a simple DI(Dependency Injection) container with minimal capabilities, leaving it to third parties to extend those capabilities. Scrutor is an open-source library that adds assembly scanning capabilities to the ASP.Net Core DI container.

NLog

Nlog is a flexible and free logging platform for various .NET platforms. Nlog makes it easy to write to several targets.(database, file,console) and change the logging configuration on the fly. It supports structured and traditional logging and it’s easy to use.

BenchmarkDotNet

BenchmarkDotNet helps you to transform methods into benchmarks, track their performance, and share reproducible measurement experiments. It’s no harder than writing unit tests. It protects you from popular benchmarking mistakes and warns you if something is wrong with your benchmark design or obtained measurements.

Installation Commands in Package Manager Console — Versions as per 2020

  1. Install-Package xunit — Version 2.4.1

  2. Install-Package NUnit — Version 3.12.0

  3. Install-Package Moq — Version 4.15.2

  4. Install-Package NSubstitute — Version 4.2.2

  5. Install-Package Swashbuckle.AspNetCore — Version 5.6.3

  6. Install-Package Serilog — Version 2.10.1-dev-01265

  7. Install-Package Dapper — Version 2.0.78

  8. Install-Package Microsoft.EntityFrameworkCore — Version 5.0.1

  9. Install-Package FluentValidation.AspNetCore — Version 9.3.0

  10. Install-Package AutoMapper.Extensions.Microsoft.DependencyInjection — Version 8.1.0

  11. Install-Package Newtonsoft.Json — Version 12.0.3

  12. Install-Package Polly — Version 7.2.1

  13. Install-Package Scrutor.AspNetCore — Version 1.0.0

  14. Install-Package NLog — Version 4.7.6

  15. Install-Package BenchmarkDotNet.Core — Version 0.10.14

Hope this article helps you..! bmc-button.png

keep Learning !!!!!!!