Run codeformatter on an ASP.NET 5 project
Add a
*.csproj
to the root of your project (or an ancestor directory). It will be the target, can be named anything, and contains the following:
Code2Format.csproj
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <ItemGroup> <Compile Include=".cs" /> <Compile Include=".**.cs" /> </ItemGroup> <Target Name="Compile"> <Csc Sources="@(Compile)"/> </Target> </Project>
Then run the following command:
.\CodeFormatter.exe path\to\Code2Format.csproj /nocopyright /aggressive
This assumes that you've already cloned and built the codeformatter repo .