Search code examples
visual-studiovisual-studio-2010stylecop

Is It possible to run stylecop on a single file in VS2010?


I've tried looking for command line options etc. I'm trying to lower the time I have to wait to see if a build fails due to stylecop.

This option does not appear in any context menus or the tools menu: Is it possible to run StyleCop on just 1 file in a project?


Solution

  • The following context menus should contain commands for running StyleCop:

    • At solution item in Solution Explorer (rescans the entire solution)
    • At project item in Solution Explorer (rescans a project)
    • At any single .cs file in Solution Explorer (scans single file)
    • Inside text editor of any single .cs file (scans single file)

    By the way, which StyleCop version do you use? Have you considered any issues about wrong installation?