.NET Core, Code Analysis and StyleCop

So now that .NET Core and .NET Standard 2.0 have been released some of you may be migrating applications or even creating new ones with it. As you progress you are starting to worry about the quality of your code so what you want is to at least check your code against design and style guidelines don’t you?

This post will show you how easy is to make .NET Core, Code Analysis and StyleCop play along together.

Here you go:

1. Create a folder for your new project
2. Create the project
3. Add the references for CodeAnalysis ansd StyleCop
4. Add CodeAnalysisRuleSet property to the project
5. Create the ca.ruleset file
6. Build the application and check the warnings

You can get the code here.

Hope it helps!

4 thoughts on “.NET Core, Code Analysis and StyleCop

Leave a Reply