Running Roslyn Code Analyzers on the Build Server

I am trying to create my own rules for static analysis against my code base, so that compiler errors will be generated if the developer does not fulfill the agreement on coding their companies. Visual Studio 2015, Roslyn Code Analyzers , seems to be the way to do this.

The MSDN articles I read show that code analyzers are packaged in NuGet or VSIX packages. This is great for adding red squiggles to Visual Studio, but I want to make sure that compiler errors are also generated on my Jenkins build server.

Do Roslyn Code parsers run as part of the MSBuild pipeline so that they generate compiler errors on my build server? Do I need to configure MSBuild at all?

+6
source share
1 answer

Yes; Analyzers are integrated with MSBuild.

Visual Studio analyzer references are part of the project file, and the Roslyn MSBuild task will be passed to the compiler.

You do not need anything.

+7
source

All Articles