9
votes

I have created a number of custom StyleCop rules that incorporates some special style requirements that were agreed upon in our development team.

The StyleCop SDK documentation (http://stylecop.codeplex.com/downloads/get/324789) states that:

Custom StyleCop rules can be installed by simply copying the assembly containing the rules to the directory that contains StyleCop.dll, or any subdirectory under that directory.

For this to work Visual Studio needs to be closed when using StyleCop for ReSharper.

I expect to be introducing new rules and bugfixes continuously. Is there a good way to distribute new versions of the DLL file containing the custom rules among the team, other than writing a mail to everybody, asking them to close Visual Studio and copy it over the existing file?

1
You could try looking at StyleCop+. I've never used it and have no idea if its any good, but as it "extends original StyleCop features" it may support what you need.Mightymuke
StyleCop+ looks nice, but it does not seem to support distribution features.Rosted
Have you considered to use the rule-file instead a dll? We do it in this way, so everyone can modify the file an distribute it via svn (or what ever you use). Works very well.Micha
We do distribute the rules file by our source control versioning system too, but how could I make custom rules (i.e. new rules that I have written myself by inheriting from the SourceAnalyzer class) without distributing the dll?Rosted
@Rosted msbuild task supports AdditionalAddinPaths property, which can be used for setting additional paths to directories where you want to load your addins (and I guess that StyleCop console app also should have it). But I don't think that you can set them in VS (to support R#).outcoldman

1 Answers

0
votes

Use Chocolatey with NuGet. Make a local Chocolatey NuGet repository on a network share, and then the updates can be managed via a package installer.