Adding Code Analysis and StyleCop checks to .NET Core projects with dotnet-addcasa

by Carlos Mendible on 05 Apr 2018 » dotNetCore

Today I’ll show you how to use dotnet-addcasa: a .NET Core global tool to add CodeAnalysis and Stylecop checks to your projects.

If you want to manually add those checks or understand the tool internals check my post: .NET Core, Code Analysis and StyleCop

1. Prerequisites

You’ll need .NET Core SDK 2.1.300-preview1 installed.

2. Install the dotnet-addcasa .NET Core tool

To install dotnet-addcasa as a global tool run:

dotnet install tool -g dotnet-addcasa

3. Add Code Analysis and StyleCop checks to your projects

To add CodeAnalysis and StyleCop to all your projects run the following command from the root folder of your solution or workspace.

dotnet addcasa

The tool is a work in progress so feel free to contribute here

Hope it helps!