StyleCop integration with Visual Studio 2015 RC

前端 未结 3 1813
萌比男神i
萌比男神i 2021-01-31 09:15

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

相关标签:
3条回答
  • 2021-01-31 09:59

    If you are using ReSharper there is StyleCop support for ReSharper in this package: https://resharper-plugins.jetbrains.com/packages/ReSharper.StyleCop/

    0 讨论(0)
  • 2021-01-31 10:07

    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.

    0 讨论(0)
  • 2021-01-31 10:10

    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 :

    1. Start VS2015
    2. Go to Tools and select "Extensions and Updates..." menu
    3. Select "Online" then "Visual Studio Gallery" on the left list
    4. In search box enter : "StyleCop"
    5. Select and download "Visual StyleCop"
    6. Then right click on your project and run StyleCop

    If you have any issue you can report it on GitHub, project name : Visual StyleCop.

    0 讨论(0)
提交回复
热议问题