<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.southworks.net/~d/styles/itemcontent.css"?><rss 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:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">

<channel>
	<title>Juan Pablo Garcia's Blog</title>
	
	<link>http://blogs.southworks.net/jpgarcia</link>
	<description>The real .JPG extension</description>
	<pubDate>Mon, 08 Feb 2010 13:50:00 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.5.1</generator>
	<language>en</language>
			<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.southworks.net/jpgarcia" /><feedburner:info uri="jpgarcia" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><item>
		<title>Windows Azure Tables adapter for DataMapper</title>
		<link>http://feeds.southworks.net/~r/jpgarcia/~3/HllOoGlTwOU/</link>
		<comments>http://blogs.southworks.net/jpgarcia/2010/02/08/windows-azure-tables-adapter-for-datamapper/#comments</comments>
		<pubDate>Mon, 08 Feb 2010 12:17:27 +0000</pubDate>
		<dc:creator>jpgarcia</dc:creator>
		
		<category><![CDATA[DataMapper]]></category>

		<category><![CDATA[Uncategorized]]></category>

		<category><![CDATA[Windows Azure]]></category>

		<category><![CDATA[azure]]></category>

		<category><![CDATA[ruby]]></category>

		<guid isPermaLink="false">http://blogs.southworks.net/jpgarcia/?p=73</guid>
		<description><![CDATA[The Past
Last Friday, we shipped the first Major version (v1.0.0) of the Windows Azure Storage API gem for ruby, started a few months ago by my friend Johnny Halife. As it is an open-source project, I had the opportunity to contribute with:

Support for table service to query, get_one, insert, update, merge and delete entities.
Support for running against [...]]]></description>
			<content:encoded><![CDATA[<h1>The Past</h1>
<p>Last Friday, we shipped the first Major version (v1.0.0) of the Windows Azure Storage API gem for ruby, started a few months ago by my friend <a href="http://blogs.southworks.net/jhalife/">Johnny Halife</a>. As it is an open-source project, I had the opportunity to contribute with:</p>
<ul>
<li>Support for table service to query, get_one, insert, update, merge and delete entities.</li>
<li>Support for running against the Storage Developement Fabriq shipped with Microsoft SDK.</li>
<li>Signature support for Tables service according to <a href="http://msdn.microsoft.com/en-us/library/dd179428.aspx">msdn.microsoft.com/en-us/library/dd179428.aspx</a></li>
<li>Support to enumerate, create, and delete tables on give storage account.</li>
<li>Give feedback to Improve the support for stacked connection management.</li>
</ul>
<p>This release of waz-storage for ruby includes numerous features collected thru 0.5.6 to 1.0.0, for more information you can visit the <a href="http://waz-storage.heroku.com/">http://waz-storage.heroku.com/</a> where you will find all the gem documentation, or if you like to read the source code, contribute or giving us feedback you can get it from on <a href="http://github.com/johnnyhalife/waz-storage/">http://github.com/johnnyhalife/waz-storage</a>.</p>
<h2>The Present</h2>
<p>One of the objectives of having Tables support on the gem was to have an interface to interact with Tables and Entities that we can consume from an adapter as we usually do with our favorite ORM written in ruby which is DataMapper.</p>
<p>This is why this weekend was pretty much to make the dream come true, creating a new project on github called <strong>dm-waztables-adapter</strong> (<a href="http://github.com/jpgarcia/dm-waztables-adapter">http://github.com/jpgarcia/dm-waztables-adapter</a>) and spitting some lines of code.</p>
<h3>Writing the adapter</h3>
<p>As everything in Ruby wonderful world, it was really easy to have a first version running with the features provided by Datamapper.</p>
<p>It took me a few hours to write down <strong>85 lines of code </strong>to cover the whole adapter (Create, Read, Update and Delete methods)</p>
<p>Sorry, I&#8217;m forgetting the aditional 30 minutes I spent on writing <strong>32 more lines</strong> to cover the Migrations stuff. So you won&#8217;t worry about creating the tables when you design your models (As Windows Azure doesn&#8217;t have support for schemas inside tables, migrations exists just to make sure that you have the tables. It won&#8217;t modify attributes of existing data).</p>
<p>Below you will find some code samples. I hope you like it.</p>
<h3>Getting started</h3>
<pre>sudo gem install dm-waztables-adapter --source http://gemcutter.org</pre>
<h3>Usage</h3>
<pre>require 'dm-waztables-adapter'

# set up a DataMapper with your Windwows Azure account
DataMapper.setup(:default, { :adapter =&gt; 'WAZTables',
                                         :account_name =&gt; 'name',
                                         :access_key =&gt; 'your_access_key' })

# define a new model
class Guitarist
    include DataMapper::Resource

    property :id, String, :key =&gt; true
    property :name, String
    property :age, Integer
end

# set up database table on Windows Azure for a specific model
Guitarist.auto_migrate! # (destructive)
Guitarist.auto_upgrade! # (safe)

# set up database table on Windows Azure for all defined models
Datamapper.auto_migrate! # (destructive)
Datamapper.auto_upgrade! # (safe)

# play with DataMapper as usual
Guitarist.create(:id =&gt; '1', :name =&gt; 'Ritchie Blackmore', :age =&gt; 65)

yngwie = Guitarist.new(:id =&gt; '2', :name =&gt; 'Yngwio Malmsteen', :age =&gt; 46)
yngwie.name = "Yngwie Malmsteen"
yngwie.save

# retrieving a unique record by its id
ritchie = Guitarist.get('1')
ritchie.age # =&gt; 65

# updating records
ritchie.age = 66
ritchie.save

# retrieving all guitarists
    Guitarist.all.length # =&gt; 2

# performing queries
    older_guitar_players = Guitarist.all( { :age.gte =&gt; 50 } )

# deleting records
older_guitar_players.destroy!</pre>
<h3>TODO</h3>
<ul>
<li>Allow users to define the model partition key by using :partition_key =&gt; true option on the property.</li>
<li>Allow users to set the partition key as an additional attribute of the model with a lambda as default value.</li>
<li>Allow users to set the partition key as a method on the model.</li>
<li>Implement “in” operator in queries</li>
<li>Implement “order” query option</li>
<li>Retrieve more than 1000 fields using Windows Azure :continuation_token</li>
</ul>
<h3>Known Issues</h3>
<ul>
<li>Like statements are not working since Microsoft service API is throwing a NotImplemented exception when<br />
using <em>startswith</em> and <em>endswith</em> filters (<a href="http://msdn.microsoft.com/en-us/library/dd541448.aspx">more information here</a>)</li>
<li>There&#8217;s no way to tell thru the entity which is the partition key of our entity, so there&#8217;s no out-of-the-box load balancing support (for mor info on the tables model that a look at http://msdn.microsoft.com/en-us/library/dd179338.aspx)</li>
</ul>
<img src="http://feeds.feedburner.com/~r/jpgarcia/~4/HllOoGlTwOU" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blogs.southworks.net/jpgarcia/2010/02/08/windows-azure-tables-adapter-for-datamapper/feed/</wfw:commentRss>
		<feedburner:origLink>http://blogs.southworks.net/jpgarcia/2010/02/08/windows-azure-tables-adapter-for-datamapper/</feedburner:origLink></item>
		<item>
		<title>Reaching Azure Development Fabriq from a remote machine</title>
		<link>http://feeds.southworks.net/~r/jpgarcia/~3/mq26aJd59mA/</link>
		<comments>http://blogs.southworks.net/jpgarcia/2010/01/03/azure-development-fabriq-from-a-remote-machine/#comments</comments>
		<pubDate>Sun, 03 Jan 2010 18:55:15 +0000</pubDate>
		<dc:creator>jpgarcia</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://blogs.southworks.net/jpgarcia/?p=59</guid>
		<description><![CDATA[Are you following me on Twitter? If the answer is yes, you may know that I forked the waz-storage project to write the Tables and Entities operations exposed by the Windows Azure Table API.
One of the things I wanted to get while writing code in my ruby environment, was to perform functional tests against a [...]]]></description>
			<content:encoded><![CDATA[<p>Are you following me on <a href="http://twitter.com/jpgd">Twitter</a>? If the answer is yes, you may know that I forked the <a href="http://github.com/jpgarcia/waz-storage">waz-storage</a> project to write the Tables and Entities operations exposed by the <a href="http://msdn.microsoft.com/en-us/library/dd179423.aspx">Windows Azure Table API</a>.</p>
<p>One of the things I wanted to get while writing code in my ruby environment, was to perform functional tests against a local environment. So, today I’m going to talk about the <a title="Azure Development Fabriq" href="http://msdn.microsoft.com/en-us/library/dd179455.aspx">Azure Development Fabriq</a> and how you can access to this service from outside your local host.</p>
<h2>The problem</h2>
<p>The Development Fabriq is configured by default to listen in the following sockets: </p>
<ul>
<li><strong>Blob Service</strong>: <a href="http://127.0.0.1:10000">http://127.0.0.1:10000</a> </li>
<li><strong>Queue Service</strong>: <a href="http://127.0.0.1:10001">http://127.0.0.1:10001</a> </li>
<li><strong>Table Service</strong>: <a href="http://127.0.0.1:10002">http://127.0.0.1:10002</a> </li>
</ul>
<p>That said, we can imagine that <a title="blob endpoint" href="http://{Your_LAN_IPAddress}:10000/devstoreaccount1/container/myblob">http://{Your_LAN_IPAddress}:10000/devstoreaccount1/container/myblob</a> will allow us to get that blob, but it will never happen. At this point, you can consume the services just from your localhost.</p>
<h2>The solution</h2>
<p>You can change the default 127.0.0.1 IP address by the one assigned to your interface, in the configuration file <em>C:\Program Files\Windows Azure SDK\v1.0\bin\devstore\DSService.exe.config</em>:</p>
<p>&lt;services&gt;    <br />&#160; &lt;service name=&quot;Blob&quot; url=&quot;<a href="http://192.168.1.100:10000/&quot;/">http://192.168.1.100:10000/&quot;/</a>&gt;     <br />&#160; &lt;service name=&quot;Queue&quot; url=&quot;<a href="http://192.168.1.100:10001/&quot;/">http://192.168.1.100:10001/&quot;/</a>&gt;     <br />&#160; &lt;service name=&quot;Table&quot; url=&quot;<a href="http://192.168.1.100:10002/&quot;/">http://192.168.1.100:10002/&quot;/</a>&gt;     <br />&lt;/services&gt;</p>
<p>Shutdown / Start the Development Fabriq to apply those changes and that’s it. Tests passing from Textmate against a vm runing the Storage Service locally.</p>
<p><a href="http://blogs.southworks.net/jpgarcia/files/2010/01/image121.png"><img border="0" alt="image" src="http://blogs.southworks.net/jpgarcia/files/2010/01/image12-thumb1.png" width="640" height="267" /></a> </p>
<p><a href="http://blogs.southworks.net/jpgarcia/files/2010/01/image1.png"><img border="0" alt="image" src="http://blogs.southworks.net/jpgarcia/files/2010/01/image-thumb1.png" width="594" height="197" /></a> </p>
<p>hope you like it!</p>
<img src="http://feeds.feedburner.com/~r/jpgarcia/~4/mq26aJd59mA" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blogs.southworks.net/jpgarcia/2010/01/03/azure-development-fabriq-from-a-remote-machine/feed/</wfw:commentRss>
		<feedburner:origLink>http://blogs.southworks.net/jpgarcia/2010/01/03/azure-development-fabriq-from-a-remote-machine/</feedburner:origLink></item>
		<item>
		<title>Dropzone extension leveraging Ruby waz-storage gem</title>
		<link>http://feeds.southworks.net/~r/jpgarcia/~3/opDyVEryDgk/</link>
		<comments>http://blogs.southworks.net/jpgarcia/2009/10/19/dropzone-extension-leveraging-ruby-waz-storage-gem/#comments</comments>
		<pubDate>Mon, 19 Oct 2009 22:19:12 +0000</pubDate>
		<dc:creator>jpgarcia</dc:creator>
		
		<category><![CDATA[Dropzone]]></category>

		<category><![CDATA[Uncategorized]]></category>

		<category><![CDATA[Windows Azure]]></category>

		<category><![CDATA[ruby]]></category>

		<guid isPermaLink="false">http://blogs.southworks.net/jpgarcia/?p=55</guid>
		<description><![CDATA[It&#8217;s been a long time since my last post, so today I want to share with you my experience on using the waz-storage gem, created by my friend Johhny Halife. If you are not aware about his amazing job you should check this post to get more context about what I&#8217;m going to show you.
What [...]]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s been a long time since my last post, so today I want to share with you my experience on using the <a title="waz-storage" href="http://github.com/johnnyhalife/waz-storage">waz-storage gem</a>, created by my friend <a title="Johnny Halife" href="http://blogs.southworks.net/jhalife/">Johhny Halife</a>. If you are not aware about his amazing job you should check <a href="http://blogs.southworks.net/jhalife/2009/10/16/announcing-ruby-windows-azure-storage-sdk-v05/">this post</a> to get more context about what I&#8217;m going to show you.</p>
<h2>What can I do?</h2>
<p>After reviewing Johnny&#8217;s code I was very excited on creating something and to start playing with that toy, but obviously the question was WHAT?</p>
<p>The answer came to my mind while reading a blog about an application for Mac OSX desktop called <a href="http://aptonic.com/">Dropzone</a>. This is a excerpt taken from <a href="http://aptonic.com/">Dropzone</a>&#8217;s website.</p>
<p><em>&#8220;Drag a file onto the dock icon and your fully customizable grid of destinations flies smoothly out using core animation. Drop the file onto a destination and Dropzone will take care of the rest. Whether you&#8217;re installing an app, uploading a file to an FTP server or sharing your photos on Flickr.&#8221;</em></p>
<p>There is a section regarding how to extend the Dropzone&#8217;s features, and how to contribute creating plugins. Dropzone can easily be extended using simple ruby scripts.</p>
<p>So, I thought about writing a script that allow users to easily drag an drop files from your computer and store them as Blobs on the Windows Azure Storage Services.</p>
<h2>Coding for fun!</h2>
<p>I started reading the <a href="http://aptonic.com/dropzone/documentation/">Dropzone Scripting API</a> documentation and I was surprised how easy it was. There are only two methods to implement which are <strong>dragged</strong>,<strong> clicked</strong> and that&#8217;s it.</p>
<p>Beyond the simplicity that gives the Dropzone&#8217;s API, I had the joy of coding in Ruby and the <a href="http://github.com/johnnyhalife/waz-storage">waz-storage gem</a> <span>easiness</span><a href="http://blogs.southworks.net/jhalife/"></a>.</p>
<p>You can find the source code on the following url <a href="http://github.com/jpgarcia/dropzone-user-scripts/blob/master/WAZBlobs.dropzone">http://github.com/jpgarcia/dropzone-user-scripts/blob/master/WAZBlobs.dropzone</a></p>
<h2>How can you try it?</h2>
<p>Installation and configuration:</p>
<ol>
<li>Download the Dropzone program <a href="http://aptonic.com/index.php">from here</a></li>
<li>Install the <strong>waz-storage gem</strong> if the gem isn&#8217;t installed yet<br />
<span style="color: #333333"><em>sudo gem install waz-storage &#8211;version &gt;= 0.5.4 &#8211;source http://gemcutter.org</em></span></li>
<li>Download the dropzone extension that I created from the <a href="http://github.com/jpgarcia/dropzone-user-scripts">github repositories</a>. The file is called <span style="color: #333333"><em><strong>WAZBlobs.dropzone</strong></em></span></li>
<li><span style="color: #333333"><span style="color: #000000">Open the <span style="color: #333333"><em><strong>WAZBlobs.dropzone</strong></em></span> file and provide your Windows Azure Services credentials as depicted below:<br />
</span></span><a href="http://blogs.southworks.net/jpgarcia/files/2009/10/picture-3.png"><img class="alignnone size-medium wp-image-56" src="http://blogs.southworks.net/jpgarcia/files/2009/10/picture-3.png" alt="" width="300" height="282" /></a></li>
</ol>
<p>The script and the functionality is very simple:</p>
<ol>
<li>Drag and drop your files to the Azure&#8217;s icon on the Dropzone panel<br />
<a href="http://blogs.southworks.net/jpgarcia/files/2009/10/wasdrag.png"><img class="alignnone size-medium wp-image-57" src="http://blogs.southworks.net/jpgarcia/files/2009/10/wasdrag.png" alt="" width="300" height="265" /></a></li>
<li>The files will be uploaded to a <strong>public</strong> container called <strong>dropzone</strong>.</li>
<li>The following picture shows how the <strong>Picture 3</strong>, that I dragged &amp; dropped above, is already on Windows Azure Blobs servers. So I will play a little bit with the console to show you that the Blob is already there <img src='http://blogs.southworks.net/jpgarcia/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /><br />
<a href="http://blogs.southworks.net/jpgarcia/files/2009/10/console.png"><img class="alignnone size-full wp-image-58" src="http://blogs.southworks.net/jpgarcia/files/2009/10/console.png" alt="" width="499" height="255" /></a></li>
</ol>
<p>On my next post I will show you a new application I&#8217;m developing on <a href="http://heroku.com">Heroku</a> that uses the same gem to manage the Blobs via Web. Stay tuned!</p>
<img src="http://feeds.feedburner.com/~r/jpgarcia/~4/opDyVEryDgk" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blogs.southworks.net/jpgarcia/2009/10/19/dropzone-extension-leveraging-ruby-waz-storage-gem/feed/</wfw:commentRss>
		<feedburner:origLink>http://blogs.southworks.net/jpgarcia/2009/10/19/dropzone-extension-leveraging-ruby-waz-storage-gem/</feedburner:origLink></item>
		<item>
		<title>Webcast for Latin American Community about HPC with WCF</title>
		<link>http://feeds.southworks.net/~r/jpgarcia/~3/5TCKnPh4kGg/</link>
		<comments>http://blogs.southworks.net/jpgarcia/2009/01/09/webcast-for-latinoamerica-about-hpc-with-wcf/#comments</comments>
		<pubDate>Fri, 09 Jan 2009 09:41:47 +0000</pubDate>
		<dc:creator>jpgarcia</dc:creator>
		
		<category><![CDATA[WCF]]></category>

		<category><![CDATA[Windows HPC Server 2008]]></category>

		<guid isPermaLink="false">http://blogs.southworks.net/jpgarcia/?p=52</guid>
		<description><![CDATA[Spanish Version
On December 11, 2008 we gave a Webcast for Latin American Community with my friend and mentor Johnny Halife about how to develop distributed applications by using Windows HPC Server 2008.
The objective of the talk was about to explain the platform that Windows HPC Server 2008 provide us to build distributed applications with a [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: right"><a href="http://www.jpgarcia.com.ar/index.php/2009/01/04/webcast-para-latinoamerica-sobre-hpc-con-wcf/">Spanish Version</a></p>
<p>On December 11, 2008 we gave a Webcast for Latin American Community with my friend and mentor <a href="http://blogs.southworks.net/jhalife/">Johnny Halife</a> about how to develop distributed applications by using <a href="http://www.microsoft.com/hpc/en/us/default.aspx">Windows HPC Server 2008</a>.</p>
<p>The objective of the talk was about to explain the platform that <a href="http://www.microsoft.com/hpc/en/us/default.aspx">Windows HPC Server 200</a>8 provide us to build distributed applications with a SOA architecture by using Windows Communication Foundation (WCF).</p>
<p>In addition we had the opportunity to make a small demo creating a simple application on our lab deployed at <a href="http://www.southworks.net">Southworks</a>.</p>
<p>For the ones that couldn&#8217;t attend this presentation, you can download or watch it in the following url: <a href="http://msevents.microsoft.com/CUI/EventDetail.aspx?EventID=1032390257&amp;Culture=es-AR">http://msevents.microsoft.com/CUI/EventDetail.aspx?EventID=1032390257&amp;Culture=es-AR</a>.</p>
<p><a href="http://blogs.southworks.net/jpgarcia/files/2009/01/webcasthpc.png"><img class="alignnone size-full wp-image-53" src="http://blogs.southworks.net/jpgarcia/files/2009/01/webcasthpc.png" alt="" width="400" height="372" /></a></p>
<p>Enjoy it!</p>
<img src="http://feeds.feedburner.com/~r/jpgarcia/~4/5TCKnPh4kGg" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blogs.southworks.net/jpgarcia/2009/01/09/webcast-for-latinoamerica-about-hpc-with-wcf/feed/</wfw:commentRss>
		<feedburner:origLink>http://blogs.southworks.net/jpgarcia/2009/01/09/webcast-for-latinoamerica-about-hpc-with-wcf/</feedburner:origLink></item>
		<item>
		<title>Visual Studio 2008 templates compliant with Microsoft StyleCop</title>
		<link>http://feeds.southworks.net/~r/jpgarcia/~3/DLuRfOOvEYw/</link>
		<comments>http://blogs.southworks.net/jpgarcia/2008/09/01/visual-studio-2008-templates-compliant-with-microsoft-stylecop/#comments</comments>
		<pubDate>Mon, 01 Sep 2008 13:45:12 +0000</pubDate>
		<dc:creator>jpgarcia</dc:creator>
		
		<category><![CDATA[ASP.Net MVC]]></category>

		<category><![CDATA[Code Quality]]></category>

		<category><![CDATA[StyleCop]]></category>

		<category><![CDATA[Visual Studio]]></category>

		<guid isPermaLink="false">http://blogs.southworks.net/jpgarcia/?p=38</guid>
		<description><![CDATA[Motivation
Since Microsoft launched StyleCop, we are running this tool in all Southworks&#8217; projects. From our Engineering Excellence department we&#8217;re promoting the use of this tool because it give us source code consistency and homogeneity we want for developers and customers who read the code.
If you&#8217;re using this tool, you surely be realized that some Visual [...]]]></description>
			<content:encoded><![CDATA[<h2>Motivation</h2>
<p>Since Microsoft launched <a title="StyleCop" href="http://code.msdn.microsoft.com/sourceanalysis" target="_blank">StyleCop</a>, we are running this tool in all <strong>Southworks&#8217;</strong> projects. From our <strong>Engineering Excellence</strong> department we&#8217;re promoting the use of this tool because it give us source code consistency and homogeneity we want for developers and customers who read the code.</p>
<p>If you&#8217;re using this tool, you surely be realized that some <strong>Visual Studio</strong> templates are not compliant with some of the <a title="StyleCop" href="http://code.msdn.microsoft.com/sourceanalysis" target="_blank">StyleCop</a> rules, like using directives inside the namespaces, regions, one class for each file, among others. This is quite annoying when you&#8217;re coding because each class, interface or test you add to your project has to be stylized to meet that rules. </p>
<p>Project templates like <b>ASP.Net Web MVC Application (Preview 5)</b> have an amount of <b>~120</b> warning even avoiding the documentation rules. </p>
<p>The purpose of this post is to give you a workaround to avoid this unnecessary work.</p>
<p><b></b></p>
<h2>Context</h2>
<p>The way that <strong>Visual Studio</strong> provides these templates is by using a series of compressed zip files, with the base source code inside.</p>
<p>There are two folders inside the <em>&#8220;</em><b><em>%ProgramFiles%\Microsoft Visual Studio 9.0\Common7\IDE\&#8221;</em> </b>with these templates, one for the items (classes, interfaces, tests, etc.) and one for projects (Class Library, Console Application, MVC Web Application, etc.).</p>
<p><b></b></p>
<h2>Workaround</h2>
<p>The workaround is pretty much straightforward, all you have to do is:</p>
<ol>
<li>Extract the default Visual Studio template files </li>
<li>Modify them to be compliant </li>
<li>Compress it again </li>
<li>and overwrite the original files </li>
</ol>
<p>What I did this weekend, is make the work for you for the most used files and projects for me including the <a title="Microsoft ASP.Net MVC preview 5" href="http://www.codeplex.com/aspnet/Release/ProjectReleases.aspx?ReleaseId=16775" target="_blank">Microsoft ASP.Net MVC preview 5</a> project template :). So below you&#8217;ll find a table with the zip files to download and the folder location where you will overwrite them.</p>
<p>Once you have copied the files, ensure you&#8217;ve all you Visual Studio instances closed and run as administrator from the console the following command to refresh Visual Studio&#8217;s template cache:</p>
<p><b><i>&#8220;%ProgramFiles%\Microsoft Visual Studio 9.0\Common7\IDE\devenv.com&quot; /setup&quot;</i></b></p>
<h2>Template Files</h2>
<p><strong>(*) rootPath = &quot;</strong>%ProgramFiles%\Microsoft Visual Studio 9.0\Common7\IDE\&quot;</p>
<table cellspacing="0" cellpadding="2" width="575" border="0">
<tbody>
<tr>
<td style="font-weight: bold;color: #fff" width="231">template path </td>
<td style="font-weight: bold;color: #fff" width="342">template file </td>
</tr>
<tr>
<td style="vertical-align: middle" width="231">
<p><strong>(*)</strong>\ItemTemplates\CSharp\Web\MVC\1033</p>
</td>
<td style="vertical-align: middle" valign="top" width="342">
<ul>
<li><a href="http://blogs.southworks.net/jpgarcia/files/2008/09/mvcviewpageitemtemplatep5cs.zip" target="_blank">MvcViewPageItemTemplateP5.cs.zip</a> </li>
<li><a href="http://blogs.southworks.net/jpgarcia/files/2008/09/mvcviewusercontrolitemtemplatep5cs.zip" target="_blank">MvcViewUserControlItemTemplateP5.cs.zip</a> </li>
<li><a href="http://blogs.southworks.net/jpgarcia/files/2008/09/mvccontrolleritemtemplatep5cs.zip" target="_blank">MvcControllerItemTemplateP5.cs.zip</a> </li>
<li><a href="http://blogs.southworks.net/jpgarcia/files/2008/09/mvcviewcontentpageitemtemplatep5cs.zip" target="_blank">MvcViewContentPageItemTemplateP5.cs.zip</a> </li>
<li><a href="http://blogs.southworks.net/jpgarcia/files/2008/09/mvcviewmasterpageitemtemplatep5cs.zip" target="_blank">MvcViewMasterPageItemTemplateP5.cs.zip</a> </li>
</ul>
</td>
</tr>
<tr>
<td style="vertical-align: middle" width="231">
<p><strong>(*)</strong>\ItemTemplates\CSharp\1033</p>
</td>
<td style="vertical-align: middle" valign="top" width="342">
<ul>
<li><a href="http://blogs.southworks.net/jpgarcia/files/2008/09/simpleunittest.zip" target="_blank">SimpleUnitTest.zip</a> </li>
</ul>
</td>
</tr>
<tr>
<td style="vertical-align: middle" width="231">
<p><strong>(*)</strong>\ItemTemplates\CSharp\Code\1033</p>
</td>
<td style="vertical-align: middle" valign="top" width="342">
<ul>
<li><a href="http://blogs.southworks.net/jpgarcia/files/2008/09/netcfv2-class.zip" target="_blank">NETCFv2-Class.zip</a> </li>
<li><a href="http://blogs.southworks.net/jpgarcia/files/2008/09/interface.zip" target="_blank">Interface.zip</a> </li>
<li><a href="http://blogs.southworks.net/jpgarcia/files/2008/09/class.zip" target="_blank">Class.zip</a> </li>
<li><a href="http://blogs.southworks.net/jpgarcia/files/2008/09/codefile.zip" target="_blank">CodeFile.zip</a> </li>
</ul>
</td>
</tr>
<tr>
<td style="vertical-align: middle" width="231">
<p><strong>(*)</strong>\ProjectTemplates\CSharp\Web\1033</p>
</td>
<td style="vertical-align: middle" valign="top" width="342">
<ul>
<li><a href="http://blogs.southworks.net/jpgarcia/files/2008/09/mvcwebapplicationprojecttemplatep5cs.zip" target="_blank">MvcWebApplicationProjectTemplateP5.cs.zip</a> </li>
</ul>
</td>
</tr>
<tr>
<td style="vertical-align: middle" width="231">
<p><strong>(*)</strong>\ProjectTemplates\CSharp\Test\1033</p>
</td>
<td style="vertical-align: middle" valign="top" width="342">
<ul>
<li><a href="http://blogs.southworks.net/jpgarcia/files/2008/09/mvcwebapplicationtestprojecttemplatep5cs.zip" target="_blank">MvcWebApplicationTestProjectTemplateP5.cs.zip</a> </li>
</ul>
</td>
</tr>
</tbody>
</table>
<p>You can also download all templates in a single .zip file: <a href="http://blogs.southworks.net/jpgarcia/files/2008/09/alltemplates.zip" target="_blank">AllTemplates.zip</a></p>
<img src="http://feeds.feedburner.com/~r/jpgarcia/~4/DLuRfOOvEYw" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blogs.southworks.net/jpgarcia/2008/09/01/visual-studio-2008-templates-compliant-with-microsoft-stylecop/feed/</wfw:commentRss>
		<feedburner:origLink>http://blogs.southworks.net/jpgarcia/2008/09/01/visual-studio-2008-templates-compliant-with-microsoft-stylecop/</feedburner:origLink></item>
		<item>
		<title>One year and four months later…</title>
		<link>http://feeds.southworks.net/~r/jpgarcia/~3/oTx1iWBSaF4/</link>
		<comments>http://blogs.southworks.net/jpgarcia/2008/08/31/one-year-and-four-months-later/#comments</comments>
		<pubDate>Sun, 31 Aug 2008 08:59:03 +0000</pubDate>
		<dc:creator>jpgarcia</dc:creator>
		
		<category><![CDATA[Personal]]></category>

		<guid isPermaLink="false">http://blogs.southworks.net/jpgarcia/2008/08/31/one-year-and-four-months-later/</guid>
		<description><![CDATA[Spanish Version
Yesterday night while drinking a couple of beers with some of my Southworks&#8217; colleagues, I returned back to my home and being lying on my bed, I started to think on this last year and four months from when I began working in Southworks.
While I was dating back over time, I remembered in which [...]]]></description>
			<content:encoded><![CDATA[<p align="right"><a title="Spanish Version" href="http://www.jpgarcia.com.ar/index.php/2008/08/30/un-ao-y-cuatro-meses-despus/" target="_blank">Spanish Version</a></p>
<p>Yesterday night while drinking a couple of beers with some of my Southworks&#8217; colleagues, I returned back to my home and being lying on my bed, I started to think on this last year and four months from when I began working in <strong>Southworks</strong>.</p>
<p>While I was dating back over time, I remembered in which projects and customers we were worked for, some of them are &#8220;<a href="http://msdn.microsoft.com/en-us/architecture/default.aspx">Microsoft Architecture Strategy Team</a>&#8221;, &#8220;<a href="http://www.federaldeveloper.com/default.aspx">Microsoft Depeloper &amp; Platform Evangelism Team</a>&#8221;, &#8220;<a href="http://www.microsoft.com/serviceproviders/solutions/connectedservicesframework.mspx">Microsoft Connected Services Framework Team</a>&#8221;, &#8220;<a href="http://msdn.microsoft.com/en-us/sqlserver/default.aspx">Microsoft SQL Server Team</a>&#8221;, &#8220;<a href="http://www.sancorseguros.com/">Grupo Sancor Seguros</a>&#8221; among others, and the important people who I known in person like <a href="http://blogs.msdn.com/eugeniop/">Eugenio Pace</a> y <a href="http://blogs.msdn.com/gianpaolo/">Gianpaolo Carraro</a>.</p>
<p>Words and technical acronyms came to my mind regarding things I have being acquired and incorporated during this time. So, in this moment I started to imagine something like a mental <b>&#8220;Tag Cloud&#8221;</b> and it was there when I decided to write this post with the objective of leaving this as a log experience and to compare it in the future with the new words that surely will be added.</p>
<p>Beside all tags am I listing in this post, I wanted to thank all <strong>Southies</strong> who were helping me to fill my mind with all this knowledge and specially to my two mentors, which are <b><a href="http://blogs.southworks.net/jhalife">Johnny Halife</a></b> y <b><a href="http://blogs.southworks.net/mwoloski/">Matias Woloski</a> </b>who today I still admiring and respecting, but the ones who I having fun where the computer aren&#8217;t close to us.</p>
<p>Here is my <strong>&quot;Mind Tag Cloud&quot;</strong>:</p>
<p><span style="font-size: 14px">&#160; Refactoring&#160; </span><span style="font-weight: bold;font-size: 18px">&#160; Code Analysis&#160; </span><span style="font-weight: bold;font-size: 16px">&#160; Retrospective&#160; </span><span style="font-weight: bold;font-size: 16px">&#160; TDD&#160; </span><span style="font-size: 17px">&#160; WCF&#160; </span><span style="font-weight: bold;font-size: 19px">&#160; WSDL&#160; </span><span style="font-size: 14px">&#160; Continuous Integration&#160; </span><span style="font-size: 17px">&#160; Patterns&#160; </span><span style="font-size: 14px">&#160; Cluster Server&#160; </span><span style="font-size: 14px">&#160; ISO&#160; </span><span style="font-size: 13px">&#160; Virtualization&#160; </span><span style="font-size: 12px">&#160; SOA&#160; </span><span style="font-size: 14px">&#160; Singleton&#160; </span><span style="font-weight: bold;font-size: 18px">&#160; Cyclomatic Complexity&#160; </span><span style="font-weight: bold;font-size: 16px">&#160; WPF&#160; </span><span style="font-weight: bold;font-size: 16px">&#160; Model View Controller&#160; </span><span style="font-weight: bold;font-size: 18px">&#160; REST&#160; </span><span style="font-weight: bold;font-size: 16px">&#160; Linq to XML&#160; </span><span style="font-size: 13px">&#160; Mocks&#160; </span><span style="font-size: 12px">&#160; Paravirtualization&#160; </span><span style="font-weight: bold;font-size: 18px">&#160; Sprint&#160; </span><span style="font-size: 12px">&#160; Hyper-V&#160; </span><span style="font-weight: bold;font-size: 16px">&#160; Lamda Expressions&#160; </span><span style="font-weight: bold;font-size: 18px">&#160; Repository&#160; </span><span style="font-size: 17px">&#160; SAN&#160; </span><span style="font-weight: bold;font-size: 18px">&#160; Synchronization Framework&#160; </span><span style="font-size: 14px">&#160; iSCSI&#160; </span><span style="font-size: 13px">&#160; LUN&#160; </span><span style="font-weight: bold;font-size: 18px">&#160; Powershell&#160; </span><span style="font-weight: bold;font-size: 16px">&#160; SCRUM&#160; </span><span style="font-size: 17px">&#160; Ssds&#160; </span><span style="font-weight: bold;font-size: 18px">&#160; Agile&#160; </span><span style="font-size: 12px">&#160; Spike&#160; </span><span style="font-weight: bold;font-size: 16px">&#160; NAS&#160; </span><span style="font-weight: bold;font-size: 18px">&#160; Iteration Planning&#160; </span><span style="font-size: 14px">&#160; Dependency Injection&#160; </span><span style="font-size: 16px">&#160; Factory&#160; </span><span style="font-weight: bold;font-size: 18px">&#160; Linq to SQL&#160; </span><span style="font-weight: bold;font-size: 16px">&#160; Code Coverage&#160; </span><span style="font-size: 12px">&#160; Subversion&#160; </span><span style="font-size: 17px">&#160; Security Token Service&#160; </span><span style="font-size: 14px">&#160; CMMi&#160; </span><span style="font-size: 19px">&#160; StyleCop&#160; </span><span style="font-weight: bold;font-size: 16px">&#160; Model View Presenter&#160; </span><span style="font-size: 12px">&#160; Strategy&#160; </span><span style="font-size: 19px">FxCop&#160; </span><span style="font-size: 14px">&#160; Serialization&#160; </span><span style="font-size: 12px">&#160; Apache&#160; </span><span style="font-size: 17px">&#160; Prototype&#160; </span><span style="font-size: 13px">&#160; Datamember&#160; </span><span style="font-size: 14px">&#160; Composite Application Block&#160; </span><span style="font-size: 12px">&#160; Build Server&#160; </span><span style="font-size: 17px">&#160; RSS&#160; </span><span style="font-weight: bold;font-size: 16px">&#160; DIT&#160; </span><span style="font-size: 14px">&#160; S+S&#160; </span><span style="font-size: 13px">&#160; Backlog&#160; </span><span style="font-weight: bold;font-size: 16px">&#160; Commitment&#160; </span><span style="font-weight: bold;font-size: 18px">&#160; Inversion Of Control&#160; </span><span style="font-size: 14px">&#160; Scaffolding&#160; </span><span style="font-weight: bold;font-size: 16px">&#160; Abstract Factory&#160; </span><span style="font-size: 12px">&#160; Reflection&#160; </span><span style="font-size: 13px">&#160; LCOM&#160; </span><span style="font-size: 17px">&#160; Iteration Review&#160; </span><span style="font-weight: bold;font-size: 16px">&#160; Software As A Service&#160; </span><span style="font-size: 17px">&#160; DataContract&#160; </span><span style="font-weight: bold;font-size: 16px">&#160; TFS&#160; </span><span style="font-weight: bold;font-size: 19px">&#160; Code Query Language&#160; </span><span style="font-weight: bold;font-size: 16px">&#160; SOAP&#160; </span><span style="font-size: 17px">&#160; Dynamic Language Runtime&#160; </span><span style="font-size: 12px">&#160; Lightweight Directory Services&#160; </span></p>
<img src="http://feeds.feedburner.com/~r/jpgarcia/~4/oTx1iWBSaF4" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blogs.southworks.net/jpgarcia/2008/08/31/one-year-and-four-months-later/feed/</wfw:commentRss>
		<feedburner:origLink>http://blogs.southworks.net/jpgarcia/2008/08/31/one-year-and-four-months-later/</feedburner:origLink></item>
		<item>
		<title>Avoiding duplicated items in Fxcop analysis using MSBuild</title>
		<link>http://feeds.southworks.net/~r/jpgarcia/~3/Rf21XS6GJj4/</link>
		<comments>http://blogs.southworks.net/jpgarcia/2008/07/13/avoiding-duplicated-items-in-fxcop-analysis-using-msbuild/#comments</comments>
		<pubDate>Sun, 13 Jul 2008 06:18:01 +0000</pubDate>
		<dc:creator>jpgarcia</dc:creator>
		
		<category><![CDATA[Code Quality]]></category>

		<category><![CDATA[Continuous Integration]]></category>

		<category><![CDATA[MSBuild]]></category>

		<category><![CDATA[Southworks SDC Tasks]]></category>

		<guid isPermaLink="false">http://blogs.southworks.net/jpgarcia/2008/07/13/avoiding-duplicated-items-in-fxcop-analysis-using-msbuild/</guid>
		<description><![CDATA[In my previous post, I started with a posts series that describe the tasks we&#8217;ve included in the Southworks SDC Tasks we recently published at Google Code.
Today, I&#8217;m going to focus in a useful and interesting task which is RemoveDuplicatedFileNames and the reason of why we had the need to create it.
So let&#8217;s start.
The Problem
Imagine [...]]]></description>
			<content:encoded><![CDATA[<p>In my <a href="http://blogs.southworks.net/jpgarcia/2008/07/11/updating-your-assembly-info-files-with-southworks-sdc-tasks/" target="_blank">previous post</a>, I started with a posts series that describe the tasks we&#8217;ve included in the <a href="http://code.google.com/p/sdctasks/" target="_blank">Southworks SDC Tasks</a> we recently published at <strong>Google Code</strong>.</p>
<p>Today, I&#8217;m going to focus in a useful and interesting task which is <strong>RemoveDuplicatedFileNames </strong>and the reason of why we had the need to create it.</p>
<p>So let&#8217;s start.</p>
<h2>The Problem</h2>
<p>Imagine you have a solution where your assemblies are referenced as depicted in the picture below:</p>
<p><a href="http://blogs.southworks.net/jpgarcia/files/2008/07/image2.png"><img height="261" alt="image" src="http://blogs.southworks.net/jpgarcia/files/2008/07/image-thumb2.png" width="281" /></a> </p>
<p>When you compile this solution you&#8217;ll realize that the <strong>Contracts.dll</strong> assembly will be generated into the <strong>Services</strong> and in <strong>WebUx </strong>folders, that&#8217;s right?</p>
<p>So far, there is no problem regarding compilation, but what happens if we define an ItemGroup in our MSBuild project that includes all our solution assemblies to be examined by FxCop by using WildCards like this?</p>
<div>
<div style="padding-right: 0px;padding-left: 0px;font-size: 8pt;padding-bottom: 0px;width: 100%;color: black;padding-top: 0px;font-family: consolas, &#39;Courier New&#39;, courier, monospace">
<pre style="padding-right: 0px;padding-left: 0px;font-size: 8pt;padding-bottom: 0px;margin: 0em;width: 100%;color: black;padding-top: 0px;font-family: consolas, &#39;Courier New&#39;, courier, monospace"><span style="color: #0000ff">&lt;</span><span style="color: #800000">ItemGroup</span><span style="color: #0000ff">&gt;</span></pre>
<pre style="padding-right: 0px;padding-left: 0px;font-size: 8pt;padding-bottom: 0px;margin: 0em;width: 100%;color: black;padding-top: 0px;font-family: consolas, &#39;Courier New&#39;, courier, monospace">  <span style="color: #0000ff">&lt;</span><span style="color: #800000">Assemblies</span> <span style="color: #ff0000">Include</span><span style="color: #0000ff">=&quot;$(SampleDirectory)\**\*.dll&quot;</span> <span style="color: #0000ff">/&gt;</span></pre>
<pre style="padding-right: 0px;padding-left: 0px;font-size: 8pt;padding-bottom: 0px;margin: 0em;width: 100%;color: black;padding-top: 0px;font-family: consolas, &#39;Courier New&#39;, courier, monospace"><span style="color: #0000ff">&lt;/</span><span style="color: #800000">ItemGroup</span><span style="color: #0000ff">&gt;</span></pre>
</p></div>
</div>
<p>The answer is that FxCop will analyze the same assembly twice, which will generate duplicated warnings and Code Analysis errors.</p>
<h2>Our solution approach</h2>
<p>As I told you previously we created a simple task called <strong>RemoveDuplicatedFileNames </strong>that basically remove items from an ItemGroup on the MSBuild process, to avoid the problem described above.</p>
<p>So let me show you how you should configure your project file to use this task</p>
<ol>
<li>Reference the <a href="http://code.google.com/p/sdctasks/" target="_blank">Southworks SDC Tasks</a> assembly <strong>RemoveDuplicatedFileNames </strong>in your project file
<div>
<div style="padding-right: 0px;padding-left: 0px;font-size: 8pt;padding-bottom: 0px;width: 100%;color: black;padding-top: 0px;font-family: consolas, &#39;Courier New&#39;, courier, monospace">
<pre style="padding-right: 0px;padding-left: 0px;font-size: 8pt;padding-bottom: 0px;margin: 0em;width: 100%;color: black;padding-top: 0px;font-family: consolas, &#39;Courier New&#39;, courier, monospace"><span style="color: #0000ff">&lt;</span><span style="color: #800000">UsingTask</span> <span style="color: #ff0000">AssemblyFile</span><span style="color: #0000ff">=&quot;$(ToolsPath)\Southworks.Sdc.Tasks.dll&quot;</span></pre>
<pre style="padding-right: 0px;padding-left: 0px;font-size: 8pt;padding-bottom: 0px;margin: 0em;width: 100%;color: black;padding-top: 0px;font-family: consolas, &#39;Courier New&#39;, courier, monospace">           <span style="color: #ff0000">TaskName</span><span style="color: #0000ff">=&quot;RemoveDuplicatedFileNames&quot;</span><span style="color: #0000ff">/&gt;</span></pre>
</p></div>
</p></div>
</li>
<li>Create your ItemGroup including your assembly files
<div>
<div style="padding-right: 0px;padding-left: 0px;font-size: 8pt;padding-bottom: 0px;width: 100%;color: black;padding-top: 0px;font-family: consolas, &#39;Courier New&#39;, courier, monospace">
<pre style="padding-right: 0px;padding-left: 0px;font-size: 8pt;padding-bottom: 0px;margin: 0em;width: 100%;color: black;padding-top: 0px;font-family: consolas, &#39;Courier New&#39;, courier, monospace"><span style="color: #0000ff">&lt;</span><span style="color: #800000">ItemGroup</span><span style="color: #0000ff">&gt;</span></pre>
<pre style="padding-right: 0px;padding-left: 0px;font-size: 8pt;padding-bottom: 0px;margin: 0em;width: 100%;color: black;padding-top: 0px;font-family: consolas, &#39;Courier New&#39;, courier, monospace">  <span style="color: #0000ff">&lt;</span><span style="color: #800000">Assemblies</span> <span style="color: #ff0000">Include</span><span style="color: #0000ff">=&quot;$(SampleDirectory)\**\*.dll&quot;</span> <span style="color: #0000ff">/&gt;</span></pre>
<pre style="padding-right: 0px;padding-left: 0px;font-size: 8pt;padding-bottom: 0px;margin: 0em;width: 100%;color: black;padding-top: 0px;font-family: consolas, &#39;Courier New&#39;, courier, monospace"><span style="color: #0000ff">&lt;/</span><span style="color: #800000">ItemGroup</span><span style="color: #0000ff">&gt;</span></pre>
</p></div>
</p></div>
</li>
<li>Inside the target that runs FxCop include the following lines
<div>
<div style="padding-right: 0px;padding-left: 0px;font-size: 8pt;padding-bottom: 0px;width: 100%;color: black;padding-top: 0px;font-family: consolas, &#39;Courier New&#39;, courier, monospace">
<pre style="padding-right: 0px;padding-left: 0px;font-size: 8pt;padding-bottom: 0px;margin: 0em;width: 100%;color: black;padding-top: 0px;font-family: consolas, &#39;Courier New&#39;, courier, monospace"><span style="color: #0000ff">&lt;</span><span style="color: #800000">RemoveDuplicatedFileNames</span> <span style="color: #ff0000">Input</span><span style="color: #0000ff">=&quot;@(Assemblies)&quot;</span><span style="color: #0000ff">&gt;</span></pre>
<pre style="padding-right: 0px;padding-left: 0px;font-size: 8pt;padding-bottom: 0px;margin: 0em;width: 100%;color: black;padding-top: 0px;font-family: consolas, &#39;Courier New&#39;, courier, monospace">  <span style="color: #0000ff">&lt;</span><span style="color: #800000">Output</span> <span style="color: #ff0000">TaskParameter</span><span style="color: #0000ff">=&quot;FilteredItems&quot;</span> </pre>
<pre style="padding-right: 0px;padding-left: 0px;font-size: 8pt;padding-bottom: 0px;margin: 0em;width: 100%;color: black;padding-top: 0px;font-family: consolas, &#39;Courier New&#39;, courier, monospace">          <span style="color: #ff0000">ItemName</span><span style="color: #0000ff">=&quot;<span>CodeAnalysisItems</span>&quot;</span> <span style="color: #0000ff">/&gt;</span></pre>
<pre style="padding-right: 0px;padding-left: 0px;font-size: 8pt;padding-bottom: 0px;margin: 0em;width: 100%;color: black;padding-top: 0px;font-family: consolas, &#39;Courier New&#39;, courier, monospace"><span style="color: #0000ff">&lt;/</span><span style="color: #800000">RemoveDuplicatedFileNames</span><span style="color: #0000ff">&gt;</span></pre>
</p></div>
</p></div>
</li>
<li>Finally, instead of using the <strong>Assemblies </strong>defined in the first point, you should use the new filtered ItemGroup generated in the previous point
<div>
<div style="padding-right: 0px;padding-left: 0px;font-size: 8pt;padding-bottom: 0px;width: 100%;color: black;padding-top: 0px;font-family: consolas, &#39;Courier New&#39;, courier, monospace">
<pre style="padding-right: 0px;padding-left: 0px;font-size: 8pt;padding-bottom: 0px;margin: 0em;width: 100%;color: black;padding-top: 0px;font-family: consolas, &#39;Courier New&#39;, courier, monospace"><span style="color: #0000ff">&lt;</span><span style="color: #800000">FxCop</span> <span style="color: #ff0000">Assemblies</span><span style="color: #0000ff">=&quot;@(<span>CodeAnalysisItems</span>)&quot;</span></pre>
<pre style="padding-right: 0px;padding-left: 0px;font-size: 8pt;padding-bottom: 0px;margin: 0em;width: 100%;color: black;padding-top: 0px;font-family: consolas, &#39;Courier New&#39;, courier, monospace">       <span style="color: #ff0000">OutfileName</span><span style="color: #0000ff">=&quot;$(CCNetArtifactDirectory)\fxcop.xml&quot;</span></pre>
<pre style="padding-right: 0px;padding-left: 0px;font-size: 8pt;padding-bottom: 0px;margin: 0em;width: 100%;color: black;padding-top: 0px;font-family: consolas, &#39;Courier New&#39;, courier, monospace">       <span style="color: #ff0000">ProjectFilePath</span><span style="color: #0000ff">=&quot;$(CCNetArtifactDirectory)\project.fxcop&quot;</span></pre>
<pre style="padding-right: 0px;padding-left: 0px;font-size: 8pt;padding-bottom: 0px;margin: 0em;width: 100%;color: black;padding-top: 0px;font-family: consolas, &#39;Courier New&#39;, courier, monospace">       <span style="color: #ff0000">ToolPath</span><span style="color: #0000ff">=&quot;$(FxCopPath)&quot;</span></pre>
<pre style="padding-right: 0px;padding-left: 0px;font-size: 8pt;padding-bottom: 0px;margin: 0em;width: 100%;color: black;padding-top: 0px;font-family: consolas, &#39;Courier New&#39;, courier, monospace">       <span style="color: #ff0000">ProjectTemplateFilePath</span><span style="color: #0000ff">=&quot;$(ToolsPath)\template.fxcop&quot;</span> <span style="color: #0000ff">/&gt;</span></pre>
</p></div>
</p></div>
</li>
</ol>
<p><strong>Note</strong>: The FxCop task is not part of <a href="http://code.google.com/p/sdctasks/" target="_blank">Southworks SDC Tasks</a>, you can get it from the <a href="http://www.codeplex.com/sdctasks/" target="_blank">Microsoft SDC Tasks</a> at Codeplex. There are many useful tasks for your build process!</p>
<h2>Verification</h2>
<p>in order to verify if your assemblies are no duplicated you should add a <strong>Message</strong> task on the same target to display the contained values on both <strong>ItemGroup</strong>, <strong>Assemblies</strong> and <strong>CodeAnalysisItems</strong>.</p>
<div>
<div style="padding-right: 0px;padding-left: 0px;font-size: 8pt;padding-bottom: 0px;width: 100%;color: black;padding-top: 0px;font-family: consolas, &#39;Courier New&#39;, courier, monospace">
<pre style="padding-right: 0px;padding-left: 0px;font-size: 8pt;padding-bottom: 0px;margin: 0em;width: 100%;color: black;padding-top: 0px;font-family: consolas, &#39;Courier New&#39;, courier, monospace"><span style="color: #0000ff">&lt;</span><span style="color: #800000">Message</span> <span style="color: #ff0000">Text</span><span style="color: #0000ff">=&quot;Unfiltered Assemblies&quot;</span> <span style="color: #0000ff">/&gt;</span></pre>
<pre style="padding-right: 0px;padding-left: 0px;font-size: 8pt;padding-bottom: 0px;margin: 0em;width: 100%;color: black;padding-top: 0px;font-family: consolas, &#39;Courier New&#39;, courier, monospace"><span style="color: #0000ff">&lt;</span><span style="color: #800000">Message</span> <span style="color: #ff0000">Text</span><span style="color: #0000ff">=&quot;=====================&quot;</span> <span style="color: #0000ff">/&gt;</span></pre>
<pre style="padding-right: 0px;padding-left: 0px;font-size: 8pt;padding-bottom: 0px;margin: 0em;width: 100%;color: black;padding-top: 0px;font-family: consolas, &#39;Courier New&#39;, courier, monospace"><span style="color: #0000ff">&lt;</span><span style="color: #800000">Message</span> <span style="color: #ff0000">Text</span><span style="color: #0000ff">=&quot;@(Assemblies)&quot;</span> <span style="color: #0000ff">/&gt;</span></pre>
<pre style="padding-right: 0px;padding-left: 0px;font-size: 8pt;padding-bottom: 0px;margin: 0em;width: 100%;color: black;padding-top: 0px;font-family: consolas, &#39;Courier New&#39;, courier, monospace">&#160;</pre>
<pre style="padding-right: 0px;padding-left: 0px;font-size: 8pt;padding-bottom: 0px;margin: 0em;width: 100%;color: black;padding-top: 0px;font-family: consolas, &#39;Courier New&#39;, courier, monospace"><span style="color: #0000ff">&lt;</span><span style="color: #800000">Message</span> <span style="color: #ff0000">Text</span><span style="color: #0000ff">=&quot;Filtered Assemblies&quot;</span> <span style="color: #0000ff">/&gt;</span></pre>
<pre style="padding-right: 0px;padding-left: 0px;font-size: 8pt;padding-bottom: 0px;margin: 0em;width: 100%;color: black;padding-top: 0px;font-family: consolas, &#39;Courier New&#39;, courier, monospace"><span style="color: #0000ff">&lt;</span><span style="color: #800000">Message</span> <span style="color: #ff0000">Text</span><span style="color: #0000ff">=&quot;===================&quot;</span> <span style="color: #0000ff">/&gt;</span></pre>
<pre style="padding-right: 0px;padding-left: 0px;font-size: 8pt;padding-bottom: 0px;margin: 0em;width: 100%;color: black;padding-top: 0px;font-family: consolas, &#39;Courier New&#39;, courier, monospace"><span style="color: #0000ff">&lt;</span><span style="color: #800000">Message</span> <span style="color: #ff0000">Text</span><span style="color: #0000ff">=&quot;@(CodeAnalysisItems)&quot;</span> <span style="color: #0000ff">/&gt;</span></pre>
</p></div>
</div>
<p><a href="http://technorati.com/claim/rjaizdjqx2" rel="me">Technorati Profile</a></p>
<img src="http://feeds.feedburner.com/~r/jpgarcia/~4/Rf21XS6GJj4" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blogs.southworks.net/jpgarcia/2008/07/13/avoiding-duplicated-items-in-fxcop-analysis-using-msbuild/feed/</wfw:commentRss>
		<feedburner:origLink>http://blogs.southworks.net/jpgarcia/2008/07/13/avoiding-duplicated-items-in-fxcop-analysis-using-msbuild/</feedburner:origLink></item>
		<item>
		<title>Updating your Assembly Info files with Southworks SDC tasks</title>
		<link>http://feeds.southworks.net/~r/jpgarcia/~3/PTz176y9Sqk/</link>
		<comments>http://blogs.southworks.net/jpgarcia/2008/07/11/updating-your-assembly-info-files-with-southworks-sdc-tasks/#comments</comments>
		<pubDate>Fri, 11 Jul 2008 14:28:10 +0000</pubDate>
		<dc:creator>jpgarcia</dc:creator>
		
		<category><![CDATA[Code Quality]]></category>

		<category><![CDATA[Continuous Integration]]></category>

		<category><![CDATA[MSBuild]]></category>

		<guid isPermaLink="false">http://blogs.southworks.net/jpgarcia/2008/07/11/updating-your-assembly-info-files-with-southworks-sdc-tasks/</guid>
		<description><![CDATA[Spanish Version
Johnny and Ezequiel had published in they blogs about the Southworks SDC Tasks we published two weeks ago in Google Code. This project is a set of comprehensive MSBuild tasks that we built along with the maturity of our build process.
I’ll give you a walkthrough for these tasks we developed by giving you a [...]]]></description>
			<content:encoded><![CDATA[<div style="text-align:right"><a href="http://www.jpgarcia.com.ar/index.php/2008/07/14/actualizando-los-archivos-assemblyinfo-usando-las-southworks-sdc-tasks/">Spanish Version</a></div>
<p><a href="http://blogs.southworks.net/jhalife/2008/06/27/turn-on-the-radio-were-live-baby/" target="_blank">Johnny</a> and <a href="http://blogs.southworks.net/emorito/2008/06/30/southworkstasksgooglecode/" target="_blank">Ezequiel</a> had published in they blogs about the <a href="http://code.google.com/p/sdctasks/" target="_blank">Southworks SDC Tasks</a> we published two weeks ago in <strong>Google Code</strong>. This project is a set of comprehensive MSBuild tasks that we built along with the maturity of our build process.</p>
<p>I’ll give you a walkthrough for these tasks we developed by giving you a sample of each one of them.</p>
<p>In this post you will find how you can easily update your assembly info files with company information by using the <strong>UpdateAssemblyinfo </strong>task.</p>
<p>This task is pretty much straight-forward, so I will create a simple <strong>.proj</strong> file to demonstrate how it works.</p>
<h2>Reference the SDC assembly in your project file</h2>
<p>The first step is to add the assembly reference for this specific task by giving the <strong>AssemblyFile</strong> and the <strong>TaskName</strong> values:</p>
<div>
<div style="padding-right: 0px;padding-left: 0px;font-size: 8pt;padding-bottom: 0px;width: 100%;color: black;padding-top: 0px;font-family: consolas, &#39;Courier New&#39;, courier, monospace">
<pre style="padding-right: 0px;padding-left: 0px;font-size: 8pt;padding-bottom: 0px;margin: 0em;width: 100%;color: black;padding-top: 0px;font-family: consolas, &#39;Courier New&#39;, courier, monospace"><span style="color: #0000ff">&lt;</span><span style="color: #800000">Project</span> <span style="color: #ff0000">DefaultTargets</span><span style="color: #0000ff">=&quot;UpdateAssemblyInfos&quot;</span> </pre>
<pre style="padding-right: 0px;padding-left: 0px;font-size: 8pt;padding-bottom: 0px;margin: 0em;width: 100%;color: black;padding-top: 0px;font-family: consolas, &#39;Courier New&#39;, courier, monospace">         <span style="color: #ff0000">xmlns</span><span style="color: #0000ff">=&quot;http://schemas.microsoft.com/developer/msbuild/2003&quot;</span><span style="color: #0000ff">&gt;</span></pre>
<pre style="padding-right: 0px;padding-left: 0px;font-size: 8pt;padding-bottom: 0px;margin: 0em;width: 100%;color: black;padding-top: 0px;font-family: consolas, &#39;Courier New&#39;, courier, monospace">  <span style="color: #0000ff">&lt;</span><span style="color: #800000">UsingTask</span> <span style="color: #ff0000">AssemblyFile</span><span style="color: #0000ff">=&quot;d:\test\Southworks.Sdc.Tasks.dll&quot;</span></pre>
<pre style="padding-right: 0px;padding-left: 0px;font-size: 8pt;padding-bottom: 0px;margin: 0em;width: 100%;color: black;padding-top: 0px;font-family: consolas, &#39;Courier New&#39;, courier, monospace">             <span style="color: #ff0000">TaskName</span><span style="color: #0000ff">=&quot;UpdateAssemblyInfo&quot;</span><span style="color: #0000ff">/&gt;</span> </pre>
<pre style="padding-right: 0px;padding-left: 0px;font-size: 8pt;padding-bottom: 0px;margin: 0em;width: 100%;color: black;padding-top: 0px;font-family: consolas, &#39;Courier New&#39;, courier, monospace"><span style="color: #0000ff">&lt;/</span><span style="color: #800000">Project</span><span style="color: #0000ff">&gt;</span></pre>
</p></div>
</div>
<p>Notice that the <strong>DefaultTargets</strong> property indicates which target will be first executed, I’m going to include this target later.</p>
<h2>Defining the files to be updated</h2>
<p>Then, you need to specify which files will be updated and where they’re located. To do that create a new <strong>ItemGroup</strong>. If you want to know more about including and/or including Items, see <a href="http://msdn.microsoft.com/en-us/library/646dk05y.aspx">http://msdn.microsoft.com/en-us/library/646dk05y.aspx</a>.</p>
<div>
<div style="padding-right: 0px;padding-left: 0px;font-size: 8pt;padding-bottom: 0px;width: 100%;color: black;padding-top: 0px;font-family: consolas, &#39;Courier New&#39;, courier, monospace">
<pre style="padding-right: 0px;padding-left: 0px;font-size: 8pt;padding-bottom: 0px;margin: 0em;width: 100%;color: black;padding-top: 0px;font-family: consolas, &#39;Courier New&#39;, courier, monospace"><span style="color: #0000ff">&lt;</span><span style="color: #800000">Project</span> <span style="color: #ff0000">DefaultTargets</span><span style="color: #0000ff">=&quot;UpdateAssemblyInfos&quot;</span></pre>
<pre style="padding-right: 0px;padding-left: 0px;font-size: 8pt;padding-bottom: 0px;margin: 0em;width: 100%;color: black;padding-top: 0px;font-family: consolas, &#39;Courier New&#39;, courier, monospace">         <span style="color: #ff0000">xmlns</span><span style="color: #0000ff">=&quot;http://schemas.microsoft.com/developer/msbuild/2003&quot;</span><span style="color: #0000ff">&gt;</span></pre>
<pre style="padding-right: 0px;padding-left: 0px;font-size: 8pt;padding-bottom: 0px;margin: 0em;width: 100%;color: black;padding-top: 0px;font-family: consolas, &#39;Courier New&#39;, courier, monospace">&#160;</pre>
<pre style="padding-right: 0px;padding-left: 0px;font-size: 8pt;padding-bottom: 0px;margin: 0em;width: 100%;color: black;padding-top: 0px;font-family: consolas, &#39;Courier New&#39;, courier, monospace">  <span style="color: #0000ff">&lt;</span><span style="color: #800000">UsingTask</span> <span style="color: #ff0000">AssemblyFile</span><span style="color: #0000ff">=&quot;d:\test\Southworks.Sdc.Tasks.dll&quot;</span></pre>
<pre style="padding-right: 0px;padding-left: 0px;font-size: 8pt;padding-bottom: 0px;margin: 0em;width: 100%;color: black;padding-top: 0px;font-family: consolas, &#39;Courier New&#39;, courier, monospace">             <span style="color: #ff0000">TaskName</span><span style="color: #0000ff">=&quot;UpdateAssemblyInfo&quot;</span><span style="color: #0000ff">/&gt;</span>  </pre>
<pre style="padding-right: 0px;padding-left: 0px;font-size: 8pt;padding-bottom: 0px;margin: 0em;width: 100%;color: black;padding-top: 0px;font-family: consolas, &#39;Courier New&#39;, courier, monospace">  <span style="color: #0000ff">&lt;</span><span style="color: #800000">ItemGroup</span><span style="color: #0000ff">&gt;</span></pre>
<pre style="padding-right: 0px;padding-left: 0px;font-size: 8pt;padding-bottom: 0px;margin: 0em;width: 100%;color: black;padding-top: 0px;font-family: consolas, &#39;Courier New&#39;, courier, monospace">    <span style="color: #0000ff">&lt;</span><span style="color: #800000">AssemblyInfos</span> <span style="color: #ff0000">Include</span><span style="color: #0000ff">=&quot;d:\test\**\AssemblyInfo.cs&quot;</span><span style="color: #0000ff">/&gt;</span></pre>
<pre style="padding-right: 0px;padding-left: 0px;font-size: 8pt;padding-bottom: 0px;margin: 0em;width: 100%;color: black;padding-top: 0px;font-family: consolas, &#39;Courier New&#39;, courier, monospace">  <span style="color: #0000ff">&lt;/</span><span style="color: #800000">ItemGroup</span><span style="color: #0000ff">&gt;</span></pre>
<pre style="padding-right: 0px;padding-left: 0px;font-size: 8pt;padding-bottom: 0px;margin: 0em;width: 100%;color: black;padding-top: 0px;font-family: consolas, &#39;Courier New&#39;, courier, monospace">&#160;</pre>
<pre style="padding-right: 0px;padding-left: 0px;font-size: 8pt;padding-bottom: 0px;margin: 0em;width: 100%;color: black;padding-top: 0px;font-family: consolas, &#39;Courier New&#39;, courier, monospace"><span style="color: #0000ff">&lt;/</span><span style="color: #800000">Project</span><span style="color: #0000ff">&gt;</span></pre>
</p></div>
</div>
<h2>Configure the UpdateAssemblyinfo target</h2>
<p>Finally create and configure a new target by specifying the information to be replaced on the files we defined in the previous step.</p>
<div>
<div style="padding-right: 0px;padding-left: 0px;font-size: 8pt;padding-bottom: 0px;width: 100%;color: black;padding-top: 0px;font-family: consolas, &#39;Courier New&#39;, courier, monospace">
<pre style="padding-right: 0px;padding-left: 0px;font-size: 8pt;padding-bottom: 0px;margin: 0em;width: 100%;color: black;padding-top: 0px;font-family: consolas, &#39;Courier New&#39;, courier, monospace"><span style="color: #0000ff">&lt;</span><span style="color: #800000">Project</span> <span style="color: #ff0000">DefaultTargets</span><span style="color: #0000ff">=&quot;UpdateAssemblyInfos&quot;</span> </pre>
<pre style="padding-right: 0px;padding-left: 0px;font-size: 8pt;padding-bottom: 0px;margin: 0em;width: 100%;color: black;padding-top: 0px;font-family: consolas, &#39;Courier New&#39;, courier, monospace">         <span style="color: #ff0000">xmlns</span><span style="color: #0000ff">=&quot;http://schemas.microsoft.com/developer/msbuild/2003&quot;</span><span style="color: #0000ff">&gt;</span></pre>
<pre style="padding-right: 0px;padding-left: 0px;font-size: 8pt;padding-bottom: 0px;margin: 0em;width: 100%;color: black;padding-top: 0px;font-family: consolas, &#39;Courier New&#39;, courier, monospace">&#160;</pre>
<pre style="padding-right: 0px;padding-left: 0px;font-size: 8pt;padding-bottom: 0px;margin: 0em;width: 100%;color: black;padding-top: 0px;font-family: consolas, &#39;Courier New&#39;, courier, monospace">  <span style="color: #0000ff">&lt;</span><span style="color: #800000">UsingTask</span> <span style="color: #ff0000">AssemblyFile</span><span style="color: #0000ff">=&quot;d:\test\Southworks.Sdc.Tasks.dll&quot;</span></pre>
<pre style="padding-right: 0px;padding-left: 0px;font-size: 8pt;padding-bottom: 0px;margin: 0em;width: 100%;color: black;padding-top: 0px;font-family: consolas, &#39;Courier New&#39;, courier, monospace">             <span style="color: #ff0000">TaskName</span><span style="color: #0000ff">=&quot;UpdateAssemblyInfo&quot;</span><span style="color: #0000ff">/&gt;</span></pre>
<pre style="padding-right: 0px;padding-left: 0px;font-size: 8pt;padding-bottom: 0px;margin: 0em;width: 100%;color: black;padding-top: 0px;font-family: consolas, &#39;Courier New&#39;, courier, monospace">  </pre>
<pre style="padding-right: 0px;padding-left: 0px;font-size: 8pt;padding-bottom: 0px;margin: 0em;width: 100%;color: black;padding-top: 0px;font-family: consolas, &#39;Courier New&#39;, courier, monospace">  <span style="color: #0000ff">&lt;</span><span style="color: #800000">ItemGroup</span><span style="color: #0000ff">&gt;</span></pre>
<pre style="padding-right: 0px;padding-left: 0px;font-size: 8pt;padding-bottom: 0px;margin: 0em;width: 100%;color: black;padding-top: 0px;font-family: consolas, &#39;Courier New&#39;, courier, monospace">    <span style="color: #0000ff">&lt;</span><span style="color: #800000">AssemblyInfos</span> <span style="color: #ff0000">Include</span><span style="color: #0000ff">=&quot;d:\test\**\AssemblyInfo.cs&quot;</span><span style="color: #0000ff">/&gt;</span></pre>
<pre style="padding-right: 0px;padding-left: 0px;font-size: 8pt;padding-bottom: 0px;margin: 0em;width: 100%;color: black;padding-top: 0px;font-family: consolas, &#39;Courier New&#39;, courier, monospace">  <span style="color: #0000ff">&lt;/</span><span style="color: #800000">ItemGroup</span><span style="color: #0000ff">&gt;</span></pre>
<pre style="padding-right: 0px;padding-left: 0px;font-size: 8pt;padding-bottom: 0px;margin: 0em;width: 100%;color: black;padding-top: 0px;font-family: consolas, &#39;Courier New&#39;, courier, monospace">&#160;</pre>
<pre style="padding-right: 0px;padding-left: 0px;font-size: 8pt;padding-bottom: 0px;margin: 0em;width: 100%;color: black;padding-top: 0px;font-family: consolas, &#39;Courier New&#39;, courier, monospace">  <span style="color: #0000ff">&lt;</span><span style="color: #800000">Target</span> <span style="color: #ff0000">Name</span><span style="color: #0000ff">=&quot;UpdateAssemblyInfos&quot;</span><span style="color: #0000ff">&gt;</span></pre>
<pre style="padding-right: 0px;padding-left: 0px;font-size: 8pt;padding-bottom: 0px;margin: 0em;width: 100%;color: black;padding-top: 0px;font-family: consolas, &#39;Courier New&#39;, courier, monospace">    </pre>
<pre style="padding-right: 0px;padding-left: 0px;font-size: 8pt;padding-bottom: 0px;margin: 0em;width: 100%;color: black;padding-top: 0px;font-family: consolas, &#39;Courier New&#39;, courier, monospace">    <span style="color: #0000ff">&lt;</span><span style="color: #800000">UpdateAssemblyinfo</span> <span style="color: #ff0000">Include</span><span style="color: #0000ff">=&quot;@(AssemblyInfos)&quot;</span></pre>
<pre style="padding-right: 0px;padding-left: 0px;font-size: 8pt;padding-bottom: 0px;margin: 0em;width: 100%;color: black;padding-top: 0px;font-family: consolas, &#39;Courier New&#39;, courier, monospace">                      <span style="color: #ff0000">AssemblyCopyright</span><span style="color: #0000ff">=&quot;Southworks (r) copyright&quot;</span></pre>
<pre style="padding-right: 0px;padding-left: 0px;font-size: 8pt;padding-bottom: 0px;margin: 0em;width: 100%;color: black;padding-top: 0px;font-family: consolas, &#39;Courier New&#39;, courier, monospace">                      <span style="color: #ff0000">AssemblyCompany</span><span style="color: #0000ff">=&quot;Southworks&quot;</span></pre>
<pre style="padding-right: 0px;padding-left: 0px;font-size: 8pt;padding-bottom: 0px;margin: 0em;width: 100%;color: black;padding-top: 0px;font-family: consolas, &#39;Courier New&#39;, courier, monospace">                      <span style="color: #ff0000">AssemblyProduct</span><span style="color: #0000ff">=&quot;Sample product &quot;</span> <span style="color: #0000ff">/&gt;</span></pre>
<pre style="padding-right: 0px;padding-left: 0px;font-size: 8pt;padding-bottom: 0px;margin: 0em;width: 100%;color: black;padding-top: 0px;font-family: consolas, &#39;Courier New&#39;, courier, monospace">  <span style="color: #0000ff">&lt;/</span><span style="color: #800000">Target</span><span style="color: #0000ff">&gt;</span></pre>
<pre style="padding-right: 0px;padding-left: 0px;font-size: 8pt;padding-bottom: 0px;margin: 0em;width: 100%;color: black;padding-top: 0px;font-family: consolas, &#39;Courier New&#39;, courier, monospace">  </pre>
<pre style="padding-right: 0px;padding-left: 0px;font-size: 8pt;padding-bottom: 0px;margin: 0em;width: 100%;color: black;padding-top: 0px;font-family: consolas, &#39;Courier New&#39;, courier, monospace"><span style="color: #0000ff">&lt;/</span><span style="color: #800000">Project</span><span style="color: #0000ff">&gt;</span></pre>
</p></div>
</div>
<p>To see if all it’s working as expected, you could run the project file with <strong>MSBuild</strong> as depicted bellow: </p>
<p><a href="http://blogs.southworks.net/jpgarcia/files/2008/07/image.png"><img height="157" alt="image" src="http://blogs.southworks.net/jpgarcia/files/2008/07/image-thumb.png" width="510" /></a></p>
<p>Open the sample <strong>AssemblyInfo.cs</strong> file and see how it was updated: </p>
<p><a href="http://blogs.southworks.net/jpgarcia/files/2008/07/image1.png"><img height="139" alt="image" src="http://blogs.southworks.net/jpgarcia/files/2008/07/image-thumb1.png" width="465" /></a></p>
<p>thanks, stay tuned!</p>
<img src="http://feeds.feedburner.com/~r/jpgarcia/~4/PTz176y9Sqk" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blogs.southworks.net/jpgarcia/2008/07/11/updating-your-assembly-info-files-with-southworks-sdc-tasks/feed/</wfw:commentRss>
		<feedburner:origLink>http://blogs.southworks.net/jpgarcia/2008/07/11/updating-your-assembly-info-files-with-southworks-sdc-tasks/</feedburner:origLink></item>
		<item>
		<title>Folder wildcards like \**\ in CruiseControl.Net</title>
		<link>http://feeds.southworks.net/~r/jpgarcia/~3/Y67A87UMOv8/</link>
		<comments>http://blogs.southworks.net/jpgarcia/2008/05/25/folder-wildcards-like-in-cruisecontrolnet/#comments</comments>
		<pubDate>Sun, 25 May 2008 19:06:03 +0000</pubDate>
		<dc:creator>jpgarcia</dc:creator>
		
		<category><![CDATA[Code Quality]]></category>

		<category><![CDATA[Continuous Integration]]></category>

		<category><![CDATA[CruiseControl.Net]]></category>

		<category><![CDATA[MSBuild]]></category>

		<guid isPermaLink="false">/blogs/jpgarcia/archive/2008/05/25/Folder-wildcards-like-_5C002A002A005C00_-in-CruiseControl.Net.aspx</guid>
		<description><![CDATA[Spanish Version
Last week we were working on our Build Server using CruiseControl.Net to allow multiple Test / Code Coverage tasks for two or more solutions.
Once we&#8217;ve configured the .proj file to run a set of two RunTests / RunCodeCoverage tasks we needed to merge the results file to the MSBuild log after running them.
So, our [...]]]></description>
			<content:encoded><![CDATA[<p align="right"><a href="http://www.jpgarcia.com.ar/index.php/2008/05/25/utilizando-wildcards-de-la-forma-en-cruisecontrolnet/" target="_blank">Spanish Version</a></p>
<p>Last week we were working on our Build Server using <a href="http://ccnet.thoughtworks.com/">CruiseControl.Net</a> to allow multiple Test / Code Coverage tasks for two or more solutions.</p>
<p>Once we&#8217;ve configured the .proj file to run a set of two RunTests / RunCodeCoverage tasks we needed to merge the results file to the MSBuild log after running them.</p>
<p>So, our first approach was modifying the <strong>ccnet.config</strong> file to merge the files generated by these tasks using the same pattern of MSBuild, I mean, using &quot;<strong>\**\</strong>&quot;, something like this:</p>
<div>
<div style="padding-right: 0px;padding-left: 0px;font-size: 8pt;padding-bottom: 0px;width: 100%;color: black;padding-top: 0px;font-family: consolas, &#39;Courier New&#39;, courier, monospace">
<pre style="padding-right: 0px;padding-left: 0px;font-size: 8pt;padding-bottom: 0px;margin: 0em;width: 100%;color: black;padding-top: 0px;font-family: consolas, &#39;Courier New&#39;, courier, monospace"><span style="color: #0000ff">&lt;</span><span style="color: #800000">merge</span><span style="color: #0000ff">&gt;</span></pre>
<pre style="padding-right: 0px;padding-left: 0px;font-size: 8pt;padding-bottom: 0px;margin: 0em;width: 100%;color: black;padding-top: 0px;font-family: consolas, &#39;Courier New&#39;, courier, monospace">  <span style="color: #0000ff">&lt;</span><span style="color: #800000">files</span><span style="color: #0000ff">&gt;</span></pre>
<pre style="padding-right: 0px;padding-left: 0px;font-size: 8pt;padding-bottom: 0px;margin: 0em;width: 100%;color: black;padding-top: 0px;font-family: consolas, &#39;Courier New&#39;, courier, monospace">    <span style="color: #0000ff">&lt;</span><span style="color: #800000">file</span><span style="color: #0000ff">&gt;</span>D:\srv\ccnet\logs\project\**\*.trx<span style="color: #0000ff">&lt;/</span><span style="color: #800000">file</span><span style="color: #0000ff">&gt;</span></pre>
<pre style="padding-right: 0px;padding-left: 0px;font-size: 8pt;padding-bottom: 0px;margin: 0em;width: 100%;color: black;padding-top: 0px;font-family: consolas, &#39;Courier New&#39;, courier, monospace">    <span style="color: #0000ff">&lt;</span><span style="color: #800000">file</span><span style="color: #0000ff">&gt;</span>D:\srv\ccnet\logs\project\**\*.cvg<span style="color: #0000ff">&lt;/</span><span style="color: #800000">file</span><span style="color: #0000ff">&gt;</span></pre>
<pre style="padding-right: 0px;padding-left: 0px;font-size: 8pt;padding-bottom: 0px;margin: 0em;width: 100%;color: black;padding-top: 0px;font-family: consolas, &#39;Courier New&#39;, courier, monospace">  <span style="color: #0000ff">&lt;/</span><span style="color: #800000">files</span><span style="color: #0000ff">&gt;</span></pre>
<pre style="padding-right: 0px;padding-left: 0px;font-size: 8pt;padding-bottom: 0px;margin: 0em;width: 100%;color: black;padding-top: 0px;font-family: consolas, &#39;Courier New&#39;, courier, monospace"><span style="color: #0000ff">&lt;/</span><span style="color: #800000">merge</span><span style="color: #0000ff">&gt;</span></pre>
</p></div>
</div>
<p>At this point, we have figured out that Cruise Control .Net <strong>does not have</strong> this functionality, only it allows to run something like <strong>D:\srv\ccnet\logs\project\theProject\*.trx</strong>, and since the CruiseControl.Net source code is available I started to writing some lines to modify the <strong>ThoughtWorks.CruiseControl.Core</strong> assembly to allow that.</p>
<p>In this post you will find the source code of the spike I wrote with a series of tests to implement that feature and the <strong>WildCardPath.cs</strong> source code from the <strong>core</strong> CruiseControl.Net project updated.</p>
<ul>
<li>Spike solution with tests [<a href="http://wauokg.blu.livefilestore.com/y1pe7Q3tmlVXP4V8KDMosAoCX6nGHh0ZY4wwPYtZZpRBgG0ke4_cWcyeWF9J_HpDwukTVtQYMN9A2_k2cDxupTRBA/Wildcards.zip?download">Download</a>] </li>
<li><strong>WildCardPath</strong> class file of CruiseControl.Net Core assembly [<a href="http://wauokg.blu.livefilestore.com/y1pQFaMVkn3j8sb-OSgHSIca3tiTEwto5eAVkWX0AZIsdhyAzu8X6kYB62UFr9hrfGPEEDVCscYXQfJkGNLyISUVWXBL0n0dq9q/WildCardPath.zip?download">Download</a>] </li>
</ul>
<p>Once you have updated the Core project with the new implementation of the WildCardPath class, you need to do the following tasks to keep it running.</p>
<ol>
<li>Compile the <strong>Core</strong> project </li>
<li>Stop the CruiseControl.Net service </li>
<li>Replace the <strong>ThoughtWorks.CruiseControl.Core </strong>assembly with the new one. </li>
</ol>
<p>And that&#8217;s it, use wildcards as in MSBuild <img src='http://blogs.southworks.net/jpgarcia/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<img src="http://feeds.feedburner.com/~r/jpgarcia/~4/Y67A87UMOv8" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blogs.southworks.net/jpgarcia/2008/05/25/folder-wildcards-like-in-cruisecontrolnet/feed/</wfw:commentRss>
		<feedburner:origLink>http://blogs.southworks.net/jpgarcia/2008/05/25/folder-wildcards-like-in-cruisecontrolnet/</feedburner:origLink></item>
		<item>
		<title>Microsoft Source Analysis for C# 4.2 was published</title>
		<link>http://feeds.southworks.net/~r/jpgarcia/~3/Zqth7PDQFBA/</link>
		<comments>http://blogs.southworks.net/jpgarcia/2008/05/25/microsoft-source-analysis-for-c-42-was-published/#comments</comments>
		<pubDate>Sun, 25 May 2008 05:38:22 +0000</pubDate>
		<dc:creator>jpgarcia</dc:creator>
		
		<category><![CDATA[Code Quality]]></category>

		<guid isPermaLink="false">/blogs/jpgarcia/archive/2008/05/24/Microsoft-Source-Analysis-for-C_2300_-4.2-was-published.aspx</guid>
		<description><![CDATA[Spanish Version
Microsoft has published a great tool called Microsoft Source Analysis for C#, formerly known as StyleCop.
This tool allow us to review and improve our source code quality. It&#8217;s is fully integrated with Visual Studio, so with a single right click in a solution, project or file, we can check our code against the best [...]]]></description>
			<content:encoded><![CDATA[<div style="text-align:right"><a href="http://www.jpgarcia.com.ar/index.php/2008/05/25/microsoft-source-analysis-for-c-42-publicado/">Spanish Version</a></div>
<p>Microsoft <a href="http://code.msdn.microsoft.com/sourceanalysis" target="_blank">has published</a> a great tool called <strong>Microsoft Source Analysis for C#</strong>, formerly known as <strong>StyleCop</strong>.</p>
<p>This tool allow us to review and improve our source code quality. It&#8217;s is fully integrated with Visual Studio, so with a single right click in a solution, project or file, we can check our code against the best practices defined in a series of rules depicted below.</p>
<p>You will find a detailed explanation on the <a href="http://blogs.msdn.com/sourceanalysis/archive/2008/05/23/announcing-the-release-of-microsoft-source-analysis.aspx" target="_blank">Announcing the release of Microsoft Source Analysis for C#</a> post and download the latest bits from <a href="http://code.msdn.microsoft.com/sourceanalysis/Release/ProjectReleases.aspx" target="_blank">here</a>.</p>
<p> <img src="http://yauykg.blu.livefilestore.com/y1pe7Q3tmlVXP5WbJ-VHlcPtOO6pcgJQ4O0O666njmu0CL82-I4crAoGjSc6JmBuqXAWdD4tYWHOepWVE376B9oEQ/runningSourceAnalysis.png" alt="" /></p>
<p>Also you can customize which rules should be checked using the built-in configuration tool.</p>
<p><img src="http://yauykg.blu.livefilestore.com/y1pe7Q3tmlVXP4EqzwXIlEHe7drC11rByoy2ZSwPu6MUJNa3DsJVs4vs3kRFH8Gu5AuNhZNAVGJaU9igixAZ8hoSw/configuringSourceAnalysis.png" alt="" /></p>
<p>Finally, another good point is that we can integrate that tool on our build process with <strong>MSBuild</strong>. I recomend you the <strong>Jason Allor&#8217;s</strong> <a href="http://blogs.msdn.com/sourceanalysis/pages/source-analysis-msbuild-integration.aspx" target="_blank">blog post</a> on the <a href="http://blogs.msdn.com/sourceanalysis/" target="_blank">Source Analysis Blog page</a> where he explains how to do that.</p>
<p>Here is another <a href="http://blogs.msdn.com/msbuild/archive/2008/05/23/microsoft-source-analysis-releases-to-web.aspx" target="_blank">good post</a> from <a href="http://blogs.msdn.com/msbuild/default.aspx" target="_blank">MSBuild Team Blog</a> also, announcing this release.</p>
<p>Enjoy it and say goodbye to the documents with code-standards <img src='http://blogs.southworks.net/jpgarcia/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /></p>
<img src="http://feeds.feedburner.com/~r/jpgarcia/~4/Zqth7PDQFBA" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blogs.southworks.net/jpgarcia/2008/05/25/microsoft-source-analysis-for-c-42-was-published/feed/</wfw:commentRss>
		<feedburner:origLink>http://blogs.southworks.net/jpgarcia/2008/05/25/microsoft-source-analysis-for-c-42-was-published/</feedburner:origLink></item>
	</channel>
</rss>
