CSharpier 0.30.1

CSharpier is an opinionated code formatter for c#. It uses Roslyn to parse your code and re-prints it using its own rules. The printing process was ported from prettier but has evolved over time.

CSharpier provides a few basic options that affect formatting and has no plans to add more. It follows the Option Philosophy of prettier.

Quick Start

Install CSharpier globally using the following command.

dotnet tool install csharpier -g

Then format the contents of a directory and its children with the following command.

dotnet csharpier .

CSharpier can also format on save in your editor, as a pre-commit hook, as part of your build or even programatically. Then you can ensure code was formatted with a CI/CD tool.


Read the documentation

Try it out


Before

public class ClassName {
    public void CallMethod() { 
        this.LongUglyMethod("1234567890", "abcdefghijklmnopqrstuvwxyz", "ABCDEFGHIJKLMNOPQRSTUVWXYZ");
    }
}

After

public class ClassName
{
    public void CallMethod()
    {
        this.LongUglyMethod(
            "1234567890",
            "abcdefghijklmnopqrstuvwxyz",
            "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
        );
    }
}

This package has no dependencies.

Version Downloads Last updated
1.2.1 8 11/27/2025
1.2.0 13 11/19/2025
1.1.2 21 08/23/2025
1.1.1 17 08/13/2025
1.1.0 26 08/13/2025
1.0.3 15 07/03/2025
1.0.2 26 06/06/2025
1.0.1 26 05/01/2025
1.0.0 27 04/30/2025
1.0.0-alpha99 22 05/01/2025
1.0.0-alpha9 22 02/02/2025
1.0.0-alpha84 31 05/01/2025
1.0.0-alpha83 21 04/28/2025
1.0.0-alpha81 32 05/01/2025
1.0.0-alpha80 28 04/07/2025
1.0.0-alpha7 40 02/02/2025
1.0.0-alpha6 37 01/22/2025
1.0.0-alpha46 27 02/26/2025
1.0.0-alpha45 39 03/01/2025
1.0.0-alpha44 32 03/11/2025
1.0.0-alpha43 23 03/11/2025
1.0.0-alpha33 25 02/13/2025
1.0.0-alpha32 22 02/14/2025
1.0.0-alpha24 37 02/01/2025
1.0.0-alpha22 32 02/01/2025
1.0.0-alpha21 30 02/01/2025
1.0.0-alpha20 27 02/01/2025
1.0.0-alpha10 23 02/01/2025
0.30.6 28 02/01/2025
0.30.5 38 01/06/2025
0.30.4 27 01/03/2025
0.30.3 25 12/26/2024
0.30.2 41 12/02/2024
0.30.1 24 11/30/2024
0.30.0 38 12/06/2024
0.29.2 34 01/03/2025
0.29.1 29 12/08/2024
0.29.0 37 12/01/2024
0.28.2 24 12/07/2024
0.28.1 31 06/03/2024
0.28.0 33 12/09/2024
0.27.3 34 11/28/2024
0.27.2 41 12/03/2024
0.27.1 24 12/09/2024
0.27.0 49 12/02/2024
0.26.7 35 11/29/2024
0.26.6 33 12/11/2024
0.26.5 34 12/02/2024
0.26.4 36 12/09/2024
0.26.3 33 12/01/2024
0.26.2 26 11/30/2024
0.26.1 36 12/02/2024
0.26.0 37 12/02/2024
0.25.0 39 11/14/2024
0.24.2 31 11/14/2024
0.24.1 33 12/02/2024
0.24.0 37 12/02/2024
0.23.0 33 03/31/2023
0.22.1 41 02/02/2023
0.22.0 23 12/09/2024
0.21.0 37 12/02/2024
0.20.0 24 12/09/2024
0.19.2 30 12/02/2024
0.19.1 30 12/08/2024
0.19.0 31 12/09/2024
0.18.0 32 12/02/2024
0.17.0 27 12/09/2024
0.16.0 43 12/16/2024
0.15.1 38 12/08/2024
0.15.0 30 12/16/2024
0.14.0 44 11/14/2024
0.13.0 42 12/08/2024
0.12.0 38 11/28/2024
0.11.1 36 12/02/2024
0.10.0 40 12/06/2024
0.9.9 34 12/09/2024
0.9.8 31 12/01/2024
0.9.7 33 12/01/2024
0.9.6 29 12/19/2024
0.9.5 30 11/14/2024
0.9.4 33 11/29/2024
0.9.3 24 01/01/2025
0.9.2 31 12/02/2024
0.9.1 36 11/29/2024
0.9.0 30 11/29/2024
0.8.9 24 12/08/2024
0.8.8 29 12/16/2024
0.8.7 39 12/02/2024
0.8.6 29 11/29/2024
0.8.5 31 12/02/2024
0.8.4 33 12/08/2024
0.8.3 35 12/02/2024
0.8.2 31 12/08/2024
0.8.1 35 12/12/2024