I want to integrate my instance of VS 2015 RC with StyleCop in the way that I have StyleCop menu options [Run StyleCop, Run StyleCop (Rescan All), StyleCop Settings] available when right clicking on project in Solution Explorer. Installing StyleCop-4.7.49.0.msi from official StyleCop site adds proper options for VS 2013 but not for 2015. Is it possible to achieve that?
-
The main page of the project (https://stylecop.codeplex.com/) states it's not compatible with 2015 yet, so you probably have to wait for the developers to change that. – Ray Jul 09 '15 at 09:59
-
Yes I saw that, but maybe there are some simple tricks with configuration files or registries which could encourage StyleCop editor to work with VS 2015 :). – leszek Jul 09 '15 at 10:11
-
I see. I'm interested about these too then, needing StyleCop when VS 2015 goes live at the end of July =3 – Ray Jul 09 '15 at 15:46
3 Answers
If it can help you, I have created a fork of StyleCop from CodePlex. My version works now with VS2015 and support most of new C# 6 specifications. Like version 4.7.49.0, you can right click on your project and you can find "Run StyleCop, Run StyleCop (Rescan All) or Edit settings" menus.
How to install it :
- Start VS2015
- Go to Tools and select "Extensions and Updates..." menu
- Select "Online" then "Visual Studio Gallery" on the left list
- In search box enter : "StyleCop"
- Select and download "Visual StyleCop"
- Then right click on your project and run StyleCop
If you have any issue you can report it on GitHub, project name : Visual StyleCop.

- 15,243
- 9
- 65
- 95

- 494
- 4
- 7
-
3You should (at least) summarize the information from your link, in case the link breaks later. – Tripp Kinetics Sep 02 '15 at 20:52
-
I have removed direct link. Now I explain how to install a version of StyleCop for VS2015 from visual studio gallery. – ptittof57 Sep 03 '15 at 17:44
-
-
Does it matter if it's installed into a single (out of three) project in my solution? Should I prefer to install it into all projects? Also, I see *Visual-StyleCop.MSBuild* (4.7.59) but not *Visual SrtyleCop*. Is it the same? – Konrad Viltersten Apr 15 '16 at 23:49
Installed VS2015 Community release recently. Since StyleCop project does not list 2015 as supported I digged further.
And found solution. It is StyleCopAnalyzers that can be installed via nuget (make sure that you click "include prerelease" checkbox) on per project basis. This is interesting solution and I like how it looks.
Downside is that it is not possible to just use old Settings.StyleCop and it took me some searching how to configure rules. And I found this blog post. Basically you expand your references list. Then right click on the Analyzers create ruleset and you have .ruleset file in the project.

- 13,221
- 9
- 64
- 84

- 644
- 1
- 4
- 14
-
3http://fssnip.net/ss here's a small F# script to help migrate old Settings.StyleCop to new .ruleset format – Stas Shusha Sep 22 '15 at 20:39
-
1
-
@StasShusha, you could engage in the converation [here](https://github.com/DotNetAnalyzers/StyleCopAnalyzers/issues/1144). – Borislav Ivanov Sep 25 '15 at 11:24
-
Its worth noting that StyleCop.Analyzers not exactly equivalent to StyleCop ; it is an implementation of the rules from StyleCop but implemented using the Code Analysis engine in Visual Studio 2015. – user1069816 Jan 11 '16 at 12:59
If you are using ReSharper there is StyleCop support for ReSharper in this package: https://resharper-plugins.jetbrains.com/packages/ReSharper.StyleCop/

- 2,763
- 2
- 26
- 43