.NET Productivity Tools,  .NET CLI Tools,  .NET Development Efficiency

Dotnet Tools

Discover essential Dotnet tools that streamline your development workflow

Dotnet Tools

Photo by Cesar Carlevarino Aragon on Unsplash

Dotnet tools are not just add-ons; they are essential components that significantly enhance our development workflow in .NET environments. They streamline complex tasks, automate repetitive processes, and ensure consistency across our projects. In this post, I’ll share some of my favorite tools that have become indispensable in my .NET development journey. From managing dependencies to ensuring consistent coding styles, these tools are vital for any serious .NET developer looking to optimize their workflow and maintain high-quality code.

Managing references

I like to keep my projects clean and tend to prune transitive dependencies. Doing it manually, however, can be tedious. There is a tool for that. Snitch is a powerful tool for pruning unnecessary transitive dependencies in your .NET projects. It helps in identifying packages that are no longer needed, thus keeping your project clean and efficient. Especially useful in large projects, Snitch simplifies what would otherwise be a daunting task of manually sifting through dependencies.

[snitch] (https://github.com/spectresystems/snitch) dotnet tool install -g snitch

In a recent large-scale project, I faced the challenge of managing an overwhelming number of dependencies. Snitch was a game-changer, identifying several unused packages that were bloating our project. By removing these, we not only streamlined our application but also reduced build times significantly.

Visualizing code coverage

I use coverlet and often need to convert the output into a human-readable format, HTML in my case. There is a tool for that. Report Generator converts coverage reports generated by Coverlet into a human-readable format like HTML. This tool is vital for visualizing which parts of your code are being tested, helping you to identify areas that need more thorough testing. It’s an essential tool for maintaining high-quality code and ensuring that your tests are as comprehensive as possible.

[report generator] (https://github.com/danielpalme/ReportGenerator) dotnet tool install -g dotnet-reportgenerator-globaltool

Enforcing .editorconfig

I honestly get frustrated when formatting is inconsistent, particularly when it makes me start to read through code slower. Well, how do you enforce that nice editor config you already worked on as a team? There is a tool for that. Dotnet-Format is a lifesaver when it comes to enforcing coding styles and formats. This tool automatically applies the rules specified in your .editorconfig file across your project, ensuring consistent formatting. It’s especially helpful in collaborative environments, eliminating the frustration of inconsistent coding styles among team members.

[dotnet format] (https://github.com/dotnet/format) dotnet tool install -g dotnet-format

Update packages

I like dependabot but there are times when I need to do this locally as well. In particular, if say there are 10 packages to update, I would like to update 1 at a time and on each update run a dotnet clean, build and test. If all is good then move to the next. There is a tool for that.

[nukeeper] (https://github.com/NuKeeperDotNet/NuKeeper) dotnet tool install nukeeper --global

For my particular use case I use the nukeeper update option. There are however more options including the ability to open pull requests for a project or entire org (only supported in GigHub)

Conclusion

In conclusion, the right set of .NET tools can make an immense difference in your development experience. They bring efficiency, consistency, and quality to your work. Whether it’s managing dependencies, ensuring code coverage, or maintaining a consistent coding style, these tools are key to a smooth and effective .NET development process. I encourage every .NET developer to explore these tools and integrate them into their workflow to experience the benefits firsthand.