CSharpier 1.2.2

There is a newer version of this package available.
See the version list below for details.
dotnet tool install --global CSharpier --version 1.2.2
                    
This package contains a .NET tool you can call from the shell/command line.
dotnet new tool-manifest
                    
if you are setting up this repo
dotnet tool install --local CSharpier --version 1.2.2
                    
This package contains a .NET tool you can call from the shell/command line.
#tool dotnet:?package=CSharpier&version=1.2.2
                    
nuke :add-package CSharpier --version 1.2.2
                    

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"
        );
    }
}
Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 is compatible.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

This package has no dependencies.

Version Downloads Last Updated
1.2.5 171,881 12/31/2025
1.2.4 40,920 12/23/2025
1.2.3 71,909 12/14/2025
1.2.2 16,724 12/13/2025
1.2.1 346,939 11/10/2025
1.2.0 27,801 11/10/2025
1.1.2 927,010 8/16/2025
1.1.1 119,082 8/4/2025
1.1.0 7,605 8/3/2025
1.0.3 353,876 6/29/2025
1.0.2 370,006 5/24/2025
1.0.1 335,811 4/26/2025
1.0.0 100,511 4/22/2025
1.0.0-alpha99 316 4/13/2025
1.0.0-alpha84 169 4/19/2025
1.0.0-alpha83 155 4/19/2025
1.0.0-alpha81 263 4/13/2025
1.0.0-alpha80 183 3/15/2025
1.0.0-alpha46 245 2/22/2025
1.0.0-alpha45 335 2/22/2025
1.0.0-alpha44 172 2/21/2025
1.0.0-alpha43 211 2/14/2025
1.0.0-alpha33 196 2/9/2025
1.0.0-alpha32 234 2/2/2025
1.0.0-alpha24 174 1/26/2025
1.0.0-alpha22 172 1/26/2025
1.0.0-alpha21 183 1/21/2025
1.0.0-alpha20 150 1/20/2025
1.0.0-alpha10 667 1/20/2025
0.30.6 1,265,897 1/10/2025
0.30.5 109,899 1/3/2025
0.30.4 84,439 12/28/2024
0.30.3 288,795 12/7/2024
0.30.2 326,019 11/22/2024
0.30.1 61,448 11/18/2024
0.30.0 19,572 11/17/2024
0.29.2 655,901 9/15/2024
0.29.1 260,046 8/23/2024
0.29.0 76,407 8/17/2024
0.28.2 1,272,951 4/26/2024
0.28.1 226,942 4/16/2024
0.28.0 161,115 4/7/2024
0.27.3 458,834 2/18/2024
0.27.2 204,143 1/28/2024
0.27.1 39,936 1/24/2024
0.27.0 108,298 1/15/2024
0.26.7 259,430 12/16/2023
0.26.6 20,885 12/14/2023
0.26.5 103,850 12/10/2023
0.26.4 55,161 12/2/2023
0.26.3 108,904 11/23/2023
0.26.2 99,606 11/16/2023
0.26.1 52,712 11/9/2023
0.26.0 21,799 11/6/2023
0.25.0 798,461 6/25/2023
0.24.2 149,981 5/5/2023
0.24.1 73,362 4/26/2023
0.24.0 2,343 4/26/2023
0.23.0 166,876 3/6/2023
0.22.1 146,248 1/18/2023
0.22.0 36,635 1/15/2023
0.21.0 166,505 11/29/2022
0.20.0 122,105 10/3/2022
0.19.2 28,843 9/15/2022
0.19.1 84,156 8/27/2022
0.19.0 102,494 8/15/2022
0.18.0 98,591 6/13/2022
0.17.0 47,717 5/23/2022
0.16.0 96,266 3/26/2022
0.15.1 31,064 2/14/2022
0.15.0 2,405 2/9/2022
0.14.0 5,946 1/22/2022
0.13.0 4,057 1/3/2022
0.12.0 5,013 11/30/2021
0.11.1 1,247 11/15/2021
0.10.0 1,465 10/18/2021
0.9.9 1,629 8/23/2021
0.9.8 1,256 7/27/2021
0.9.7 744 6/26/2021
0.9.6 766 6/12/2021
0.9.5 1,052 6/1/2021
0.9.4 696 5/24/2021
0.9.3 653 5/18/2021
0.9.2 701 5/6/2021
0.9.1 602 5/5/2021
0.9.0 651 4/23/2021
0.8.9 589 4/12/2021
0.8.8 758 3/27/2021
0.8.7 603 3/22/2021
0.8.6 593 3/16/2021
0.8.5 604 3/12/2021
0.8.4 615 3/8/2021
0.8.3 700 3/8/2021
0.8.2 614 2/27/2021
0.8.1 880 2/22/2021