Wiki

Clone wiki

stylecop-msbuild / Home

What

See Introducing StyleCop.MSBuild for an introduction to StyleCop.MSBuild.

This is the project site for the StyleCop.MSBuild package only. For information about the main StyleCop project, see the StyleCop project site.

Where

Download the StyleCop.MSBuild package from the NuGet gallery. For update notifications, follow @adamralph.

How

Come and chat to fellow developers about StyleCop and StyleCop.MSBuild in the StyleCop JabbR chat room.

Tips

  • To run StyleCop analysis before other build steps, e.g. compilation, code analysis, etc. you can add the following to your .csproj file directly after the import of the StyleCop targets:
  <PropertyGroup>
    <BuildDependsOn>$([MSBuild]::Unescape($(BuildDependsOn.Replace(";StyleCop", "").Insert($(BuildDependsOn.IndexOf("BeforeBuild;")),"StyleCop;"))))</BuildDependsOn>
  </PropertyGroup>

Updated