Reformat .NET core projects using Resharper CLI tools

Easily format C# code in .NET Core projects with the free Resharper Command-Line Tool. Learn how to install and use it with this tutorial.

  • Table of contents

A great tool for formatting CSharp code in .NET Core projects is the free ReSharper command line tool. You can install the tools in your project to allow easy reformatting of C# apps.

Install Resharper linting tools

The first step is to create a tool manifest:

dotnet new tool-manifest

Add the Resharping cli

Install the JetBrains prettier alternative using the command:

dotnet tool install JetBrains.ReSharper.GlobalTools

Then restore your project with dotnet tool restore.

Format your code

Now to clean up your code run the tool via this command:

dotnet tool run jb cleanupcode [your-solution]
Email and SMS Platform
Create a free account in 3 clicks