This project is read-only.

AnalyzerSettings xProperty XML Node

May 27, 2011 at 4:10 PM


I created a simple custom rule. The rule should be parameterized from outside. Therefore I'd like to use the AnalyzerSettings or Rule/Settings in Settings.StyleCop. The only Properties i got to work are Boolean or String. I'd like to know, whether the other types work or not? Furthermore, if one set in CustomRules.xml a Property with DefaultValue and than override these value in Settings.StyleCop, one has access to both values. But if one misses the settings in Settings.StyleCop one does not have access to the DefaultValue. This make actually no sense, because if one override the default, why should one access the default?


I'll upload some testcode soon.

May 27, 2011 at 5:00 PM

here my new test project. if it would work correct or better as i expect, one should get 4 stylecop warnings. I get only 2. The IntProperty is missing and the 2nd StringProperty with DefaultValue if not explicitly defined in MySettings.StyleCop

Would be nice if you have a hint, how to get it work.