0

I installed Style Cop Plus from Nuget. I know it is installed and doing its thing because I see wantings like this one:

SP2001 Warning  5   SP2001 : StyleCopPlus.StyleCopPlus : Only tab characters are allowed to be used for indentation.    D:\Users\Chad\Desktop\TypeScript\One\WebApplication4\Classes\Class1.cs  4   1   WebApplication4

However, this is in conflict with other static code analysis, not sure from where.

Warning 5   SA1027 : CSharp.Spacing : Tabs are not allowed. Use spaces instead. D:\Users\Chad\Desktop\TypeScript\One\WebApplication4\Classes\Class1.cs  4   1   WebApplication4

Prior to installing Style Code Plus, I already had Style Cop installed.

Clearly I have to turn off one of these warnings since they are in conflict with one another. I am trying to figure out where the rules can be configured for each.

If I ..

1. go to Project -> Properties -> Code Analysis Tab
2. Click the Open Rules button next to "MS recommended Rules" 
3. Search for "SP2001" and "SA1027"

..neither is found

However, I do find SA1027 in the Style Cop rules by doing the following

1. Project Explorer select Project, right mouse => Style Cop Settings 
. Find SA1027

SP2001, as the message indicates, is clearly a Style Cop Plus rule.

Referring to the Codeplex StyleCop Plus web page, I see in the documentation a Style Copy Plus dialog that looks like the following but I am unable to find it.

Where do I find the configurations screen for StyleCop Plus to turn off SA1027?

enter image description here

Update

From the above referenced web page:

As soon as StyleCop+ is installed correctly, you should see new "StyleCop+" tab appeared in settings dialog. This tab contains settings page for configuring all StyleCop+ features.

Chad
  • 23,658
  • 51
  • 191
  • 321
  • 1
    Unfortunately I cannot imagine how StyleCop+ could be installed via NuGet. Even if it's possible I have nothing to do with it and cannot help therefore. I would recommend you going to StyleCop+ page on CodePlex, downloading the original DLL and putting it into StyleCop folder. Let me know if it helps, thanks! – Oleg Shuruev Nov 12 '14 at 06:20
  • Also, when you go to "StyleCop Settings" dialog - do you see a "StyleCop+" as a last tab there? – Oleg Shuruev Nov 12 '14 at 06:23
  • When I tried to place the StyleCopLus.dll in the StyleCop folder and then run VS2013, I get this: --------------------------- StyleCop --------------------------- An exception occurred while loading one of the StyleCop add-ins: System.IO.FileLoadException, Could not load file or assembly 'file:///C:\Program Files (x86)\StyleCop 4.7\StyleCopPlus.dll' or one of its dependencies. Operation is not supported. (Exception from HRESULT: 0x80131515) --------------------------- OK --------------------------- – Chad Nov 16 '14 at 02:11
  • NO, the tab is missing. Thanks – Chad Nov 16 '14 at 02:12

1 Answers1

0

I did as Oleg suggested, I copied the StyleCopPlus.dll to the StyleCop folder. But then I decided to click the Properties of the file and click the "Unblock" button. This was the missing step. Thanks, Oleg!

Chad
  • 23,658
  • 51
  • 191
  • 321
  • Oh yeah, it's documented here https://stylecopplus.codeplex.com/wikipage?title=Quick%20Start%20Guide, but I know nobody reads that :) Anyway glad it worked finally! – Oleg Shuruev Nov 18 '14 at 02:58