Most Basic Setup: How to have one set of settings for everything

Jun 10, 2010 at 7:46 PM
Edited Jun 10, 2010 at 7:52 PM

Hello, I'd like to just have one set of StyleCop 4.3.3.0 settings for all of my projects. I don't need settings preferece overriding, inheritance, merging, etc.

How is this most simply accomplished?

What I've tried:

- Nuke any and all Settings.StyleCop files except for the original one in C:\Program Files\Microsoft StyleCop 4.3.3.0
- Try to edit that.
- It acts as though it is read-only. It doesn't complain, but no changes I make persist.
- Also, I can see that the modification date on the Settings.StyleCop file doesn't change. For example, the mod date on this should be 6/10/2010:

 

Note: this may not even be the right way to go about having a global settings setup.  Please let me know if there is a better way.

 

 

Jun 10, 2010 at 9:46 PM

The typical way is to put a Settings.StyleCop file at the root of your project, as far up the tree as you can. It will automatically be picked up by all projects under that folder. I would not recommend manually editing the settings file in the program files folder.

From: adamkane [mailto:notifications@codeplex.com]
Sent: Thursday, June 10, 2010 11:47 AM
To: Jason Allor
Subject: Most Basic Setup: How to have one set of settings for everything [stylecop:215646]

From: adamkane

Hello, I'd like to just have one set of StyleCop settings for all of my projects. I don't need settings preferece overriding, inheritance, merging, etc. How is this most simply accomplished? What I've tried: - Nuke any and all Settings.StyleCop files except for the original one in C:\Program Files\Microsoft StyleCop 4.3.3.0 - Try to edit that. - It acts as though it is read-only. It doesn't complain, but no changes I make persist. - Also, I can see that the modification date on the Settings.StyleCop file doesn't change. For example, the mod date on this should be 6/10/2010: Screenshot: http://farm5.static.flickr.com/4064/4688882614_61fa607a19_b.jpg

Read the full discussion online.

To add a post to this discussion, reply to this email (stylecop@discussions.codeplex.com)

To start a new discussion for this project, email stylecop@discussions.codeplex.com

You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe or change your settings on codePlex.com.

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at codeplex.com

Jun 11, 2010 at 1:15 AM

To edit the default Settings.StyleCop file, I was using the StyleCopSettingsEditor.exe.

The problem was that, at least as an admin user on Windows 7, changes to that file, when in "Programs Files" do not persist.  By reinstalling StyleCop in /Users/Adam/Documents/, where there are no issues with reading/writing files, everything works.  Weird.