# Friday, October 22, 2010

At my current client I was tasked with implementing coding standards and styles and developing a process so the configurations can be easily maintained and shared.  ReSharper was already in place at the client and the since 99% of what they wanted to enforce, initially at least, was style related I chose to combine ReSharper with StyleCop.

After looking around the interwebs for awhile I realized this process is either impossible or undocumented…or both.

The process I came up with is about 90% of what I was hoping and still requires two manual steps by the developer but overall it is solid.  So, let’s get started.  First download and install the following tools:

  1. StyleCop 
  2. StyleCop+

Although StyleCop+ is technically not required it does a great job with allowing you to extend and customize a lot of the built in StyleCop rules.  So I certainly recommend it.

The trick with StyleCop is that it will continue to look up the code tree for settings files and keep adding them together and then adds the settings file from StyleCop install directory to top things off.  That is unless you tell it to do otherwise.  What where going to do is first place a Settings.StyleCop file where all devlopers can access it.  Next we are going to place another at the root of our code directory.  So if your code resides at C:\Dev\Code then place the Settings.StyleCop file there.  We can then open up the settings file we placed out on the network that everyone has access to and tell it not to merge with any other settings file.  This will be the official settings file.


Next we will open the settings file in the root of our source tree and tell it merge only with the settings in the shared location.


Now once you make changes at the shared level they will be merged with each developers settings file.

Next we can deal with ReSharper…Stay Tuned!

Friday, October 22, 2010 11:25:57 PM (Central Daylight Time, UTC-05:00)
Why not just use StyleCop For Resharper?
Monday, October 25, 2010 7:13:51 PM (Central Daylight Time, UTC-05:00)
We had to do deal with StyleCop directly for setting up the StyleCop rules because we wanted to shared the rules between dev machines and the build servers. We most certainly are using StyleCop for ReSharper on the dev boxes.

Thanks for the Comment!
Saturday, March 26, 2011 4:44:34 PM (Central Standard Time, UTC-06:00)
Thursday, March 31, 2011 4:47:01 AM (Central Standard Time, UTC-06:00)
Enter the code shown (prevents robots):
Friday, July 01, 2011 8:08:19 AM (Central Daylight Time, UTC-05:00)
yggbar soffa
Saturday, July 30, 2011 10:45:38 AM (Central Daylight Time, UTC-05:00)
This blog information is so helpful for all mankind .it is a great article for that requirement.Thank you for submitted that blog.
Saturday, March 02, 2013 4:21:13 PM (Central Standard Time, UTC-06:00)
I am the opposite of lazy. I like the motto: “Been there done that!”. It makes me think about multiple opportunities that arise in our lives and if we are bold enough we take them. Furthermore, I wish to live many more years if possible and travel as much as I can. For instance I am one of the most devoted travellers to London because I love this city very much. Next week I visit it again!
Monday, March 04, 2013 3:05:28 AM (Central Standard Time, UTC-06:00)
I heard that Bora Bora is a very expensive place to go. There really is no cheap way to do it. There are less expensive ways to do it, but it's not going to be cheap any way you cut it. Even so I believe that a bora bora getaway once a year for a special occasion like a birthday, it will be great for you and your family.
Thursday, December 01, 2016 7:02:06 PM (Central Standard Time, UTC-06:00)
Aloha, the weather was really dreadful this morning so I took it upon myself to call in sick and explore the net instead, it turned out to be honestly a marvelous event for me as I dropped by at your blog. I just needed to compliment you upon the quality of the work you have done here and to send you the best of luck with it as you progress going forward. It was a pleasure to surf your site and I will certainly be dropping by again shortly to find out how you are doing. Take care and I will obviously see you back here very soon - Trevor Tenerife
Trevor Tenerife
Friday, May 03, 2019 11:36:14 AM (Central Daylight Time, UTC-05:00)
You explained everything very clearly, I think I have it now, thanks - Michael Middlewich
Michael Middlewich
(will show your gravatar icon)
Home page

Comment (Some html is allowed: a@href@title, strike) where the @ means "attribute." For example, you can use <a href="" title=""> or <blockquote cite="Scott">.  

Enter the code shown (prevents robots):

Live Comment Preview