CSharpier 1.0.0-alpha44

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.

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.0.3 6 07/06/2025
1.0.2 8 05/27/2025
1.0.1 27 04/28/2025
1.0.0 13 04/24/2025
1.0.0-alpha99 63 04/16/2025
1.0.0-alpha84 46 04/20/2025
1.0.0-alpha83 39 04/20/2025
1.0.0-alpha81 50 04/16/2025
1.0.0-alpha80 59 04/04/2025
1.0.0-alpha46 56 04/04/2025
1.0.0-alpha45 38 04/04/2025
1.0.0-alpha44 41 04/04/2025
1.0.0-alpha43 40 04/04/2025
1.0.0-alpha33 36 04/04/2025
1.0.0-alpha32 47 04/04/2025
1.0.0-alpha24 50 04/04/2025
1.0.0-alpha22 39 04/04/2025
1.0.0-alpha21 53 04/04/2025
1.0.0-alpha20 51 04/04/2025
1.0.0-alpha10 41 04/04/2025
0.30.6 31 04/04/2025
0.30.5 28 04/04/2025
0.30.4 30 04/04/2025
0.30.3 26 04/04/2025
0.30.2 27 04/04/2025
0.30.1 28 04/04/2025
0.30.0 26 04/04/2025
0.29.2 25 04/04/2025
0.29.1 27 04/04/2025
0.29.0 31 04/04/2025
0.28.2 33 04/04/2025
0.28.1 29 04/04/2025
0.28.0 31 04/04/2025
0.27.3 31 04/04/2025
0.27.2 27 04/04/2025
0.27.1 27 04/04/2025
0.27.0 34 04/04/2025
0.26.7 28 04/04/2025
0.26.6 28 04/04/2025
0.26.5 26 04/04/2025
0.26.4 30 04/04/2025
0.26.3 27 04/04/2025
0.26.2 28 04/04/2025
0.26.1 28 04/04/2025
0.26.0 32 04/04/2025
0.25.0 30 04/04/2025
0.24.2 31 04/04/2025
0.24.1 34 04/04/2025
0.24.0 26 04/04/2025
0.23.0 29 04/04/2025
0.22.1 27 02/19/2025
0.22.0 33 04/04/2025
0.21.0 29 04/04/2025
0.20.0 30 04/04/2025
0.19.2 30 04/04/2025
0.19.1 31 04/04/2025
0.19.0 24 04/04/2025
0.18.0 35 04/04/2025
0.17.0 31 04/04/2025
0.16.0 37 04/04/2025
0.15.1 32 04/04/2025
0.15.0 30 04/04/2025
0.14.0 29 04/04/2025
0.13.0 26 04/04/2025
0.12.0 32 04/04/2025
0.11.1 25 04/04/2025
0.10.0 28 04/04/2025
0.9.9 22 04/04/2025
0.9.8 33 04/04/2025
0.9.7 17 04/04/2025
0.9.6 33 04/04/2025
0.9.5 45 04/04/2025
0.9.4 29 04/04/2025
0.9.3 31 04/04/2025
0.9.2 32 04/04/2025
0.9.1 29 04/04/2025
0.9.0 24 04/04/2025
0.8.9 25 04/04/2025
0.8.8 33 04/04/2025
0.8.7 29 04/04/2025
0.8.6 21 04/04/2025
0.8.5 26 04/04/2025
0.8.4 29 04/04/2025
0.8.3 28 04/04/2025
0.8.2 25 04/04/2025
0.8.1 21 04/04/2025