CSharpier 1.0.0-alpha45

This is a prerelease version of CSharpier.
There is a newer version of this package available.
See the version list below for details.
dotnet tool install --global CSharpier --version 1.0.0-alpha45
                    
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.0.0-alpha45
                    
This package contains a .NET tool you can call from the shell/command line.
#tool dotnet:?package=CSharpier&version=1.0.0-alpha45&prerelease
                    
nuke :add-package CSharpier --version 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"
        );
    }
}
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 was computed.  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.6 38,016 2/6/2026
1.2.5 240,126 12/31/2025
1.2.4 43,914 12/23/2025
1.2.3 78,756 12/14/2025
1.2.2 17,607 12/13/2025
1.2.1 379,129 11/10/2025
1.2.0 28,785 11/10/2025
1.1.2 989,960 8/16/2025
1.1.1 123,159 8/4/2025
1.1.0 7,975 8/3/2025
1.0.3 377,714 6/29/2025
1.0.2 379,131 5/24/2025
1.0.1 343,078 4/26/2025
1.0.0 103,854 4/22/2025
1.0.0-alpha99 318 4/13/2025
1.0.0-alpha84 174 4/19/2025
1.0.0-alpha83 160 4/19/2025
1.0.0-alpha81 267 4/13/2025
1.0.0-alpha80 189 3/15/2025
1.0.0-alpha45 338 2/22/2025
Loading failed