StyleCop integration with Visual Studio 2015 RC

点点圈 提交于 2019-12-02 17:41:24
ptittof57

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.

SerrNovik

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.

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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!