CSharpier can be run when a package is built by installing the CSharpier.MSBuild nuget package
Install-Package CSharpier.MSBuildBy default this will
- In Debug - on build will run
dotnet csharpierin the project folder to format all files in the project. - In Release - on build will run
dotnet csharpier --checkin the project folder to validate that all files in the project have already been formatted.
You can control when --check is used with the following Property
<PropertyGroup>
<CSharpier_Check>false</CSharpier_Check>
</PropertyGroup>