<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Stefano Ricciardi &#187; Plugin</title>
	<atom:link href="http://stefanoricciardi.com/tag/plugin/feed/" rel="self" type="application/rss+xml" />
	<link>http://stefanoricciardi.com</link>
	<description>On Software Development and Thereabouts</description>
	<lastBuildDate>Tue, 15 Nov 2011 07:57:34 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>See Your XML Docs As You Type With CR Documentor</title>
		<link>http://stefanoricciardi.com/2010/01/22/see-your-xml-docs-as-you-type-with-cr-documentor/</link>
		<comments>http://stefanoricciardi.com/2010/01/22/see-your-xml-docs-as-you-type-with-cr-documentor/#comments</comments>
		<pubDate>Fri, 22 Jan 2010 19:39:29 +0000</pubDate>
		<dc:creator>stefanoricciardi</dc:creator>
				<category><![CDATA[Tools]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[Documentor]]></category>
		<category><![CDATA[Ghost-Doc]]></category>
		<category><![CDATA[Plugin]]></category>
		<category><![CDATA[Visual Studio 2008]]></category>

		<guid isPermaLink="false">http://stefanoricciardi.wordpress.com/?p=701</guid>
		<description><![CDATA[Introduction Almost 10 years ago now I used to be a Java developer in Motorola. After a long hiatus in the embedded systems and a job change, I have come back to enterprise development, this time in .Net. I remembered that in the good ol’ days it required 2 steps to see the final rendering [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fstefanoricciardi.com%2F2010%2F01%2F22%2Fsee-your-xml-docs-as-you-type-with-cr-documentor%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fstefanoricciardi.com%2F2010%2F01%2F22%2Fsee-your-xml-docs-as-you-type-with-cr-documentor%2F&amp;style=normal&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<h3>Introduction</h3>
<p>Almost 10 years ago now I used to be a Java developer in Motorola. After a long hiatus in the embedded systems and a job change, I have come back to enterprise development, this time in .Net.</p>
<p>I remembered that in the good ol’ days it required 2 steps to see the final rendering of the XML documentation: firing javadoc (usually from within an ANT task) and the open up the content in a browser.</p>
<p>I was quite surprised to see that in the .Net area seeing the final output of the docs was not as straightforward as I hoped for. Yes, there was <a href="http://ndoc.sourceforge.net/">NDoc</a> to parse the XML, but its development stopped around 2005 and it’s doesn’t support anything beyond C# 2.0. There’s also <a href="http://www.codeplex.com/Sandcastle">Sandcastle</a>, but to make it work for me it has required a few downloads and a bit of tweaking here and there. And integrating it into my NAnt task had not been that easy either. But somehow in the end I have pulled that out.</p>
<p>Therefore I have been pleasantly surprised when I met <strong>CR Documentor, </strong>a little plug-in for visual studio that let’s you see your XML documentation <em>as you write it</em>. It’s almost like having a WYSIWYG editor, without having to launch Sandcastle, wait for the complete build, and open up the browser.</p>
<h3>Installation</h3>
<ul>
<li><a href="http://code.google.com/p/cr-documentor/"><img style="display:inline;border-width:0;margin:0;" title="cr_documentor-logo" src="http://stefanoricciardi.files.wordpress.com/2010/01/cr_documentorlogo.gif" border="0" alt="cr_documentor-logo" width="100" height="102" align="right" /></a>Requirements:
<ul>
<li>Visual Studio 2005 or greater (I am pretty confident that you need at least a Professional version as opposed to Express). I am running it on Visual Studio Team System 2008, not sure whether it works also on 2010.</li>
<li>The DXCore plugin framework from DevExpress. Possibly the best (and only?) way to get it is to get through the excellent free <a href="http://www.devexpress.com/Products/Visual_Studio_Add-in/CodeRushX/">CodeRush Xpress for C# and VB</a></li>
</ul>
</li>
<li>Download the plugin: CR Documentor is hosted at Google Code at <a href="http://code.google.com/p/cr-documentor/">this link</a>.</li>
<li>Copy the dll in your DX-Core plugin-folder (<tt>C:\Users\&lt;username&gt;\Documents\DevExpress\IDE Tools\Community\PlugIns</tt>)</li>
<li>Restart Visual Studio</li>
</ul>
<h3>Usage</h3>
<ol>
<li>CR Documentor adds itself in the right click menu, close to the bottom. From the submenu, choose “Show CR_Documentor window”.<a href="http://69.175.59.226/~stefano3/blog/wp-content/uploads/2010/01/cr_documentor1.png"><img style="display:inline;margin-left:0;margin-right:0;border-width:0;" title="CR_documentor-1" src="http://69.175.59.226/~stefano3/blog/wp-content/uploads/2010/01/cr_documentor1_thumb.png" border="0" alt="CR_documentor-1" width="244" height="212" /></a></li>
<li>A new window opens up in floating mode (I prefer to dock-it to the right side together with my solution explorer and luckily the plug-in remembers this choice every time I open the window after closing it and at startup).<a href="http://69.175.59.226/~stefano3/blog/wp-content/uploads/2010/01/image.png"><img style="display:inline;border-width:0;" title="image" src="http://69.175.59.226/~stefano3/blog/wp-content/uploads/2010/01/image_thumb.png" border="0" alt="image" width="244" height="127" /></a></li>
<li>Now every time your cursor is on an XML doc, you can see the preview in the Documentor window. See for example when I put the cursor on the XML doc of a class: I get a complete picture of the documentation for that class and its methods all in real time.<br />
<a href="http://stefanoricciardi.files.wordpress.com/2010/01/image1.png"><img style="display:inline;border-width:0;" title="image" src="http://69.175.59.226/~stefano3/blog/wp-content/uploads/2010/01/image_thumb1.png" border="0" alt="image" width="229" height="244" /></a></li>
<li>There are a few other features that I don’t use very often. All of them are accessible by the right-click content sensitive menu:
<ul>
<li>Expand/Collapse all XML comments in the editor</li>
<li>Insert XML docs templates (<a href="http://stefanoricciardi.com/2009/06/19/must-have-vs-2008-free-plug-ins-2-ghost-doc/">I prefer to use GhostDoc for that</a>).</li>
<li></li>
</ul>
</li>
</ol>
<h3>Configuration</h3>
<p>Like all DXCore plugins, you can access to the configuration by pressing ALT+CTRL+SHIFT+O combination. I like to check all my options to Sandcastle because that’s the tool that I will be using to create the final XML documentation.</p>
<p><a href="http://69.175.59.226/~stefano3/blog/wp-content/uploads/2010/01/image2.png"><img style="display:inline;border-width:0;" title="image" src="http://69.175.59.226/~stefano3/blog/wp-content/uploads/2010/01/image_thumb2.png" border="0" alt="image" width="244" height="161" /></a></p>
<p><a href="http://www.dotnetkicks.com/kick/?url=http%3a%2f%2fstefanoricciardi.com%2f2010%2f01%2f22%2fsee-your-xml-docs-as-you-type-with-cr-documentor%2f"><img src="http://www.dotnetkicks.com/Services/Images/KickItImageGenerator.ashx?url=http%3a%2f%2fstefanoricciardi.com%2f2010%2f01%2f22%2fsee-your-xml-docs-as-you-type-with-cr-documentor%2f" border="0" alt="kick it on DotNetKicks.com" /></a></p>
<p><a rev="vote-for" href="http://dotnetshoutout.com/See-Your-XML-Docs-As-You-Type-With-CR-Documentor-Stefano-Ricciardis-Blog"><img style="border:0;" src="http://dotnetshoutout.com/image.axd?url=http%3A%2F%2Fstefanoricciardi.com%2F2010%2F01%2F22%2Fsee-your-xml-docs-as-you-type-with-cr-documentor%2F" alt="Shout it" /></a></p>
<p><!-- AddThis Button BEGIN --></p>
<p><a href="http://www.addthis.com/bookmark.php?v=250"><img style="border-width:0;" src="http://s7.addthis.com/static/btn/lg-share-en.gif" alt="Bookmark and Share" width="125" height="16" /></a></p>
<div id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:e6ceeafa-fe5c-4bd6-a48d-325da43e5abc" class="wlWriterSmartContent" style="display:inline;float:none;margin:0;padding:0;">Technorati Tags: <a rel="tag" href="http://technorati.com/tags/Programming">Programming</a>,<a rel="tag" href="http://technorati.com/tags/C%23">C#</a>,<a rel="tag" href="http://technorati.com/tags/visual+Studio+2008">visual Studio 2008</a>,<a rel="tag" href="http://technorati.com/tags/Tools">Tools</a></div>

]]></content:encoded>
			<wfw:commentRss>http://stefanoricciardi.com/2010/01/22/see-your-xml-docs-as-you-type-with-cr-documentor/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Must have VS 2008 Free Plug-ins (1): Style Cop</title>
		<link>http://stefanoricciardi.com/2009/06/12/must-have-vs-2008-free-plug-ins-1-style-cop/</link>
		<comments>http://stefanoricciardi.com/2009/06/12/must-have-vs-2008-free-plug-ins-1-style-cop/#comments</comments>
		<pubDate>Fri, 12 Jun 2009 20:59:36 +0000</pubDate>
		<dc:creator>stefanoricciardi</dc:creator>
				<category><![CDATA[Tools]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[Coding Standards]]></category>
		<category><![CDATA[MSBuild]]></category>
		<category><![CDATA[Plugin]]></category>
		<category><![CDATA[StyleCop]]></category>
		<category><![CDATA[Visual Studio 2008]]></category>

		<guid isPermaLink="false">http://stefanoricciardi.wordpress.com/?p=91</guid>
		<description><![CDATA[Coding standards is one of those topics which can easily create endless discussions between developers (Steve McConnell prefers the term religious wars in his famous book Code Complete). Everybody seems to have his/her own preferences and pet peeves when it comes to the lay out of statements and naming of types and variables (not to [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fstefanoricciardi.com%2F2009%2F06%2F12%2Fmust-have-vs-2008-free-plug-ins-1-style-cop%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fstefanoricciardi.com%2F2009%2F06%2F12%2Fmust-have-vs-2008-free-plug-ins-1-style-cop%2F&amp;style=normal&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p>Coding standards is one of those topics which can easily create endless discussions between developers (Steve McConnell prefers the term <em>religious wars</em> in his famous book Code Complete). Everybody seems to have his/her own preferences and pet peeves when it comes to the lay out of statements and naming of types and variables (not to mention the eternal “<a href="http://www.codinghorror.com/blog/archives/001254.html">tab vs spaces</a>” argument).</p>
<p>All the programming languages that I have worked with have their own guidelines when it comes to coding standards. Or have they? The C language, father of C++, C# and Java languages, has its own share of style variations: Emacs supports half a dozen C coding styles (K&amp;R, BDS, Linux, etc…), and at least a couple C++ modes (Ellemtel, Stroustrup).</p>
<p>While the Java community can refer to a common <a href="http://java.sun.com/docs/codeconv/">standard</a>, this doesn’t seem to be the case for C# developers. The <a href="http://www.tiobe.com/standards/gemrcsharpcs.pdf">guidelines from Philips</a> (pdf) are the ones which one is most often redirected to, but one can hardly call them “official”; Microsoft has also something on the MSDN on <a href="http://msdn.microsoft.com/en-us/library/xzf533w0(VS.71).aspx">naming conventions</a>, but there doesn’t seem to be anything related to code layout (spacing, indentation, etc…).</p>
<p>Whatever the choice, though, only a few would argue that choosing one standard for the team and sticking to it is not of outmost importance to improve readability and ease maintenance for years to come.</p>
<h4>Microsoft Style Cop</h4>
<p>Enters Style Cop. <a href="http://code.msdn.microsoft.com/Release/ProjectReleases.aspx?ProjectName=sourceanalysis&amp;ReleaseId=1425">Style Cop</a> (not to be confused with <a href="http://blogs.msdn.com/fxcop/">Fx Cop</a>) is a free Visual Studio plug-in which is released by Microsoft itself. It can be run on a single file or entire project or solutions and reports all the variations to its predefined set of rules for naming conventions, documentation and code layout. To run it on the current file, just right click on the editor and select the corresponding menu item:</p>
<p><a href="http://69.175.59.226/~stefano3/blog/wp-content/uploads/2009/06/stylecop1.png"><img style="display:inline;border-width:0;" title="StyleCop1" src="http://69.175.59.226/~stefano3/blog/wp-content/uploads/2009/06/stylecop1_thumb.png" border="0" alt="StyleCop1" width="468" height="303" /></a></p>
<p>This is the output that I got running the tool on the code above:</p>
<p><a href="http://69.175.59.226/~stefano3/blog/wp-content/uploads/2009/06/image.png"><img style="display:inline;border-width:0;" title="image" src="http://stefanoricciardi.files.wordpress.com/2009/06/image_thumb.png" border="0" alt="image" width="478" height="261" /></a></p>
<p>If you need additional information about how to fix a particular violation, you can right click on a StyleCop warning, select <em>Show Error Help</em> and dig in:</p>
<p><a href="http://69.175.59.226/~stefano3/blog/wp-content/uploads/2009/06/image1.png"><img style="display:inline;border-width:0;" title="image" src="http://69.175.59.226/~stefano3/blog/wp-content/uploads/2009/06/image_thumb1.png" border="0" alt="image" width="455" height="484" /></a></p>
<p>Default settings can be customized to some extent. To do so, right click on a Project from the Solution Explorer to invoke the settings editor:</p>
<p><a href="http://69.175.59.226/~stefano3/blog/wp-content/uploads/2009/06/image2.png"><img style="display:inline;border-width:0;" title="image" src="http://69.175.59.226/~stefano3/blog/wp-content/uploads/2009/06/image_thumb2.png" border="0" alt="image" width="335" height="303" /></a></p>
<p>From the Rules tab you can relax some of the rules or extend or restrict the scope according to the visibility (private/internal/protected/public).</p>
<p><a href="http://69.175.59.226/~stefano3/blog/wp-content/uploads/2009/06/image3.png"><img style="display:inline;border-width:0;" title="image" src="http://69.175.59.226/~stefano3/blog/wp-content/uploads/2009/06/image_thumb3.png" border="0" alt="image" width="454" height="362" /></a></p>
<p>Yes, you can remove the restriction on the Tabs if you want (but you don’t… do you?). You can even support Hungarian Notation if you wish so (God forbids…!!!).</p>
<p>Default settings are applied at a project level and saved in a file named <em>Settings.SourceAnalysis</em>; It might easily become tedious to repeat the same settings over and over (my Visual Studio solutions have typically at least 4 or 5 different projects, and not counting unit tests); luckily the settings are automatically applied to all projects located in the subdirectories of the directory where the file is. Therefore, it usually suffices to move the file in the solution directory; individual projects can ovverride the general settings by providing their own Setting.SourceAnalysis file if needed (I usually do that for the tests projects where I usually omit XML documentation for test fixtures).</p>
<p>On a final note, if you use MSBuild for integration then you can invoke StyleCop every time the solution is built. If you are interested, you can find all the details in this MSDN <a href="http://blogs.msdn.com/sourceanalysis/pages/source-analysis-msbuild-integration.aspx">page</a>.<br />
<!-- AddThis Button BEGIN --><br />
<a href="http://www.addthis.com/bookmark.php?v=250"><img style="border:0;" src="http://s7.addthis.com/static/btn/lg-share-en.gif" alt="Bookmark and Share" width="125" height="16" /></a><br />
<!-- AddThis Button END --></p>
<div id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:e6ceeafa-fe5c-4bd6-a48d-325da43e5abc" class="wlWriterEditableSmartContent" style="display:inline;float:none;margin:0;padding:0;">Technorati Tags: <a rel="tag" href="http://technorati.com/tags/Programming">Programming</a>, <a rel="tag" href="http://technorati.com/tags/C%23">C#</a>, <a rel="tag" href="http://technorati.com/tags/visual+Studio+2008">Visual Studio 2008</a>, <a rel="tag" href="http://technorati.com/tags/plugin">Plugin</a>, <a rel="tag" href="http://technorati.com/tags/Coding+Standards">Coding Standards</a>, <a rel="tag" href="http://technorati.com/tags/Tools">Tools</a>, <a rel="tag" href="http://technorati.com/tags/MSBuild">MSBuild</a></div>

]]></content:encoded>
			<wfw:commentRss>http://stefanoricciardi.com/2009/06/12/must-have-vs-2008-free-plug-ins-1-style-cop/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>

