Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 657471
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T22:49:39+00:00 2026-05-13T22:49:39+00:00

I have installed StyleCop CheckIn policy (from here ) and it works great. However

  • 0

I have installed StyleCop CheckIn policy (from here) and it works great. However I have written some custom rules which I want to be enforced as part of the CheckIn policy (Visual Studio 2008, Team Explorer 2008, TFS 2005).

The custom rules appear fine in the settings file when I right click on a project and click "StyleCop Settings". However when I add my CheckIn policy, and try to import the same settings.StyleCop file my Custom Rules don’t appear in the editor window.

Another problem, probably related, is that my custom rules appear in the StyleCop settings editor when I open the editor from Visual Studio. However if I open the editor by double-clicking a settings file from Windows explorer my rules are nowhere to be seen.

Now can anyone tell me if it is in fact possible to have custom rules as part of a checkIn policy, and if so how to go about getting them to appear in the StyleCop settings editor window when adding a checkIn policy.

Thanks,

Neil

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T22:49:39+00:00Added an answer on May 13, 2026 at 10:49 pm

    Yes, it is definitely possible!

    It can be a little tricky to get it all working correctly, but knowing a couple key things should help a lot.

    The first step is to have StyleCop working correctly on the developer machine with custom rules:
    1) StyleCop has to be installed on the developer machine
    2) The custom rules have to be installed in the same directory as StyleCop (or, optionally, into a child directory). If they’re installed anywhere else then they’re unlikely to work correctly, if they work at all.
    3) The Settings.StyleCop files in that installation directory, the directory containing the project being analyzed, and all directories above that one, have to combine to enable your custom rules. This one is verified best by double-clicking the Settings.StyleCop file in the project directory and making sure your rules are enabled in the editor.

    The next point is even trickier, having StyleCop working correctly on the build machine.
    It’s pretty much the same three points again, but on the build machine which will be running StyleCop for the check-in policy. So the build machine has to have StyleCop installed, the custom rules installed, and all the right Settings.StyleCop files to create the same overall StyleCop rule settings on the build machine as there are on the developer machine. This is easiest to break by simply not realizing that the build machine has to have StyleCop installed on it. Even if StyleCop is installed, StyleCop can run via VS integration (as you’re not doubt familiar with) or StyleCop via MSBuild integration (which is less common and typically less well understood). The build machine is often set up to use MSBuild integration, which means that the custom rules need to be installed in the %Program Files%\MSBuild\Microsoft\StyleCop\v4.3 directory instead of the %Program Files%\StyleCop directory you might be expecting. Additionally, if you’ve modified the base Settings.StyleCop file in the %Program Files%\StyleCop directory, then you’ll have to copy that file into the %Program Files%\MSBuild\Microsoft\StyleCop\v4.3 directory in order to get the same effect on the build machine. Note that doing a copy/paste with a verified working Settings.StyleCop file from a developer machine is the best way to make sure that the build machine has the correct settings. StyleCop is extremely picky about those XML files, and the slightest typo can lead to bizarre behaviour that will take days to debug. Do not hand edit. You have been warned. 8 )

    So there are definitely lots of ways to not get it exactly right, and you’re going to see strangeness just like you’ve described until you get it there. Fortunately, by keeping in mind the three points I’ve listed and the difference between “StyleCop on the build machine” and “StyleCop on a developer machine” it should be possible to get it all working smoothly eventually. Well, it’s consistently worked for me at least.

    Good luck!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am using StyleCop 4.4.0 RTW. I have installed it, copied the contents to
I have installed pyglet onto Mac OS X 10.7.4 using MacPorts. pyglet only works
I have installed python under /opt/python2.7.1/ on CentOS machine which has already python2.4 and
I have installed a library that has some functions with the same name as
I have installed django-registration with pip, version 0.7. Then with urls.py from core.forms import
I have installed gitorious ruby application, configured apache passenger and vhost. Everything works fine
I have installed Visual Studio 2012 (aka 11) and uninstalled 2010. However I noticed
I have installed and setup RubyCAS-Server and RubyCAS-Client on my machine. Login works perfectly
I have installed CherryPy 3.1.0,. Here is what happens when I try to run
I have installed the acts_as_versioned plugin from github.com in my rails application, and there

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.