I am moving my project to the new .NET Analyzers using Rosyln, previously I was using the nuget package. I'm trying to do the process described here: Migrate from FxCop analyzers to .NET analyzers
Now my csproj looks like:
<Project>
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<EnableNETAnalyzers>true</EnableNETAnalyzers>
<AnalysisMode>AllEnabledByDefault</AnalysisMode>
</PropertyGroup>
</Project>
If TargetFramework is net5.0, all rules are return an error, but I cannot make it work when it's set to netstandard2.0.
I cannot move to net5.0 because this dll is referenced by a .NET 4.8 project.