CSharpier.MsBuild 0.30.1

There is a newer version of this package available.
See the version list below for details.
dotnet add package CSharpier.MsBuild --version 0.30.1
                    
NuGet\Install-Package CSharpier.MsBuild -Version 0.30.1
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="CSharpier.MsBuild" Version="0.30.1">
  <PrivateAssets>all</PrivateAssets>
  <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="CSharpier.MsBuild" Version="0.30.1" />
                    
Directory.Packages.props
<PackageReference Include="CSharpier.MsBuild">
  <PrivateAssets>all</PrivateAssets>
  <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add CSharpier.MsBuild --version 0.30.1
                    
#r "nuget: CSharpier.MsBuild, 0.30.1"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package CSharpier.MsBuild@0.30.1
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=CSharpier.MsBuild&version=0.30.1
                    
Install as a Cake Addin
#tool nuget:?package=CSharpier.MsBuild&version=0.30.1
                    
Install as a Cake Tool

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"
        );
    }
}
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.
  • net8.0

    • No dependencies.
  • net9.0

    • No dependencies.

NuGet packages (2)

Showing the top 2 NuGet packages that depend on CSharpier.MsBuild:

Package Downloads
Silksong.Modding.Templates

Templates for creating mods for Hollow Knight: Silksong

ItemChanger.Core

Package Description

GitHub repositories (19)

Showing the top 19 popular GitHub repositories that depend on CSharpier.MsBuild:

Repository Stars
Tyrrrz/YoutubeDownloader
Downloads videos and playlists from YouTube
Tyrrrz/DiscordChatExporter
Saves Discord chat logs to a file
Tyrrrz/CliWrap
Library for interacting with command-line interfaces
Tyrrrz/YoutubeExplode
Abstraction layer over YouTube's internal API
martinothamar/Mediator
A high performance implementation of Mediator pattern in .NET using source generators.
Tyrrrz/LightBulb
Reduces eye strain by adjusting screen gamma based on the current time
Tyrrrz/CliFx
Class-first framework for building command-line interfaces
Reaparr/Reaparr
Plex downloader that brings content from any server to yours!
Tyrrrz/Onova
Unintrusive auto-update framework
Tyrrrz/GitHubActionsTestLogger
Reports VSTest and MTP test results to GitHub Actions
Tyrrrz/DotnetRuntimeBootstrapper
Bootstrapped framework-dependent deployment for .NET applications
jerry08/Anikin
A multi-platform app to stream/download videos.
protyposis/AudioAlign
Audio Synchronization and Analysis Tool
Tyrrrz/Gress
Progress reporting toolbox
protyposis/Aurio
Audio Fingerprinting & Retrieval for .NET
TeamWheelWizard/WheelWizard
WheelWizard, Retro Rewind Launcher
surrealdb/surrealdb.net
SurrealDB SDK for .NET
Hona/VerticalSliceArchitecture
Spend less time over-engineering, and more time coding. The template has a focus on convenience, and developer confidence. Vertical Slice Architecture 🎈
jerry08/Yosu
Downloads videos, tracks and playlists from YouTube, Soundcloud and Spotify
Version Downloads Last Updated
1.2.3 2,643 12/14/2025
1.2.2 773 12/13/2025
1.2.1 95,807 11/10/2025
1.2.0 6,903 11/10/2025
1.1.2 228,477 8/16/2025
1.1.1 28,129 8/4/2025
1.1.0 986 8/3/2025
1.0.3 51,522 6/29/2025
1.0.2 64,726 5/24/2025
1.0.1 89,277 4/26/2025
1.0.0 34,801 4/22/2025
0.30.6 471,991 1/10/2025
0.30.5 54,168 1/3/2025
0.30.4 11,348 12/28/2024
0.30.3 63,365 12/7/2024
0.30.2 45,991 11/22/2024
0.30.1 33,528 11/18/2024
0.30.0 5,889 11/17/2024
0.29.2 194,055 9/15/2024
0.29.1 50,725 8/23/2024
0.29.0 25,791 8/17/2024
0.28.2 304,878 4/26/2024
0.28.1 6,508 4/16/2024
0.28.0 57,528 4/7/2024
0.27.3 78,620 2/18/2024
0.27.2 75,352 1/28/2024
0.27.1 18,176 1/24/2024
0.27.0 16,955 1/15/2024
0.26.7 26,167 12/16/2023
0.26.6 1,899 12/14/2023
0.26.5 7,322 12/10/2023
0.26.4 9,975 12/2/2023
0.26.3 11,039 11/23/2023
0.26.2 13,807 11/16/2023
0.26.1 4,772 11/9/2023
0.26.0 2,161 11/6/2023
0.25.0 64,164 6/25/2023
0.24.2 16,290 5/5/2023
0.24.1 31,892 4/26/2023
0.24.0 565 4/26/2023
0.23.0 16,686 3/6/2023
0.22.1 28,264 1/18/2023
0.22.0 42,388 1/15/2023
0.21.0 14,470 11/29/2022
0.20.0 9,128 10/3/2022
0.19.2 3,400 9/15/2022
0.19.1 1,319 8/27/2022
0.19.0 1,057 8/15/2022
0.18.0 6,836 6/13/2022
0.17.0 3,365 5/23/2022
0.16.0 6,858 3/26/2022
0.15.1 2,544 2/14/2022
0.15.0 2,661 2/9/2022
0.14.0 991 1/22/2022
0.13.0 19,118 1/3/2022
0.12.0 4,046 11/30/2021
0.11.2 7,804 11/16/2021
0.10.0 781 10/18/2021
0.9.9 7,961 8/23/2021
0.9.8 1,085 7/27/2021
0.9.7 658 6/26/2021
0.9.6 537 6/12/2021
0.9.5 539 6/1/2021
0.9.4 563 5/24/2021
0.9.3 1,375 5/24/2021