CSharpier 1.0.0-alpha45

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.2.1 72 11/27/2025
1.2.0 82 11/19/2025
1.1.2 84 08/23/2025
1.1.1 89 08/13/2025
1.1.0 91 08/13/2025
1.0.3 46 07/03/2025
1.0.2 90 06/06/2025
1.0.1 71 05/01/2025
1.0.0 77 04/30/2025
1.0.0-alpha99 56 05/01/2025
1.0.0-alpha9 56 02/02/2025
1.0.0-alpha84 97 05/01/2025
1.0.0-alpha83 95 04/28/2025
1.0.0-alpha81 90 05/01/2025
1.0.0-alpha80 93 04/07/2025
1.0.0-alpha7 87 02/02/2025
1.0.0-alpha6 72 01/22/2025
1.0.0-alpha46 61 02/26/2025
1.0.0-alpha45 110 03/01/2025
1.0.0-alpha44 102 03/11/2025
1.0.0-alpha43 55 03/11/2025
1.0.0-alpha33 56 02/13/2025
1.0.0-alpha32 46 02/14/2025
1.0.0-alpha24 109 02/01/2025
1.0.0-alpha22 63 02/01/2025
1.0.0-alpha21 100 02/01/2025
1.0.0-alpha20 61 02/01/2025
1.0.0-alpha10 51 02/01/2025
0.30.6 60 02/01/2025
0.30.5 88 01/06/2025
0.30.4 56 01/03/2025
0.30.3 49 12/26/2024
0.30.2 96 12/02/2024
0.30.1 50 11/30/2024
0.30.0 103 12/06/2024
0.29.2 98 01/03/2025
0.29.1 61 12/08/2024
0.29.0 107 12/01/2024
0.28.2 46 12/07/2024
0.28.1 62 06/03/2024
0.28.0 85 12/09/2024
0.27.3 108 11/28/2024
0.27.2 102 12/03/2024
0.27.1 55 12/09/2024
0.27.0 86 12/02/2024
0.26.7 73 11/29/2024
0.26.6 83 12/11/2024
0.26.5 97 12/02/2024
0.26.4 91 12/09/2024
0.26.3 97 12/01/2024
0.26.2 61 11/30/2024
0.26.1 94 12/02/2024
0.26.0 105 12/02/2024
0.25.0 97 11/14/2024
0.24.2 63 11/14/2024
0.24.1 93 12/02/2024
0.24.0 104 12/02/2024
0.23.0 69 03/31/2023
0.22.1 103 02/02/2023
0.22.0 50 12/09/2024
0.21.0 87 12/02/2024
0.20.0 50 12/09/2024
0.19.2 52 12/02/2024
0.19.1 56 12/08/2024
0.19.0 60 12/09/2024
0.18.0 60 12/02/2024
0.17.0 59 12/09/2024
0.16.0 89 12/16/2024
0.15.1 93 12/08/2024
0.15.0 63 12/16/2024
0.14.0 107 11/14/2024
0.13.0 83 12/08/2024
0.12.0 109 11/28/2024
0.11.1 82 12/02/2024
0.10.0 76 12/06/2024
0.9.9 59 12/09/2024
0.9.8 51 12/01/2024
0.9.7 58 12/01/2024
0.9.6 51 12/19/2024
0.9.5 54 11/14/2024
0.9.4 59 11/29/2024
0.9.3 48 01/01/2025
0.9.2 60 12/02/2024
0.9.1 66 11/29/2024
0.9.0 54 11/29/2024
0.8.9 53 12/08/2024
0.8.8 57 12/16/2024
0.8.7 66 12/02/2024
0.8.6 58 11/29/2024
0.8.5 60 12/02/2024
0.8.4 59 12/08/2024
0.8.3 61 12/02/2024
0.8.2 57 12/08/2024
0.8.1 66 12/12/2024