Add StyleCop to your Visual Studio build

Add a file called Directory.Build.Props to your solution with the contents below.


		<PackageReference Include="StyleCop.Analyzers" version="1.2.0-beta.435">
			<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>

Also add a .editorconfig to your solution to configure your code styling. The StyleCop analyzer and the .editorconfig file play together to configure your build process.


Leave a Reply

Your email address will not be published. Required fields are marked *