There are some Nuget packages which I just seem to come back to every single time, because they solve a particular problem for me and they do so in a way which resonates with me. I thought I would put together a list of all my favourite Nuget packages. Nuget can be used to add all sort of libraries to your project, such as Javascript or CSS frameworks, but this list will be purely for .NET development. I am also excluding the obvious (Microsoft) ones such as MVC, Entity Framework, etc. This is about all those other little gems.
These are the main Nuget packages I seem to use in every single project I do.
Around 2 years ago (in the beginning of this blog) I started off a series of blog posts about integrating Fluent Validation into your ASP.NET MVC application. To this day those are still some of my most read blog posts and Fluent Validation remains my go-to library for adding validation to my ASP.NET MVC and Web API applications. The ease of use and the fact that I can inject dependencies - and therefore more easily unit test my validation classes - are the killer features for me.
PM> Install-Package FluentValidation
Find it on GitHub at https://github.com/JeremySkinner/FluentValidation
I used to be a big fan of Moq but at a stage a couple of years ago it seemed to become a bit stagnant and there was not much development happening on it, so I looked around for a replacement and found NSubstitute. I have used it ever since. Moq seems to have picked up momentum again in the meantime but I am sticking with NSubstitute as it has served me well. Whenever I create a new test project this is the first package I install.
PM> Install-Package NSubstitute
Find it on GitHub at http://nsubstitute.github.io/
The next package I install in a test project after NSubstitute is Fluent Assertions. The breadth of assertions you can do is breathtaking and saves me a lot of time.
PM> Install-Package FluentAssertions
Find it on GitHub at https://github.com/dennisdoomen/fluentassertions
I used another IoC container before I used Autofac but I honestly cannot event remember which one it was, that is how long I have used Autofac and how much I like it. I am sure there are other other dependency injection libraries which are perhaps more nimble and faster but Autofac is plenty fast enough and it has been able to do everything I have ever asked of it.
It is available as a PCL so I can use it pretty much anywhere, it has plenty of extension points and the number of integrations with other libraries means I don't have to spend time rolling my own integrations and can instead spend that time to add features to my application. Autofac also seems to be one of the handful of libraries which ASP.NET 5 is supporting out of the box.
PM> Install-Package Autofac
Find it on GitHub at https://github.com/autofac/Autofac
I use these Nuget packages less often because they mostly solve very specific issues which are not present on every single project. They are however packages I highly recommend you look at
I don't think I use any "official" API wrappers anymore. Whenever I need to integrate with a REST API I just install Refit and create a quick wrapper around the specific API calls I am interested in. I use Postman to test the API call, copy the JSON input or output from the API call to the clipboard and use Visual Studio's "Paste JSON as classes"feature to create strongly typed classes for the JSON and then create an interface with the API definition for Refit to use. And there you have a custom API wrapper in minutes!
The number one reason I use Refit is that because the API definition is defined as a C# interface it is super easy to always use it with dependency injection and also to mock the API for unit tests. The other big reason is that it is a PCL so I can use it pretty much anywhere.
PM> Install-Package refit
Find it on GitHub at https://github.com/paulcbetts/refit
I became aware of this one just last week. Oh boy if I had a penny for every time I wished there was an easier way to construct URIs…. Well there is. If you have any need for building URIs then you better install this library fast. It is an awesome little gem!
PM> Install-Package Tavis.UriTemplates
Find it on GitHub at https://github.com/tavis-software/Tavis.UriTemplates
Sometimes you need to build a bunch of sample data for unit testing or for seed data for a database. NBuilder makes the job of creating those a breeze.
If you want realistic looking data for seeding a database you can use it in conjunction with Faker.NET (though Faker.NET has not seen any enhancement for the past 2 year it still does its job well…)
PM> Install-Package NBuilder
Find it on GitHub at https://github.com/garethdown44/nbuilder/
If you have ever done time and timezone related programming you will know what a pain in the ass it can be. NodaTime tries to make that process a little bit better. You can read more about the rationale behind NodaTime. From a unit testing perspective NodaTime makes the process also a bit easier as it exposes an IClock interface to get the current time, which can be mocked or you can even use their own FakeClock class to assist with testing. Also, NodaTime was written by the great John Skeet himself.
PM> Install-Package NodaTime
Find it on Google Code at https://code.google.com/p/noda-time/
Want to convert a time to something more meaningful like 'Updated 5 seconds ago'? Want to title case a string? Want to display more human-friendly names for enums? Want to pluralize strings? Humanizer have got you covered for those and a whole lot more. The list just goes on and on, so best you check out their project page on GitHub to see what it can do for you.
PM> Install-Package Humanizer
Find it on GitHub at https://github.com/MehdiK/Humanizer
I am busy with a project where I need to process all sorts of files, specifically Markdown, HTML and YAML. Well there are packages to help you with all of those :)
For Markdown I seem to have settled on CommonMark.NET (on GitHub):
PM> Install-Package CommonMark.NET
For HTML parsing I use AngleSharp, but HtmlAgilityPack is also awesome and a bit more mature and may be a better option for you.
PM> Install-Package AngleSharp
PM> Install-Package HtmlAgilityPack
For parsing YAML, YamlDotNet suits my needs perfectly as it is still being actively developed (many of the other ones aren't) and also allows me to stronly type YAML structures
PM> Install-Package YamlDotNet
That's it. This is not an exhaustive list of all the "best" Nuget packages, but merely the ones I find pretty useful on a regular basis. Special thanks to all the authors and contributors to those packages - you make my life so much easier! :)
FacebookTwitterLinkedInEmail
Visual Studio is a great development environment. But with a few extensions, it will be even better. There's a lot of free extensions out there, that will improve the experience of writing code and even help you reduce bugs too. We have collected a list of the best free extensions for Visual Studio.
](https://marketplace.visualstudio.com/items?itemName=josefpihrt.Roslynator2017)
Almost 400 analyzers, refactorings and code fixes for C#, powered by the new Roslyn compiler bundled with Visual Studio 2017. What's not to like? Roslynator is probably the closest you will get to ReSharper for free.
](https://marketplace.visualstudio.com/items?itemName=MadsKristensen.SideWaffleTemplatePack)
Let's face it. The number of Visual Studio project templates available out of the box are pretty limited. SideWaffle fixes this with a lot of new project and item templates.
Power Commands adds a good amount of functionality to Visual Studio. The focus of this extension is primarily around navigating the IDE and combining multiple clicks into one. You won't be able to live without all these small improvements once installed.
](https://marketplace.visualstudio.com/items?itemName=MadsKristensen.FileNesting)
You know how web.release.config files nest nicely beneath web.config? The File Nesting extension adds this behavior for all types of files. The perfect way to clean up the solution explorer.
](https://marketplace.visualstudio.com/items?itemName=ThomasArdal.elmahio)
Ever wanted to browse your elmah.io logs, without having to leave Visual Studio? Well now you can, using our very own Visual Studio extension.
](https://marketplace.visualstudio.com/items?itemName=EWoodruff.VisualStudioSpellCheckerVS2017andLater)
Spell checking your website is important to pretty much every website developer. Why not let Visual Studio do it while you type, using this free spell checker.
](https://marketplace.visualstudio.com/items?itemName=MadsKristensen.FileIcons)
Showing correct file icons in the solution explorer doesn't sound that important. You will quickly realize, after installing this extension, that it means the world when navigating project files.
Would your users appreciate fewer errors?
➡️ Reduce errors by 90% with elmah.io error logging and uptime monitoring⬅️
](https://marketplace.visualstudio.com/items?itemName=MadsKristensen.ImageOptimizer)
Another great extension from Mads Kristensen is Image Optimizer. I previously used online tools to optimize images. Now I right click an image inside Visual Studio and heavily reduce image size using a single click.
Much like Power Commands, Productivity Tools adds a lot of small improvements to the IDE. Productivity Tools is really "just" an umbrella for a lot of smaller extensions, that can be installed separately.
Web.config transformations changed the way we configured websites. I remember creating custom configuration tools back in the day. With SlowCheetah you will be able to transform any xml file based on the active configuration.
](https://marketplace.visualstudio.com/items?itemName=MadsKristensen.WebExtensionPack2017)
Another popular umbrella extension is Web Essentials. We already touched on some of the extensions installed by Web Essentials, but we still believe that this is worth a mention. So many web developer improvements go into Visual Studio, when installing WE.
](https://marketplace.visualstudio.com/items?itemName=SteveCadwallader.CodeMaid)
Code cleanup, restructuring as well as a range of other helpful tools is what you will receive after installing CodeMaid. The nice thing about CodeMaid is, that it works on multiple file types and not only C#.
![](data:image/*;base64,iVBORw0KGgoAAAANSUhEUgAAA4QAAAEYCAYAAAAEdTgqAAAACXBIWXMAAA7EAAAOxAGVKw4bAAAAB3RJTUUH3QcODS0bkhwOIgAAAAd0RVh0QXV0aG9yAKmuzEgAAAAMdEVYdERlc2NyaXB0aW9uABMJISMAAAAKdEVYdENvcHlyaWdodACsD8w6AAAADnRFWHRDcmVhdGlvbiB0aW1lADX3DwkAAAAJdEVYdFNvZnR3YXJlAF1w/zoAAAALdEVYdERpc2NsYWltZXIAt8C0jwAAAAh0RVh0V2FybmluZwDAG+aHAAAAB3RFWHRTb3VyY2UA9f+D6wAAAAh0RVh0Q29tbWVudAD2zJa/AAAABnRFWHRUaXRsZQCo7tInAAAgAElEQVR4nOzdbWgjaYIn+L92sudmu6G6aittlsuaI5VuJ5FysknP2TvLHWenTBnaVhUNUW52svbDXSNngWCyaSxEgeYWlb4YCiFTjI8S15nxYT9s5kI64xaqZRdkYdlZ9DKQ7inMpZSB3WklzFbvllw1WfTsTvf1dE/ch4iQQlJEKCL0Lv1/kFRZEfG8x6N49DwREVBVVQURERERERGNnX/S7wQQERERERFRf3BASERERERENKY4ICQiIiIiIhpTHBASERERERGNKQ4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