What Replaces Code Analysis in Visual Studio 2019?
Asked Answered
F

2

14

I'm toying with getting our team and projects ready for VS 2019. Right away, trying to set up Code Analysis for a new project, I find this:

enter image description here

So, if this is deprecated (and apparently can't even be used, so I'm thinking "deprecated" really means "gone"), where are we supposed to set up our Rule Sets? Is there some other location, or perhaps an altogether new solution to the problem of style and code quality?

Fulgurite answered 9/4, 2019 at 17:23 Comment(2)
This fat got chewed in this github issue page.Naoise
You need to install Microsoft.CodeAnalysis.NetAnalyzers (Microsoft.CodeAnalysis.FxCopAnalyzers is deprecated)Bronwyn
T
12

Going forward, static analysis will be provided by Roslyn analyzers: https://github.com/dotnet/roslyn-analyzers

Migrate from FxCop code analysis to .NET compiler platform analyzers

Torytoryism answered 9/4, 2019 at 20:52 Comment(6)
And here is a section on code analyzers in VS 2019 learn.microsoft.com/sv-se/visualstudio/code-quality/…Heuer
Thanks, @MunchyYDL. I've added that link to the answer.Torytoryism
I suppose this means I need to dig in more. I was previously under the impression that those Code Analysis rule sets WERE Roslyn analyzers.Fulgurite
There is a plugin: marketplace.visualstudio.com/…Mattie
> If you are already using the equivalent NuGet package (Microsoft.CodeAnalysis.FXCopAnalyzers), then installing this extension will cause issues (see issue here). Please install the latest NuGet package rather than the extension if this is the case.Torytoryism
You need to install Microsoft.CodeAnalysis.NetAnalyzers (Microsoft.CodeAnalysis.FxCopAnalyzers is deprecated)Bronwyn
A
-3

Microsoft IntelliCode looks great!

Agenda answered 2/5, 2019 at 15:24 Comment(1)
IntelliCode is a coding assistance tool, not a code validation tool.Torytoryism

© 2022 - 2024 — McMap. All rights reserved.