Problems with Team-shared layer

I'm trying to get a team-shared layer working for my team, and I'm running into issues.

Specifically, we use StyleCop with ReSharper, so the "computer" layer is set to all of StyleCop's defaults. However, we want to override several of those defaults in our team-shared level, and I'm looking for guidance.

1. I've started going down the "Solution.DotSettings" file in each repository route. Unfortunately, it becomes very teadious then when we decide to update a setting, going through and updating EVERY project's dotsettings for that. Is there a better workflow someone can recommend for this?
2. We seem to have trouble overriding certain settings in the TeamShared level. Specifically, it appears that several of the BOOLEAN settings just get removed when unchecked instead of set to False. This makes it hard to override several things StyleCop defines in the computer layer, like C# Namespace imports in deepest scope, etc. Am I doing something wrong here, or do I just have to trial and error this and go through and set these settings back in the text file by hand? I'm worried now that most of my settings that I TOUGHT I was overriding are actually not because of this.

Comment actions Permalink

Hi. If you're using ReSharper 8, you might want to try this extension, which searches for *.AutoLoad.dotSettings files above the solution level:


Comment actions Permalink

The problem ended up being that I wanted to do the following:

1. Have a "StyleCop" Computer layer that had all of the StyleCop settings set to default. This way, if their settings ever changed for some reason, I could just hit the "Reset" button on the StyleCop extension and it would reset all of those settings without me having to worry about overwriting the ones we disagree with.
2. Have a "Team" computer layer that overrides the StyeCop layer settings that we don't want (e.g. setting them back to default). Unfortunately, because of the way the ReSharper UI works, when you set a value back to the default that ReSharper uses, it just removes the rule from it all together, instead of putting a rule into that layer with the default value!

I understand WHY they do this, but it means that I cannot actually do what I wanted to do without manually hand editing the Team file and never editing it with an editor (Because as soon as I save it, it will wipe out the ones I hand put in).

Essentially, I have to build a combined Team / StyleCop layer, at least until some mechanism is put in place to do something along the lines of what I want (e.g. if during the compare phase of the save process, it actually looked at lower layers to see if it SHOULD explicitely put an override in that higher layer or not).


Please sign in to leave a comment.