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:

Add the Resharping cli

Install the JetBrains prettier alternative using the command:

Then restore your project with .

Format your code

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