How to enable stylecop in vs 2022?
Asked Answered
C

3

6

How can we install style cop in vs 2022? I have installed the style cop from the market place StyleCop Link, But unable to see the style cop option in the visual studio 2022. PFA.

VS 2022 Snip

Centonze answered 16/11, 2021 at 4:56 Comment(1)
Did you check Q & A from the same link. Question from Debanjan Paul might help youGiannagianni
T
7

Unfortunately, StyleCop does not support Visual Studio 2022 yet. the author says that:

I do not have any immediate plans to update the extension for Visual Studio 2022.

StyleCop "Classic" is already far behind C# language versions (resulting in parsing errors), and StyleCopAnalyzers has been available to provide similar functionality since Visual Studio 2015. I would suggest using StyleCopAnalyzers, if possible. By Chris Dahlberg 11/8/2021

https://marketplace.visualstudio.com/itemsitemName=ChrisDahlberg.StyleCop&ssr=false#qna

Tamper answered 16/11, 2021 at 5:22 Comment(0)
B
4

The stylecop feature doesn't work with Visual Studio 2022. The Compatible versions are Visual Studio 2012, 2013, 2015, 2017, 2019.

Brigade answered 16/11, 2021 at 7:19 Comment(1)
Please try to always add a source to statements like this (even if it is obviously correct in this case 😉).Hordein
P
0

it's not an extension; you should add "StyleCop.Analyzers" for each project. use this link: https://www.nuget.org/packages/StyleCop.Analyzers/1.1.118/

Passed answered 2/5 at 5:30 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.