Fxcop not working on .net core project when launched from console

I am trying to integrate static analysis into a .net core 1.1 project. What I have been doing so far is to install the Microsoft.CodeAnalysis.FxCopAnalyzers package and add the rules to the csproj property group:

<PropertyGroup>
    <TargetFramework>netcoreapp1.1</TargetFramework>
    <CodeAnalysisRuleSet>../StaticAnalysis/ManagedRuleSet.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>

      

I created a rule violation for testing and this setup works well in Visual Studio 2017. The problem comes up when I try to build from the console:

dotnet build

      

No errors or warnings :( This is very important so that I can do this run on the build machine.

+3


source to share





All Articles