<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>StyleCop on Gabriel Mongeon</title><link>https://gabrielmongeon.ca/en/tags/stylecop/</link><description>Recent content in StyleCop on Gabriel Mongeon</description><generator>Hugo</generator><language>en</language><lastBuildDate>Mon, 02 Aug 2010 16:45:00 -0400</lastBuildDate><atom:link href="https://gabrielmongeon.ca/en/tags/stylecop/index.xml" rel="self" type="application/rss+xml"/><item><title>How to Create Your StyleCop Rules</title><link>https://gabrielmongeon.ca/en/2010/08/how-to-create-your-stylecop-rules/</link><pubDate>Mon, 02 Aug 2010 16:45:00 -0400</pubDate><guid>https://gabrielmongeon.ca/en/2010/08/how-to-create-your-stylecop-rules/</guid><description>&lt;p>StyleCop is a free tool from Microsoft that allows you to check the style of your code (or others&amp;rsquo;). Additionally, StyleCop is now available as Open Source (on &lt;a href="http://stylecop.codeplex.com/">Codeplex&lt;/a>), so I strongly recommend looking at the default rule implementations to help you create your own.&lt;/p>
&lt;h3 id="create-your-rules">Create Your Rules&lt;/h3>
&lt;p>Here are some steps to create your custom StyleCop rules:&lt;/p>
&lt;ul>
&lt;li>Install the latest version of &lt;a href="http://stylecop.codeplex.com/">StyleCop&lt;/a>&lt;/li>
&lt;li>&lt;a href="http://stylecop.codeplex.com/releases/">Download the SDK&lt;/a> of StyleCop (documentation .chm file)&lt;/li>
&lt;li>Start Visual Studio&lt;/li>
&lt;li>Create a new project of type “Class Library”&lt;/li>
&lt;li>Add the following references
- Microsoft.StyleCop
- Microsoft.StyleCop.CSharp
- Microsoft.StyleCop.CSharp.Rules&lt;/li>
&lt;/ul>
&lt;p>&lt;img src="https://gabrielmongeon.ca/img/StyleCop_SolutionExplorer_thumb.png" alt="StyleCop_SolutionExplorer" title="StyleCop_SolutionExplorer">&lt;/p></description></item></channel></rss>