How do I integrate StyleCop 4.7 with Visual Studio 2013?

前端 未结 3 1722
不思量自难忘°
不思量自难忘° 2021-01-31 18:01

I really want to use StyleCop with my Visual Studio 2013, but unfortunately it won\'t work. I\'ve installed the 4.7 version from the official site, checking all options, both VS

3条回答
  •  -上瘾入骨i
    2021-01-31 18:30

    I have integrated the stylecops 4.7 with Visual Studio 2013 (Web) using following steps.

    1. In order to integrate StyleCop with a project, an needs to be added to the .csproj file (versions and paths might differ):

    If you used the official installer and installed the 'MSBuild integration' component, your will look like this:

     
    
    
    

    Note: You need to add the above line in each and every project in your solution.

    1. Copy Settings.StyleCop in the project solution folder from C:\Program Files\StyleCop 4.7 on solution root folder or add as a solution item.

    2. Double click the Settings.StyleCop file as configure the rules. You should be able to use the stylecops in your project.

提交回复
热议问题