Search code examples
c#azure-pipelinessuppress-warningsstylecop

C# Suppressed warnings appearing in Azure Build Pipelines


I've added Stylecop.Analyzers nuget package in my .Net Core project, I have suppressed the following warnings on my project:

enter image description here

After having 0 errors and 0 warnings in my visual studio locally, my azure build pipeline is still displaying those warnings, here's one of them:

##[warning]CSC(0,0): Warning SA0001: XML comment analysis is disabled due to project configuration [D:\a\1\s\FooRoot\Services\FooService\FooProjectService.csproj]

Currently it is not failing the build pipelines but I wanted to have a warning-free build pipeline

EDIT: My pipeline looks something like this: enter image description here


Solution

  • i assume you are using dotnet build in Azure pipeline and you can suppress warning with -nowarn options

    in you case something like that dotnet build -nowarn:SA1636