Search code examples
c#.netvisual-studio-2015stylecop

Issue in StyleCop Custom Rules integration in Visual Studio 2015


I wish to use StyleCop to frame my custom rule set. I downloaded a latest version of SytleCop and I followed the implementation procedure from one of the Blog.

I Implemented as identical to the above said Blog.

Project -> Right Click -> StyleCop Settings

enter image description here

It opens the StyleCop Setting Dialogue Window using StyleCop 5.0 (build 5.0.6187.1)

enter image description here

In the above window I can't able to see my Custom Rule. I opened the file explorer and navigate to the respective project's file path, there I noticed Settings.StyleCop

enter image description here

I tried to open the Settings.StyleCop by double click, it's opened the Settings file using StyleCop 4.7 (4.7.55.0)

enter image description here

Kindly assist me how to Create a Custom Rule and how to apply the rule in my code ?


Solution

  • Un-Install any extension you installed via Tools -> Extensions and Updates -> StyleCop

    enter image description here

    Moreover Re-Install the StyleCop (i.e., Un-Install and again Install) because some of the dll won't be remove of the above said Extensions file.