My team is using ReSharper and StyleCop as a way to detect style errors.
We have a global Solution.DotSettings file that contains all the rules we want to apply. This file is saved in the repository. During the build the file is then copied (hard link) and renamed to each folder that contains a solution.
MySolution.sln.DotSettings (hard link to Solution.DotSettings)
This idea works very well for us because the only thing we need to do is to maintain the global Solution.DotSettings file.
<wpf:ResourceDictionary xml:space="preserve" ...>
For the rule SA1650 however we need to find a way to use a custom dictionary in a centralized way like we do for the rules.
Is there a way to add words in the Solution.DotSettings file?
I know that it is possible to add words in the file CustomDictionary.xml in the C:\Program Files (x86)\StyleCop 4.7 directory. I tried that and works. However it is not acceptable for us.
We want a custom dictionary saved in the repository and automatically used across all the team without requiring manual effort.
I looked around in the various discussions and tried a lot of things but I can't find a solution to this problem.
An idea was to save the StyleCop folder in the repository and add an entry in the Solution.DotSettings file pointing to the StyleCop.dll file in it.
<s:String x:Key="/Default/StyleCopOptions/SpecifiedAssemblyPath/@EntryValue">c:\devroots\WIServices\Athena1\external\StyleCop 4.7\StyleCop.dll</s:String>
If I do that, in the Visual Studio StyleCop tab I see that the "StyleCop location" is not "Automatically detect location" but the custom path I specified. Unfortunately it seems that it is still used the CustomDictionary in ProgramFiles.
I also tried to add a Settings.StyleCop file in the root of our project together with a CustomDictionary.xml file with the custom words but it does not work.
Any idea how to solve this problem?