<?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.feedburner.com/~d/styles/itemcontent.css"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0"><channel><title>Devlicio.us - Just the Tasty Bits</title><link>http://devlicio.us/blogs/</link><description>Your Agile .NET Community</description><dc:language>en-US</dc:language><generator>CommunityServer 2008.5 SP1 (Build: 31106.3070)</generator><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/Devlicious" /><feedburner:info uri="devlicious" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><item><title>Ruby Is Scary</title><link>http://feedproxy.google.com/~r/Devlicious/~3/hljeqE87MMw/ruby-is-scary.aspx</link><pubDate>Sat, 31 Jul 2010 01:55:00 GMT</pubDate><guid isPermaLink="false">40756a8b-6212-4073-9d98-6c26781577de:61330</guid><dc:creator>Jak Charlton</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Why is Ruby on Rails all the rage at the moment, and why do a lot of .NET people seem so defensive?&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Undoubtedly, there is a buzz in development right now, things are changing rapidly, possibly more rapidly than they have for a good number of years. New languages are sprouting up all over it seems, with PHP and Python gaining massive popularity, F#, Erlang and Haskell suddenly being talked about as mainstream, Javascript evolving beyond that thing that makes &amp;quot;onClick&amp;quot; work in your browser, and Ruby (and especially Rails) becoming &amp;quot;flavour of the month&amp;quot; for web development. Ruby is even starting to invade the .NET mainstream space with evolutions like Rake, Cuke4Nuke and Nu muddying the divide that there once was. We even have IronRuby to make Ruby run on .NET&lt;/p&gt;
&lt;p&gt;And yet, many .NET people seem defensive, as though their safe world was being invaded by a parasite.&lt;/p&gt;
&lt;p&gt;I find this quite odd. As a developer who has been around for far too long, I have seen more than my fair share of languages and platforms come and go, none of them was perfect, and I would venture to say none of the ones we have now are either.&lt;/p&gt;
&lt;p&gt;It would appear that a large proportion of the uncertainty is in the C# development &amp;#39;community&amp;#39;, though that may be as I don&amp;#39;t really frequent circles that use VB.NET (and I&amp;#39;m fairly sure they are still busy being defensive about C# and probably haven&amp;#39;t noticed that&amp;#39;s *so* last year :) Somehow the introduction of new ideas is rocking the C# type safe world.&lt;/p&gt;
&lt;p&gt;Some people seem to be concerned about Ruby itself, some seem to have concerns about the lack of a statically typed safety net, and some seem to think that &amp;quot;the Enterprise&amp;quot; needs something more professional than toys like Ruby and Rails.&lt;/p&gt;
&lt;h3&gt;To The Static Typing Stalwarts&lt;/h3&gt;
&lt;p&gt;Yes, it&amp;#39;s nice to have that compile time checking that static typing gives you, it gives us all a warm sense of fuzziness knowing that the compiler told us that this code would run just fine when we dropped it onto our web server.&lt;/p&gt;
&lt;p&gt;Yes, we appreciate the great benefits that this has for things like Intellisense and for easily discoverable APIs, and even for automated documentation.&lt;/p&gt;
&lt;p&gt;And yet, none of these things seem to bother the Ruby (and PHP/Python/Javascript) crowd too much. Why is that?&lt;/p&gt;
&lt;p&gt;I would suggest that the static typing benefits a language like C# brings are illusory to a large degree.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;The compiler isn&amp;#39;t telling us that this code will run correctly at all, it&amp;#39;s actually just telling us that the CLR won&amp;#39;t throw our code out before the application even starts up - but correctness is so much more important than that. The safety net static typing provides us with is just one part of the equation, and possibly the least important part - we really should be enforcing correctness upon our code.&lt;/p&gt;
&lt;p&gt;Correctness is verified by good automated testing, and static typed languages start to come back and bite us here - we trade that compile time security blanket for a much harder experience testing our code. Sure, tools like NUnit, xUnit, Rhino Mocks, Moq, SpecFlow, StorEvil et al ease away our pain, but still our application code is littered with constructs that are pretty much there to support SOLID (or SOLID is required due to the constraints of type safe OO languages), and they become most obvious when we start testing in languages like C# (I am *so* over Interfaces, IoC, Covariance, Contravariance and Generics !&lt;/p&gt;
&lt;p&gt;The testing experience in Ruby is a world apart from in C# and .NET, it is just easy and simple ... so simple in fact that it is almost harder to not write automated tests in Ruby - and that&amp;#39;s how it should be. In C# testing is often convoluted, complex, fragile and just plain hard work - I can&amp;#39;t think of the last time a C# developer described automated testing as fun ... and yet, in Ruby, it just seems like FUN!&lt;/p&gt;
&lt;p&gt;And yes, Ruby without automated testing leaves you open to all kinds of runtime errors that C# just wouldn&amp;#39;t - so in Ruby, you just make sure you test, and not only test your code will run, but also test it will run *correctly* - there is no safety net, but the trade off is you are ensuring correctness of code, not just compilation of it.&lt;/p&gt;
&lt;p&gt;Intellisense, sure it&amp;#39;s nice, but as RubyMine and even Visual Studio (under Javascript) demonstrate, you can do some form of Intellisense in dynamic languages, you just can&amp;#39;t always be certain what may or may not be available - but this is getting better. And honestly, is discovering which method you are meant to call though typing &amp;quot;.&amp;quot; all that great an idea anyway? Shouldn&amp;#39;t you as a competent developer know *in advance* what you wanted to call, rather than guessing it as you type?&lt;/p&gt;
&lt;h3&gt;To The Enterprise&amp;nbsp;&lt;/h3&gt;
&lt;p&gt;Sure, Ruby doesn&amp;#39;t have the track record that C# has, nor does it have the exposure, or market reach, or backing of a company like Microsoft.&lt;/p&gt;
&lt;p&gt;But, is that what is really important?&lt;/p&gt;
&lt;p&gt;I would bet that a large part of the appeal for statically typed languages &amp;nbsp;in the &amp;quot;Enterprise&amp;quot; is actually a need to deal with a much lower skilled developer base overall. Compile time safety means that your developers don&amp;#39;t have to be top notch, the compiler can make up for their weaknesses (and in the case of C# and .NET, Visual Studio &amp;#39;drag and drop&amp;#39; tooling is trying to make up for a lot of the rest)&lt;/p&gt;
&lt;p&gt;Enterprises tend to see dollars and cents, not people and value. So anything that lets them hire cheaper developers to churn out more product must be good.&lt;/p&gt;
&lt;p&gt;Again, I would argue this is a false economy. Sure that team of 30 developers may give you a warmer fuzzier feeling inside than a team of 4. And sure, the quantity of code those 30 can type out will probably be much more.&lt;/p&gt;
&lt;p&gt;But this misses some real issues around productivity and value - a &amp;#39;good&amp;#39; developer is 10x as productive as an &amp;#39;average&amp;#39; developer, and more importantly, the &amp;#39;average&amp;#39; developer will never be able to create the same quality level as the &amp;#39;good&amp;#39; developer, even given a near infinite amount of time. No matter how much time a hobbyist painter spends with oil and canvas, he will never create a Leonardo. And as a Jackson Pollock will amply demonstrate, sometimes less is more.&lt;/p&gt;
&lt;p&gt;So are you measuring bodies or productivity? Surely it is the end result that matters, not the comfort factor of people looking busy.&lt;/p&gt;
&lt;p&gt;And, when you get a good developer, and let them have the freedom of a dynamic language, they can spend less time fighting compile time safety and language constructs that exist almost solely for that type safety, and more time concentrating on business logic and the end product.&lt;/p&gt;
&lt;p&gt;In fact, the best argument for why Ruby is not suited to the Enterprise is ... the Enterprise probably already has a large investment in one platform and one core language (or maybe two), and the cost of retraining all those developers, support staff, renegotiating supplier contracts, etc etc is just disproportionately expensive. Lethargy is rife in the Enterprise, and monoliths take a long time to move - sure it&amp;#39;s easier for startups to hop on new technologies and run with them, and often it&amp;#39;s why they quickly challenge the status quo. This isn&amp;#39;t really a technical issue, this is a political and management one.&lt;/p&gt;
&lt;p&gt;Maybe Ruby and Rails will gain traction here, maybe not. Things like functional programming are certainly starting to grow roots in financial services, and things like Javascript are prevalent in web apps in the Enterprise so maybe dynamic programming in things like Ruby isn&amp;#39;t so far off. It just takes one small faction to show how well they solved a particular problem with a new language or platform to plant that thought.&lt;/p&gt;
&lt;h3&gt;So Should We All Switch To Ruby Now?&lt;/h3&gt;
&lt;p&gt;Of course not, and maybe this is what the defensive people in .NET miss. The Ruby people aren&amp;#39;t saying &amp;quot;you guys have it all wrong, convert now&amp;quot;, they are just saying &amp;quot;hey, I found a really cool way of solving this problem&amp;quot;.&lt;/p&gt;
&lt;p&gt;Ruby is about choice, it&amp;#39;s another tool in your arsenal. As are Javascript, PHP, Python, Erlang, F#, Java, Groovy, C++ and a host of others.&lt;/p&gt;
&lt;p&gt;There is no &amp;quot;one right path&amp;quot;, so let&amp;#39;s all stop pretending there is.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;We don&amp;#39;t need to be defensive about any one language or platform, unless we are so unsure of our abilities as developers that we cannot learn and adapt - and if that is the case, maybe a new career is a better idea?&lt;/p&gt;
&lt;p&gt;As my recent presentation at DDDSydney said ... My Objective Today was to make you think ... &amp;quot;Maybe There Is A Better Way&amp;quot; - because it would just be depressing to think we are already doing things the best possible way.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://devlicio.us/aggbug.aspx?PostID=61330" width="1" height="1"&gt;&lt;img src="http://feeds.feedburner.com/~r/Devlicious/~4/hljeqE87MMw" height="1" width="1"/&gt;</description><category domain="http://devlicio.us/blogs/casey/archive/tags/Rants/default.aspx">Rants</category><category domain="http://devlicio.us/blogs/casey/archive/tags/.NET/default.aspx">.NET</category><category domain="http://devlicio.us/blogs/casey/archive/tags/ruby/default.aspx">ruby</category><feedburner:origLink>http://devlicio.us/blogs/casey/archive/2010/07/31/ruby-is-scary.aspx</feedburner:origLink></item><item><title>Open Source Whining</title><link>http://feedproxy.google.com/~r/Devlicious/~3/bve9iD-lWoM/open-source-whining.aspx</link><pubDate>Wed, 28 Jul 2010 14:04:28 GMT</pubDate><guid isPermaLink="false">40756a8b-6212-4073-9d98-6c26781577de:61272</guid><dc:creator>Tim Barcz</dc:creator><slash:comments>21</slash:comments><description>&lt;p&gt;&lt;img style="display:inline;margin-left:0px;margin-right:0px;" align="right" src="http://4.bp.blogspot.com/_N3mwtdW7vDY/SjkBr84l-tI/AAAAAAAAAGY/GIsPl56WOn4/s320/whiner1.jpg" width="159" height="212" alt="" /&gt;Was working on a blog post talking about a problem I’ve found in Git (1.7.0.2) and I thought I would check to see if it’s been fixed in the most recent version.&amp;#160; After downloading and installing I reviewed the release notes where I’m quite shocked to read the following:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;“…All hopes to the contrary, Git for Windows is backed by only a handful of developers, in spite of being downloaded almost one hundred thousand times. You can expect developers to be enthusiastic to fix others&amp;#39; issues in such a situation only for so long. In short: &lt;b&gt;Do not expect other people to fix your issues for you.”&lt;/b&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;Basically, what I get from this is that &lt;strong&gt;the msysgit committers are a bunch of whiners&lt;/strong&gt;. What they fail to see is that the people who would benefit from their VCS may not have the same skillset to work on the code.&amp;#160; This is something we’ve realized long ago with &lt;a href="http://www.ayende.com/wiki/Rhino+Mocks+Documentation.ashx"&gt;Rhino Mocks&lt;/a&gt;.&amp;#160; &lt;/p&gt;  &lt;p&gt;Should more people help? Possibly. As someone active in open source technology I don’t know that I can be of much assistance to the Git team – I am someone who benefits greatly from their software (I am quite thankful for it) but don’t have the requisite knowledge in C/C++ to assist in any meaningful fashion.&lt;/p&gt;  &lt;p&gt;Just a bit disappointed to see this type of whining in their release notes – certainly there are far better ways to say what they’re trying to say.&amp;#160; Doesn’t represent msysgit or the broader open source community well.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://devlicio.us/aggbug.aspx?PostID=61272" width="1" height="1"&gt;&lt;img src="http://feeds.feedburner.com/~r/Devlicious/~4/bve9iD-lWoM" height="1" width="1"/&gt;</description><category domain="http://devlicio.us/blogs/tim_barcz/archive/tags/Open+Source+Software/default.aspx">Open Source Software</category><category domain="http://devlicio.us/blogs/tim_barcz/archive/tags/Git/default.aspx">Git</category><feedburner:origLink>http://devlicio.us/blogs/tim_barcz/archive/2010/07/28/open-source-whining.aspx</feedburner:origLink></item><item><title>Best Error Dialog ever w/ Visual Studio</title><link>http://feedproxy.google.com/~r/Devlicious/~3/tctloymyfjU/best-error-dialog-ever-w-visual-studio.aspx</link><pubDate>Wed, 28 Jul 2010 12:25:00 GMT</pubDate><guid isPermaLink="false">40756a8b-6212-4073-9d98-6c26781577de:61269</guid><dc:creator>Derik Whittaker</dc:creator><slash:comments>3</slash:comments><description>&lt;p&gt;Today I received the following error and thought it summed up my day perfectly.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://devlicio.us/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/derik_5F00_whittaker/image_5F00_66D210AA.png"&gt;&lt;img style="border-bottom:0px;border-left:0px;display:inline;border-top:0px;border-right:0px;" title="image" alt="image" src="http://devlicio.us/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/derik_5F00_whittaker/image_5F00_thumb_5F00_6665DDB5.png" border="0" height="183" width="484" /&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Now the real question is what was I doing to receive this error&amp;hellip;&amp;hellip; I was trying to copy a single line (w/ 50 characters of text) to the clipboard&amp;hellip;DOH&lt;/p&gt;
&lt;p&gt;Till next time,&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://devlicio.us/aggbug.aspx?PostID=61269" width="1" height="1"&gt;&lt;img src="http://feeds.feedburner.com/~r/Devlicious/~4/tctloymyfjU" height="1" width="1"/&gt;</description><category domain="http://devlicio.us/blogs/derik_whittaker/archive/tags/Humor/default.aspx">Humor</category><feedburner:origLink>http://devlicio.us/blogs/derik_whittaker/archive/2010/07/28/best-error-dialog-ever-w-visual-studio.aspx</feedburner:origLink></item><item><title>CodeBetter/Devlicio.us/LosTechies MSDN Ultimate Giveaways</title><link>http://feedproxy.google.com/~r/Devlicious/~3/mhwXBf1E7lE/codebetter-devlicio-us-msdn-ultimate-giveaways.aspx</link><pubDate>Tue, 27 Jul 2010 11:46:00 GMT</pubDate><guid isPermaLink="false">40756a8b-6212-4073-9d98-6c26781577de:61254</guid><dc:creator>Tuna Toksoz</dc:creator><slash:comments>6</slash:comments><description>&lt;p&gt;&lt;strong&gt;UPDATE: I have added subscription donors/contributors who made this possible.     &lt;br /&gt;UPDATE: Our friends from &lt;/strong&gt;&lt;a href="http://www.lostechies.com"&gt;&lt;strong&gt;LosTechies&lt;/strong&gt;&lt;/a&gt;&lt;strong&gt; also wanted to participate, and they donated a number of licenses (6 and counting). Thank you guys!&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;In an internal discussion we had, an interesting idea popped up. MVP bloggers we had at &lt;a href="http://www.codebetter.com"&gt;CodeBetter&lt;/a&gt;/&lt;a href="http://www.devlicio.us"&gt;Devlicio.us&lt;/a&gt; were generous enough to donate some of their MSDN subscriptions they were given as part of MVP program. Then the cool kids at &lt;a href="http://www.lostechies.com"&gt;LosTechies&lt;/a&gt; stepped in, and donated a number of licenses as well! Currently we have 13-16 licenses available, and this number may change depending on the demand and outside donations. The subscriptions are for one year.&lt;/p&gt;  &lt;p&gt;We decided to give them away to successful/promising OSS projects that are in need of licenses. The rules are simple.&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;The project has to be opensource &lt;/li&gt;    &lt;li&gt;The project has to be in need of MSDN license. We’ll trust your word in this. &lt;/li&gt;    &lt;li&gt;The selection will be based on our discretion, we’ll do our best on being fair. &lt;/li&gt;    &lt;li&gt;We may change the number of licenses available during the selection progress. &lt;/li&gt; &lt;/ol&gt;  &lt;p&gt;You can send me an email (tehlike (hat) gmail (hot) com) with title starting with [CDL/MSDN] (or [CD/MSDN]), or DM me on twitter (&lt;a href="http://twitter.com/tehlike" target="_blank"&gt;@tehlike&lt;/a&gt;) if you want to participate. You have to include&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;Public URL for the project page &lt;/li&gt;    &lt;li&gt;Your name and your position in the project      &lt;br /&gt;&lt;/li&gt; &lt;/ol&gt;  &lt;p&gt;It wouldn’t have been possible with the help of following fellow bloggers. Thanks to &lt;strong&gt;Codebetter Crew&lt;/strong&gt;: &lt;a href="http://codebetter.com/blogs/benhall" target="_blank"&gt;Ben Hall&lt;/a&gt;, &lt;a href="http://codebetter.com/blogs/wardbell/" target="_blank"&gt;Ward Bell&lt;/a&gt;, &lt;a href="http://codebetter.com/blogs/james.kovacs" target="_blank"&gt;James Kovacs&lt;/a&gt;. &lt;strong&gt;Devlicious Crew&lt;/strong&gt;: &lt;a href="http://devlicio.us/blogs/hadi_hariri" target="_blank"&gt;Hadi Hariri&lt;/a&gt;, &lt;a href="http://devlicio.us/blogs/christopher_bennage" target="_blank"&gt;Christopher Bennage&lt;/a&gt;, &lt;a href="http://devlicio.us/blogs/tim_barcz" target="_blank"&gt;Tim Barcz&lt;/a&gt;, &lt;a href="http://devlicious.com/blogs/rob_reynolds/" target="_blank"&gt;Rob Reynolds&lt;/a&gt;.&amp;#160; &lt;strong&gt;Lostechies Crew&lt;/strong&gt;: &lt;a href="http://www.lostechies.com/blogs/hex/" target="_blank"&gt;Eric Hexter&lt;/a&gt;, &lt;a href="http://www.lostechies.com/blogs/jimmy_bogard/default.aspx" target="_blank"&gt;Jimmy Bogard&lt;/a&gt;, &lt;a href="http://www.lostechies.com/blogs/dahlbyk/" target="_blank"&gt;Keith Dahlby&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Good luck!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://devlicio.us/aggbug.aspx?PostID=61254" width="1" height="1"&gt;&lt;img src="http://feeds.feedburner.com/~r/Devlicious/~4/mhwXBf1E7lE" height="1" width="1"/&gt;</description><category domain="http://devlicio.us/blogs/tuna_toksoz/archive/tags/opensource/default.aspx">opensource</category><category domain="http://devlicio.us/blogs/tuna_toksoz/archive/tags/msdn/default.aspx">msdn</category><feedburner:origLink>http://devlicio.us/blogs/tuna_toksoz/archive/2010/07/27/codebetter-devlicio-us-msdn-ultimate-giveaways.aspx</feedburner:origLink></item><item><title>How to detect the theme being used in WP7</title><link>http://feedproxy.google.com/~r/Devlicious/~3/biD3X5vklCE/how-to-detect-the-theme-being-used-in-wp7.aspx</link><pubDate>Tue, 27 Jul 2010 10:07:19 GMT</pubDate><guid isPermaLink="false">40756a8b-6212-4073-9d98-6c26781577de:61252</guid><dc:creator>Derik Whittaker</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;As the Windows Phone 7 have either a dark (black) or light (white) theme which can be applied it will become very important for you to know which theme the user enabled in order to determine your applications color schema, this is assuming you are using styles which are not built into the skinning on WP7.&lt;/p&gt;  &lt;p&gt;Sadly detecting the current theme is a bit hackish as it requires you to take a look at a current loaded resource to determine the theme.&amp;#160; I would have hoped that this would be part of the built in SDK as I see this as a common need for many applications.&lt;/p&gt;  &lt;p&gt;Here is how you determine which theme is being used.&lt;/p&gt;  &lt;pre class="c-sharp" name="code"&gt;Color themeColor = (Color)Application.Current.Resources[&amp;quot;PhoneForegroundColor&amp;quot;];
        
if (themeColor.ToString() == &amp;quot;#FFFFFFFF&amp;quot;)
{
    this.PageTitle.Text = &amp;quot;Dark &amp;quot;;       
}
else if (themeColor.ToString() == &amp;quot;#DE000000&amp;quot;)
{
    this.PageTitle.Text = &amp;quot;Light &amp;quot;;    
}&lt;/pre&gt;

&lt;p&gt;As you can see the code to determine the theme is easy, but not clean in my opinion.&lt;/p&gt;

&lt;p&gt;Till next time,&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://devlicio.us/aggbug.aspx?PostID=61252" width="1" height="1"&gt;&lt;img src="http://feeds.feedburner.com/~r/Devlicious/~4/biD3X5vklCE" height="1" width="1"/&gt;</description><category domain="http://devlicio.us/blogs/derik_whittaker/archive/tags/WP7/default.aspx">WP7</category><feedburner:origLink>http://devlicio.us/blogs/derik_whittaker/archive/2010/07/27/how-to-detect-the-theme-being-used-in-wp7.aspx</feedburner:origLink></item><item><title>YouTrack for OSS Projects</title><link>http://feedproxy.google.com/~r/Devlicious/~3/ltWHl2sB_L0/youtrack-for-oss-projects.aspx</link><pubDate>Mon, 26 Jul 2010 19:18:00 GMT</pubDate><guid isPermaLink="false">40756a8b-6212-4073-9d98-6c26781577de:61236</guid><dc:creator>Hadi Hariri</dc:creator><slash:comments>3</slash:comments><description>&lt;p&gt;Quite some time ago, several OSS leads asked us about whether JetBrains could provide OSS license for &lt;a href="http://www.jetbrains.com/youtrack"&gt;YouTRACK&lt;/a&gt;. We’ve taken it one step further, and in collaboration with the great folks at CodeBetter and Devlicio.us, we are pleased to announce &lt;a href="http://youtrack.codebetter.com"&gt;YouTRACK at CodeBetter&lt;/a&gt;. Having &lt;a href="http://www.jetbrains.com/teamcity"&gt;TeamCity&lt;/a&gt; running most of the OSS projects on there, it only made sense to offer the same facilities for issue tracking at the same location. And seeing that YouTRACK integrates with TeamCity, we can offer all the functionality the combination is capable of. &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://devlicio.us/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/hadi_5F00_hariri/image_5F00_268AEB0D.png"&gt;&lt;img style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" title="image" border="0" alt="image" src="http://devlicio.us/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/hadi_5F00_hariri/image_5F00_thumb_5F00_305FB6AB.png" width="662" height="292" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;I’d like to thank &lt;a href="http://codebetter.com/blogs/kyle.baley/"&gt;Kyle Baley&lt;/a&gt;, &lt;a href="http://www.jameskovacs.com/"&gt;James Kovacs&lt;/a&gt; and &lt;a href="http://codebetter.com/blogs/brendan.tompkins/"&gt;Bredan Tompkins&lt;/a&gt; for making this possible, as without their support this wouldn’t happen. Not only are they generous in hosting YouTRACK, but also ran the risk of providing me with the credentials to the server, and at one point it looked like it had all gone to hell. Luckily however all seems to be working great now.&lt;/p&gt;  &lt;h3&gt;What are the next steps?&lt;/h3&gt;  &lt;p&gt;If you are an OSS project lead and&amp;#160; would like to use YouTRACK for your issue tracking, please email &lt;a href="mailto:teamcity@codebetter.com"&gt;teamcity@codebetter.com&lt;/a&gt; with your details and you’ll be up and running in no time. If you want to learn more about YouTRACK, please visit our &lt;a href="http://www.jetbrains.com/youtrack"&gt;web site&lt;/a&gt;. &lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://devlicio.us/aggbug.aspx?PostID=61236" width="1" height="1"&gt;&lt;img src="http://feeds.feedburner.com/~r/Devlicious/~4/ltWHl2sB_L0" height="1" width="1"/&gt;</description><category domain="http://devlicio.us/blogs/hadi_hariri/archive/tags/OSS/default.aspx">OSS</category><feedburner:origLink>http://devlicio.us/blogs/hadi_hariri/archive/2010/07/26/youtrack-for-oss-projects.aspx</feedburner:origLink></item><item><title>The Future of .NET Open Source Software Delivery</title><link>http://feedproxy.google.com/~r/Devlicious/~3/lBCNIQa7PMc/the-future-of-net-open-source-software-delivery.aspx</link><pubDate>Mon, 26 Jul 2010 18:57:00 GMT</pubDate><guid isPermaLink="false">40756a8b-6212-4073-9d98-6c26781577de:61235</guid><dc:creator>Rob Reynolds</dc:creator><slash:comments>12</slash:comments><description>&lt;p&gt;Imagine we are awhile into the future. How do you get open source releases down to your project so that you can use them? How do you get the products down to your computer so that you can use them? Is it easier or harder than the way we’ve always done it before?&lt;/p&gt;  &lt;h4&gt;&lt;strong&gt;&lt;span style="text-decoration:underline;"&gt;The Past and Present&lt;/span&gt;&lt;/strong&gt;&lt;/h4&gt;  &lt;p&gt;Before we can go there, let’s look at what we do now (the past is really the same for us here). Let’s say I want to use &lt;a href="http://nhforge.org" target="_blank"&gt;NHibernate&lt;/a&gt;. What do I do?&amp;#160; There are basically three paths we all follow in this process.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;1. Never had product x before.&lt;/strong&gt; If I don’t have a current version, I have to go out and look for it. So what do I do? &lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;Open a browser &lt;/li&gt;    &lt;li&gt;Find the site &lt;/li&gt;    &lt;li&gt;Find the downloads &lt;/li&gt;    &lt;li&gt;Find the particular download I want through the plethora of options that may be presented to me &lt;/li&gt;    &lt;li&gt;Download it &lt;/li&gt;    &lt;li&gt;Unzip it &lt;/li&gt;    &lt;li&gt;Then put it into my project references folder somewhere so I can keep it in source control with my project &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;&lt;strong&gt;2. Use the current version without upgrade.&lt;/strong&gt; If I have a current version, I may just copy it over and use it in my new project. Nevermind that it is two versions ago. I don’t want to take the time to upgrade because it could be a pain.&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;Open file explorer and find the project with the old version &lt;/li&gt;    &lt;li&gt;Open file explorer and find the new project &lt;/li&gt;    &lt;li&gt;Create the structure I need for the references folder &lt;/li&gt;    &lt;li&gt;Copy the contents of the old project to the new project &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;&lt;strong&gt;3. Upgrade.&lt;/strong&gt; If I find a bug or I decide it’s time to upgrade to a newer version, how do I get it? Repeat the process of #&lt;strong&gt;1 (Never had product x before)&lt;/strong&gt; and getting the latest version. &lt;/p&gt;  &lt;h4&gt;&lt;strong&gt;&lt;span style="text-decoration:underline;"&gt;Problems with the Present Method of Delivery&lt;/span&gt;&lt;/strong&gt;&lt;/h4&gt;  &lt;p&gt;&lt;strong&gt;It&amp;#39;s slow.&lt;/strong&gt; How long did it take me to get all of that? Yeah, now multiply times every library I want to use.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Too many decisions.&lt;/strong&gt; I have to make way to many decisions to get the right product and right version downloaded and referenced into my project.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Dependencies may be hard to manage.&lt;/strong&gt; I may be using projects that depend on the same libraries. In the example above I am using &lt;a href="http://castleproject.org" target="_blank"&gt;Castle &lt;/a&gt;in my project. That got upgraded as well when I got the latest version of NHibernate. Now I may have to test the changes to that. What if the latest version of Castle Windsor I am using is not compatible with the latest version of NHibernate? I won’t see that issue necessarily until I try to run my code. I can try &lt;a href="http://ferventcoder.com/archive/2009/07/19/net-binding-redirects-ndash-updating-referenced-assemblies-without-recompiling-code.aspx" target="_blank"&gt;binding redirects&lt;/a&gt;, but there is no guarantee that that will work. So now I have a problem. I have to figure out what version of Castle Windsor to use so that I can use the latest version of NHibernate. And this is where dependency management is fully placed on me as a developer. I can now decide to move forward or just continue to use the old version.&lt;/p&gt;  &lt;div&gt;&lt;strong&gt;Too easy to just continue using the same version you have.&lt;/strong&gt; It&amp;#39;s way too easy to keep using the version you first downloaded and never learning about all of the awesomeness that comes with more current versions of the product.&lt;/div&gt;  &lt;div&gt;&amp;#160;&lt;/div&gt;  &lt;div&gt;&lt;/div&gt;  &lt;div&gt;&lt;/div&gt;  &lt;div&gt;Unfortunately for a lot of people, what I just mentioned with projects that have dependencies on the same things as other projects is the biggest barrier to using OSS (Open Source Software). So let’s talk about the future.&lt;/div&gt;  &lt;h4&gt;&lt;strong&gt;&lt;span style="text-decoration:underline;"&gt;The Future&lt;/span&gt;&lt;/strong&gt;&lt;/h4&gt;  &lt;p&gt;So now that we have looked at how we currently do it, how will it be in the future?&lt;/p&gt;  &lt;p&gt;Open source developers will publish their latest releases to a central repository (possibly in addition to other methods of offering releases).&amp;#160; Then everyone can get their latest releases and develop from there.&lt;/p&gt;  &lt;p&gt;Same three scenarios.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;1. Never had product x before.&lt;/strong&gt; Here’s the process.&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;Know what I’m looking for and confirm the name at the central repository &lt;/li&gt;    &lt;li&gt;open a command line &lt;/li&gt;    &lt;li&gt;type something to the effect of &lt;strong&gt;nu install nhibernate&lt;/strong&gt; &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;And I’m done. It’s all brought to me and sitting in my references folder of my project.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;2. Use the current version without upgrade.&lt;/strong&gt; This is still an option. Same as in the present described above.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;3. Upgrade.&lt;/strong&gt; Here’s the process.&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;open a command line &lt;/li&gt;    &lt;li&gt;type something to the effect of &lt;strong&gt;gem update&lt;/strong&gt; &lt;/li&gt;    &lt;li&gt;type something to the effect of &lt;strong&gt;nu install nhibernate&lt;/strong&gt; &lt;/li&gt; &lt;/ul&gt;  &lt;h4&gt;&lt;strong&gt;&lt;span style="text-decoration:underline;"&gt;What Issues Does the Future Method of Delivery Address?&lt;/span&gt;&lt;/strong&gt;&lt;/h4&gt;  &lt;p&gt;&lt;strong&gt;Speed.&lt;/strong&gt; The process is amazingly streamlined. We are talking seconds as compared to minutes of time to get something. I can now concentrate on what I want to do instead of spending all the time I was on just getting the packages I needed.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;The decision tree is reduced.&lt;/strong&gt; How many decisions did I have to make to get what I needed in the present scenario? How about the future scenario? Greatly reduced.&amp;#160; Less choices to get what I want actually gets me to a decision faster.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;I immediately see the dependency changes.&lt;/strong&gt; All of the dependencies that are required come along nicely with NHibernate. I can immediately see that it downgraded my versions of Castle Core and Dynamic Proxy2. So now I know immediately that I have a problem between Castle Windsor and NHibernate using different versions. It doesn’t solve my problems on this, but it brings it to the surface. So now I can try something like the aforementioned binding redirects.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;The process of upgrade became easier than use the current.&lt;/strong&gt; Another thing you may have noticed. It actually becomes easier to upgrade to the latest version as compared to #2 (&lt;strong&gt;Use the current version&lt;/strong&gt;). That will move people to upgrade, because people will choose the easiest path to get them on their way. And when everyone using the latest version, everyone wins.&lt;/p&gt;  &lt;h4&gt;&lt;strong&gt;&lt;span style="text-decoration:underline;"&gt;The Future Is Now&lt;/span&gt;&lt;/strong&gt;&lt;/h4&gt;  &lt;p&gt;Oh yeah, the future? It’s now. &lt;a href="http://groups.google.com/group/nu-net" target="_blank"&gt;http://groups.google.com/group/nu-net&lt;/a&gt; &lt;/p&gt;  &lt;div style="padding-bottom:0px;margin:0px;padding-left:0px;padding-right:0px;display:inline;float:none;padding-top:0px;" id="scid:5737277B-5D6D-4f48-ABFC-DD9C333F4C5D:b1315f18-80af-46cc-893e-c98d9108f752" class="wlWriterEditableSmartContent"&gt;&lt;div&gt;&lt;a href="http://www.youtube.com/watch?v=IvxAa4XURss" target="_new"&gt;&lt;img src="http://devlicio.us/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/rob_5F00_reynolds/video8a32a384f044_5F00_19915CAC.jpg" style="border-style:none;" alt="" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;  &lt;div&gt;&lt;/div&gt;  &lt;div&gt;&lt;/div&gt;  &lt;h4&gt;&lt;strong&gt;&lt;u&gt;&lt;/u&gt;&lt;/strong&gt;&lt;/h4&gt;  &lt;h4&gt;&lt;strong&gt;&lt;u&gt;Related Posts&lt;/u&gt;&lt;/strong&gt;&lt;/h4&gt;  &lt;p&gt;Before you comment about “cluttering” the ruby community, please be sure to read this (we’re with you on this):&amp;#160; &lt;a title="http://devlicio.us/blogs/rob_reynolds/archive/2010/07/19/gems-for-net-community-response.aspx" href="http://devlicio.us/blogs/rob_reynolds/archive/2010/07/19/gems-for-net-community-response.aspx" target="_blank"&gt;http://devlicio.us/blogs/rob_reynolds/archive/2010/07/19/gems-for-net-community-response.aspx&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://devlicio.us/blogs/rob_reynolds/archive/2010/07/15/gems-package-management-for-net.aspx" target="_blank"&gt;Gems - Package Management for .NET&lt;/a&gt;&amp;#160; &lt;/p&gt;  &lt;p&gt;&lt;a href="http://devlicio.us/blogs/rob_reynolds/archive/2010/07/16/how-to-gems-and-net.aspx" target="_blank"&gt;How To – Gems &amp;amp; .NET&lt;/a&gt; &amp;amp; &lt;a href="http://devlicio.us/blogs/rob_reynolds/archive/2010/07/17/how-to-gems-and-net-dependencies-references.aspx" target="_blank"&gt;How To – Gems &amp;amp; .NET - Dependencies (References)&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://devlicio.us/blogs/rob_reynolds/archive/2010/07/20/how-to-uppercut-and-gems.aspx"&gt;Walkthrough - Create Gems Even Easier With a Conventional Build (UppercuT)!&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://devlicio.us/aggbug.aspx?PostID=61235" width="1" height="1"&gt;&lt;img src="http://feeds.feedburner.com/~r/Devlicious/~4/lBCNIQa7PMc" height="1" width="1"/&gt;</description><category domain="http://devlicio.us/blogs/rob_reynolds/archive/tags/NHibernate/default.aspx">NHibernate</category><category domain="http://devlicio.us/blogs/rob_reynolds/archive/tags/RoundhousE/default.aspx">RoundhousE</category><category domain="http://devlicio.us/blogs/rob_reynolds/archive/tags/UppercuT/default.aspx">UppercuT</category><category domain="http://devlicio.us/blogs/rob_reynolds/archive/tags/.NET/default.aspx">.NET</category><category domain="http://devlicio.us/blogs/rob_reynolds/archive/tags/Gems/default.aspx">Gems</category><feedburner:origLink>http://devlicio.us/blogs/rob_reynolds/archive/2010/07/26/the-future-of-net-open-source-software-delivery.aspx</feedburner:origLink></item><item><title>Dynamically Changing Resources in a ListBox using Binding and Converters</title><link>http://feedproxy.google.com/~r/Devlicious/~3/PPbra90pVOg/dynamically-changing-resources-in-a-listbox-using-binding-and-converters.aspx</link><pubDate>Sat, 24 Jul 2010 18:51:00 GMT</pubDate><guid isPermaLink="false">40756a8b-6212-4073-9d98-6c26781577de:61200</guid><dc:creator>Derik Whittaker</dc:creator><slash:comments>7</slash:comments><description>&lt;p&gt;While working on an application targeted towards WP7 I wanted to have the application change style resource which was attached to a border element based on a value (aka a status) in my view model.&amp;nbsp; After searching around for a bit I was not able to come up w/ a complete end to end solution, only bits and pieces.&amp;nbsp; In order to help the next poor newbie I thought I would post my solution (btw, there may be a MUCH better solution than this out there).&lt;/p&gt;
&lt;p&gt;In this sample I simply created a test application based off of the Item List Template which comes out of the box with a few minor changes.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Setting up the XAML &lt;/b&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://devlicio.us/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/derik_5F00_whittaker/image_5F00_78426233.png"&gt;&lt;img style="border-bottom:0px;border-left:0px;display:inline;border-top:0px;border-right:0px;" title="image" alt="image" src="http://devlicio.us/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/derik_5F00_whittaker/image_5F00_thumb_5F00_75B93075.png" border="0" height="266" width="1028" /&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;The important item to pay attention to above is the highlighted line.&amp;nbsp; This is the line which will change the border brush via the converter based on the value in the &amp;lsquo;Color&amp;rsquo; property in my view model.&amp;nbsp; &lt;/p&gt;
&lt;p&gt;&lt;b&gt;Changes to the View model&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://devlicio.us/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/derik_5F00_whittaker/image_5F00_035BC6B1.png"&gt;&lt;img style="border-bottom:0px;border-left:0px;display:inline;border-top:0px;border-right:0px;" title="image" alt="image" src="http://devlicio.us/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/derik_5F00_whittaker/image_5F00_thumb_5F00_77C60971.png" border="0" height="133" width="324" /&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;The code above is the property I added which will allow us to trigger the border brush to determine what style to use &lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Creating the Converter&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://devlicio.us/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/derik_5F00_whittaker/image_5F00_36B78A0D.png"&gt;&lt;img style="border-bottom:0px;border-left:0px;display:inline;border-top:0px;border-right:0px;" title="image" alt="image" src="http://devlicio.us/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/derik_5F00_whittaker/image_5F00_thumb_5F00_1E646FF2.png" border="0" height="543" width="1028" /&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;The above is a pretty standard converter which uses the IValueConverter interface.&amp;nbsp; The Part in here it pay attention to is how I am grabbing the brush resources out of the App.xaml file (there may be a better way to do this, but i could not find this).&amp;nbsp; What this code does is basically determines which loaded resource to return based on the value passed into the converter&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Registering the Converter&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://devlicio.us/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/derik_5F00_whittaker/image_5F00_3EDB89D7.png"&gt;&lt;img style="border-bottom:0px;border-left:0px;display:inline;border-top:0px;border-right:0px;" title="image" alt="image" src="http://devlicio.us/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/derik_5F00_whittaker/image_5F00_thumb_5F00_2BBA5D2B.png" border="0" height="56" width="1028" /&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;Once you create your converter class (see above) you do need to register it in your app.xaml class.&amp;nbsp; Do do this simply follow the logic above.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Creating the Brush Resources&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://devlicio.us/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/derik_5F00_whittaker/image_5F00_69D377DC.png"&gt;&lt;img style="border-bottom:0px;border-left:0px;display:inline;border-top:0px;border-right:0px;" title="image" alt="image" src="http://devlicio.us/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/derik_5F00_whittaker/image_5F00_thumb_5F00_40E862D3.png" border="0" height="158" width="1028" /&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;The code above will create the various resources needed to allow us to change the color of our item in XAML&lt;/p&gt;
&lt;p&gt;&lt;b&gt;&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Populating the &amp;lsquo;live data&amp;rsquo;&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://devlicio.us/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/derik_5F00_whittaker/image_5F00_6F1238C0.png"&gt;&lt;img style="border-bottom:0px;border-left:0px;display:inline;border-top:0px;border-right:0px;" title="image" alt="image" src="http://devlicio.us/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/derik_5F00_whittaker/image_5F00_thumb_5F00_46FF89A1.png" border="0" height="406" width="644" /&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;The default template for the Item List project has all the data hard wired in the MainViewModel class.&amp;nbsp; I simply added the above logic to populate the color properties.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;After you put all the above together you get&amp;hellip;.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://devlicio.us/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/derik_5F00_whittaker/image_5F00_208D8089.png"&gt;&lt;img style="border-bottom:0px;border-left:0px;display:inline;border-top:0px;border-right:0px;" title="image" alt="image" src="http://devlicio.us/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/derik_5F00_whittaker/image_5F00_thumb_5F00_405BE444.png" border="0" height="772" width="422" /&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;Notice how the little colors next to each item change, this is our doing :) Now of course this is a simple example, but it does go to prove how you can accomplish this.&lt;/p&gt;
&lt;p&gt;Till next time,&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://devlicio.us/aggbug.aspx?PostID=61200" width="1" height="1"&gt;&lt;img src="http://feeds.feedburner.com/~r/Devlicious/~4/PPbra90pVOg" height="1" width="1"/&gt;</description><category domain="http://devlicio.us/blogs/derik_whittaker/archive/tags/WP7/default.aspx">WP7</category><category domain="http://devlicio.us/blogs/derik_whittaker/archive/tags/Silverlight/default.aspx">Silverlight</category><feedburner:origLink>http://devlicio.us/blogs/derik_whittaker/archive/2010/07/24/dynamically-changing-resources-in-a-listbox-using-binding-and-converters.aspx</feedburner:origLink></item><item><title>Semi final release – Windsor 2.5 beta 2 (now with Silverlight support)</title><link>http://feedproxy.google.com/~r/Devlicious/~3/eiFVmOQvR50/semi-final-release-windsor-2-5-beta-2-now-with-silverlight-support.aspx</link><pubDate>Wed, 21 Jul 2010 00:21:42 GMT</pubDate><guid isPermaLink="false">40756a8b-6212-4073-9d98-6c26781577de:61156</guid><dc:creator>Krzysztof Koźmic</dc:creator><slash:comments>3</slash:comments><description>&lt;p&gt;A bit later than expected (ah, work) &lt;a href="https://sourceforge.net/projects/castleproject/files/InversionOfControl/2.5.0-beta2/Castle.Windsor.2.5.beta2.zip/download"&gt;I published beta 2 of Windsor 2.5 today&lt;/a&gt;. The release has the following changes as compared to beta 1.&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;Silverlight version (for Silverlight 3 and Silverlight 4) is now included in the package. &lt;/li&gt;    &lt;li&gt;Synchronize Facility is now included in the package (.NET only) &lt;/li&gt;    &lt;li&gt;The following code changes and fixes were made (incl. one breaking change)      &lt;p&gt;- added support for selecting components based on custom attributes and their properties. See Component.HasAttribute&amp;lt;T&amp;gt;() methods &lt;/p&gt;      &lt;p&gt;- added WithService.DefaultInterface() to fluent API. It matches Foo to IFoo, SuperFooExtended to IFoo and IFooExtended etc. If you know how DefaultConvention works in StructureMap, this is pretty similar&lt;/p&gt;      &lt;p&gt;- added support for CastleComponentAttribute in fluent API. Also added helper filter method Component.IsCastleComponent &lt;/p&gt;      &lt;p&gt;- added ability to specify interceptors selector as a service, not just as instance&lt;/p&gt;      &lt;p&gt;- added ability to specify proxy hook in fluent API&lt;/p&gt;      &lt;p&gt;- indexers on IKernel are now obsolete. &lt;/p&gt;      &lt;p&gt;- added WithAppConfig() method to logging facility to point to logging configuration in AppDomain&amp;#39;s config file (web.config or app.config) &lt;/p&gt;      &lt;p&gt;- &lt;strong&gt;BREAKING CHANGE:&lt;/strong&gt; Restructured lifecycle concerns - introduced ICommissionConcern and IDecommissionConcern and favors them over old enum driven style. &lt;/p&gt;      &lt;p&gt;- Fixed how contextual arguments are handled. Null is no longer considered a valid value (That would cause an exception later on, now it&amp;#39;s ignored). &lt;/p&gt;      &lt;p&gt;- Changed method DeferredStart on StartableFacility. It now does not take a bool parameter. A DeferredTryStart() method was introduced instead.&lt;/p&gt;      &lt;p&gt;&amp;#160;&lt;/p&gt;   &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;This is probably the last pre-release for 2.5 and if no critical issues are found, we’ll release final release in 2, 3 weeks. Go grab the bits, see if it works for you and if it does not report back. I’m also looking for people who want to contribute sample applications for the final release. Ping me if you’d like to contribute to that.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://devlicio.us/aggbug.aspx?PostID=61156" width="1" height="1"&gt;&lt;img src="http://feeds.feedburner.com/~r/Devlicious/~4/eiFVmOQvR50" height="1" width="1"/&gt;</description><category domain="http://devlicio.us/blogs/krzysztof_kozmic/archive/tags/Castle/default.aspx">Castle</category><category domain="http://devlicio.us/blogs/krzysztof_kozmic/archive/tags/IoC/default.aspx">IoC</category><feedburner:origLink>http://devlicio.us/blogs/krzysztof_kozmic/archive/2010/07/21/semi-final-release-windsor-2-5-beta-2-now-with-silverlight-support.aspx</feedburner:origLink></item><item><title>Writing plug-ins for ReSharper: Part 2 of N</title><link>http://feedproxy.google.com/~r/Devlicious/~3/RqbSZbk6u5I/writing-plug-ins-for-resharper-part-2-of-n.aspx</link><pubDate>Tue, 20 Jul 2010 21:02:00 GMT</pubDate><guid isPermaLink="false">40756a8b-6212-4073-9d98-6c26781577de:61155</guid><dc:creator>Hadi Hariri</dc:creator><slash:comments>1</slash:comments><description>&lt;p&gt;[Finally I&amp;rsquo;ve managed to get the second part of the post on plug-ins. Sorry for the delay to everyone who was waiting. Appreciate your patience.&amp;nbsp; And now I&amp;rsquo;ll resume my holidays!]&lt;/p&gt;
&lt;p&gt;In the &lt;a href="http://devlicio.us/blogs/hadi_hariri/archive/2010/01/12/writing-plug-ins-for-resharper-part-1-of-undefined.aspx"&gt;previous part of this series&lt;/a&gt;, we saw the basics of how to create a plug-in for &lt;a href="http://www.jetbrains.com/resharper"&gt;ReSharper&lt;/a&gt;, install it and run it. We created a context action that would allow us to mark a public method as virtual (where applicable). However, this was done as an explicit action by the user, as such, you didn&amp;rsquo;t get any kind of hint or suggestion to do this. What we want to do now is make this a hint, so that highlighting appears under methods that could be made virtual. In this part we are going to expand on the same plug-in and convert it into a &lt;i&gt;QuickFix&lt;/i&gt;. &lt;/p&gt;
&lt;h3&gt;What is a &lt;i&gt;QuickFix?&lt;/i&gt;&lt;/h3&gt;
&lt;p&gt;Have you seen the little squiggly lines that appear in Visual Studio? &lt;/p&gt;
&lt;p&gt;&lt;a href="http://devlicio.us/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/hadi_5F00_hariri/image_5F00_18E8B29B.png"&gt;&lt;img style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" title="image" alt="image" src="http://devlicio.us/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/hadi_5F00_hariri/image_5F00_thumb_5F00_6EB904B2.png" border="0" height="162" width="326" /&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;They usually indicate a Suggestion (field can be made read-only), Warning (possible null reference) or Error. ReSharper analyzes and can detect potential issues in the code (similar to what static checker of Code Contracts does). These are known as Highlights and they are related to QuickFixes in that usually a highlight has an &lt;b&gt;QuickFix&lt;/b&gt; associated to it, which invokes a context action. This is usually done by placing the cursor on top of the highlighting and press Alt+Enter&lt;/p&gt;
&lt;p&gt;&lt;a href="http://devlicio.us/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/hadi_5F00_hariri/image_5F00_76ED2A49.png"&gt;&lt;img style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" title="image" alt="image" src="http://devlicio.us/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/hadi_5F00_hariri/image_5F00_thumb_5F00_09C1ADF4.png" border="0" height="116" width="403" /&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;h3&gt;Highlighting Daemons&lt;/h3&gt;
&lt;p&gt;In the gutter of the Visual Studio editor (right-side), ReSharper displays a series of warnings, errors and hints, which indicate potential issues on a specific file. These issues are detected by background processes known as Daemons. Since what we are looking for is for ReSharper to warn us of existing methods that could be made virtual, what we need to do is somehow hook into these daemons. &lt;/p&gt;
&lt;p&gt;&lt;a href="http://devlicio.us/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/hadi_5F00_hariri/image_5F00_404F5938.png"&gt;&lt;img style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;margin-left:0px;border-left-width:0px;margin-right:0px;" title="image" alt="image" src="http://devlicio.us/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/hadi_5F00_hariri/image_5F00_thumb_5F00_37131DF7.png" border="0" height="244" width="65" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;h3&gt;Step by Step Guide&lt;/h3&gt;
&lt;p&gt;The Daemons in ReSharper use the Visitor pattern to use act on elements, be it code, files, etc. The first step is to implement an &lt;b&gt;IDaemonStage &lt;/b&gt;interface, which hold metadata about our daemon stage at at the same time acts as a factory for the actual process we are implementing. &lt;/p&gt;
&lt;div style="padding-bottom:0px;margin:0px;padding-left:0px;padding-right:0px;display:inline;float:none;padding-top:0px;" id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:862f1f96-7fa7-42fd-b72d-f48172f17579" class="wlWriterEditableSmartContent"&gt;
&lt;div class="le-pavsc-container"&gt;
&lt;div style="background-color:#000000;overflow:auto;padding:2px 5px;white-space:nowrap;"&gt;&lt;span style="color:#ffffff;"&gt;[&lt;/span&gt;&lt;span style="color:#ffc66d;"&gt;DaemonStage&lt;/span&gt;&lt;span style="color:#ffffff;"&gt;(StagesBefore = &lt;/span&gt;&lt;span style="color:#cc7832;"&gt;new&lt;/span&gt;&lt;span style="color:#ffffff;"&gt;[]&amp;nbsp;&amp;nbsp;{ &lt;/span&gt;&lt;span style="color:#cc7832;"&gt;typeof&lt;/span&gt;&lt;span style="color:#ffffff;"&gt;(&lt;/span&gt;&lt;span style="color:#ffc66d;"&gt;LanguageSpecificDaemonStage&lt;/span&gt;&lt;span style="color:#ffffff;"&gt;) })]&lt;/span&gt;&lt;br /&gt; &amp;nbsp;&lt;span style="color:#ffffff;"&gt;&lt;/span&gt;&lt;span style="color:#cc7832;"&gt;public&lt;/span&gt;&lt;span style="color:#ffffff;"&gt; &lt;/span&gt;&lt;span style="color:#cc7832;"&gt;class&lt;/span&gt;&lt;span style="color:#ffffff;"&gt; &lt;/span&gt;&lt;span style="color:#ffc66d;"&gt;MakeMethodVirtualDaemonStage&lt;/span&gt;&lt;span style="color:#ffffff;"&gt;: &lt;/span&gt;&lt;span style="color:#6897bb;"&gt;IDaemonStage&lt;/span&gt;&lt;br /&gt; &amp;nbsp;&lt;span style="color:#ffffff;"&gt;{&lt;/span&gt;&lt;br /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color:#ffffff;"&gt;&lt;/span&gt;&lt;span style="color:#cc7832;"&gt;public&lt;/span&gt;&lt;span style="color:#ffffff;"&gt; &lt;/span&gt;&lt;span style="color:#6897bb;"&gt;IDaemonStageProcess&lt;/span&gt;&lt;span style="color:#ffffff;"&gt; CreateProcess(&lt;/span&gt;&lt;span style="color:#6897bb;"&gt;IDaemonProcess&lt;/span&gt;&lt;span style="color:#ffffff;"&gt; process, &lt;/span&gt;&lt;span style="color:#6897bb;"&gt;DaemonProcessKind&lt;/span&gt;&lt;span style="color:#ffffff;"&gt; processKind)&lt;/span&gt;&lt;br /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color:#ffffff;"&gt;{&lt;/span&gt;&lt;br /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color:#ffffff;"&gt;&lt;/span&gt;&lt;span style="color:#cc7832;"&gt;return&lt;/span&gt;&lt;span style="color:#ffffff;"&gt; &lt;/span&gt;&lt;span style="color:#cc7832;"&gt;new&lt;/span&gt;&lt;span style="color:#ffffff;"&gt; &lt;/span&gt;&lt;span style="color:#ffc66d;"&gt;MakeMethodVirtualDaemonStageProcess&lt;/span&gt;&lt;span style="color:#ffffff;"&gt;(process);&lt;/span&gt;&lt;br /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color:#ffffff;"&gt;}&lt;/span&gt;&lt;br /&gt; &lt;br /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color:#ffffff;"&gt;&lt;/span&gt;&lt;span style="color:#cc7832;"&gt;public&lt;/span&gt;&lt;span style="color:#ffffff;"&gt; &lt;/span&gt;&lt;span style="color:#6897bb;"&gt;ErrorStripeRequest&lt;/span&gt;&lt;span style="color:#ffffff;"&gt; NeedsErrorStripe(&lt;/span&gt;&lt;span style="color:#6897bb;"&gt;IProjectFile&lt;/span&gt;&lt;span style="color:#ffffff;"&gt; projectFile)&lt;/span&gt;&lt;br /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color:#ffffff;"&gt;{&lt;/span&gt;&lt;br /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color:#ffffff;"&gt;&lt;/span&gt;&lt;span style="color:#cc7832;"&gt;return&lt;/span&gt;&lt;span style="color:#ffffff;"&gt; &lt;/span&gt;&lt;span style="color:#6897bb;"&gt;ErrorStripeRequest&lt;/span&gt;&lt;span style="color:#ffffff;"&gt;.STRIPE_AND_ERRORS;&lt;/span&gt;&lt;br /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color:#ffffff;"&gt;}&lt;/span&gt;&lt;br /&gt; &amp;nbsp;&lt;span style="color:#ffffff;"&gt;}&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;&lt;b&gt;&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;There are two main methods to implement. The &lt;b&gt;CreateProcess &lt;/b&gt;is what creates the actual process for us and the &lt;b&gt;NeedsErrorStrip &lt;/b&gt;which indicates whether this daemon uses the gutter to display strips. The &lt;b&gt;DaemonProcessKind&lt;/b&gt; parameter passed into the first method helps us discriminate on when this process should be executed, i.e. only during checking of visible (current) document, during solution wide analysis, etc.&lt;/p&gt;
&lt;p&gt;The next step is to implement the process via the &lt;b&gt;IDaemonStageProcess &lt;/b&gt;interface:&lt;/p&gt;
&lt;div style="padding-bottom:0px;margin:0px;padding-left:0px;padding-right:0px;display:inline;float:none;padding-top:0px;" id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:41371a43-10bb-4def-b308-70fb9a66784d" class="wlWriterEditableSmartContent"&gt;
&lt;div class="le-pavsc-container"&gt;
&lt;div style="background-color:#000000;overflow:auto;padding:2px 5px;white-space:nowrap;"&gt;&amp;nbsp;&amp;nbsp;&lt;span style="color:#ffffff;"&gt;&lt;/span&gt;&lt;span style="color:#cc7832;"&gt;public&lt;/span&gt;&lt;span style="color:#ffffff;"&gt; &lt;/span&gt;&lt;span style="color:#cc7832;"&gt;class&lt;/span&gt;&lt;span style="color:#ffffff;"&gt; &lt;/span&gt;&lt;span style="color:#ffc66d;"&gt;MakeMethodVirtualDaemonStageProcess&lt;/span&gt;&lt;span style="color:#ffffff;"&gt; : &lt;/span&gt;&lt;span style="color:#6897bb;"&gt;IDaemonStageProcess&lt;/span&gt;&lt;br /&gt; &amp;nbsp;&amp;nbsp;&lt;span style="color:#ffffff;"&gt;{&lt;/span&gt;&lt;br /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color:#ffffff;"&gt;&lt;/span&gt;&lt;span style="color:#cc7832;"&gt;readonly&lt;/span&gt;&lt;span style="color:#ffffff;"&gt; &lt;/span&gt;&lt;span style="color:#6897bb;"&gt;IDaemonProcess&lt;/span&gt;&lt;span style="color:#ffffff;"&gt; _process;&lt;/span&gt;&lt;br /&gt; &lt;br /&gt; &lt;br /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color:#ffffff;"&gt;&lt;/span&gt;&lt;span style="color:#cc7832;"&gt;public&lt;/span&gt;&lt;span style="color:#ffffff;"&gt; MakeMethodVirtualDaemonStageProcess(&lt;/span&gt;&lt;span style="color:#6897bb;"&gt;IDaemonProcess&lt;/span&gt;&lt;span style="color:#ffffff;"&gt; process)&lt;/span&gt;&lt;br /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color:#ffffff;"&gt;{&lt;/span&gt;&lt;br /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color:#ffffff;"&gt;_process = process;&lt;/span&gt;&lt;br /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color:#ffffff;"&gt;&lt;/span&gt;&lt;br /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color:#ffffff;"&gt;}&lt;/span&gt;&lt;br /&gt; &lt;br /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color:#ffffff;"&gt;&lt;/span&gt;&lt;span style="color:#cc7832;"&gt;public&lt;/span&gt;&lt;span style="color:#ffffff;"&gt; &lt;/span&gt;&lt;span style="color:#cc7832;"&gt;void&lt;/span&gt;&lt;span style="color:#ffffff;"&gt; Execute(&lt;/span&gt;&lt;span style="color:#6897bb;"&gt;Action&lt;/span&gt;&lt;span style="color:#ffffff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#ffc66d;"&gt;DaemonStageResult&lt;/span&gt;&lt;span style="color:#ffffff;"&gt;&amp;gt; commiter)&lt;/span&gt;&lt;br /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color:#ffffff;"&gt;{&lt;/span&gt;&lt;br /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color:#ffffff;"&gt;&lt;/span&gt;&lt;span style="color:#cc7832;"&gt;if&lt;/span&gt;&lt;span style="color:#ffffff;"&gt; (_process.InterruptFlag)&lt;/span&gt;&lt;br /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color:#ffffff;"&gt;{&lt;/span&gt;&lt;br /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color:#ffffff;"&gt;&lt;/span&gt;&lt;span style="color:#cc7832;"&gt;return&lt;/span&gt;&lt;span style="color:#ffffff;"&gt;;&lt;/span&gt;&lt;br /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color:#ffffff;"&gt;}&lt;/span&gt;&lt;br /&gt; &lt;br /&gt; &lt;br /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color:#ffffff;"&gt;&lt;/span&gt;&lt;span style="color:#cc7832;"&gt;var&lt;/span&gt;&lt;span style="color:#ffffff;"&gt; file = _process.ProjectFile.GetPsiFile(&lt;/span&gt;&lt;span style="color:#ffc66d;"&gt;CSharpLanguageService&lt;/span&gt;&lt;span style="color:#ffffff;"&gt;.CSHARP) &lt;/span&gt;&lt;span style="color:#cc7832;"&gt;as&lt;/span&gt;&lt;span style="color:#ffffff;"&gt; &lt;/span&gt;&lt;span style="color:#6897bb;"&gt;ICSharpFile&lt;/span&gt;&lt;span style="color:#ffffff;"&gt;;&lt;/span&gt;&lt;br /&gt; &lt;br /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color:#ffffff;"&gt;&lt;/span&gt;&lt;span style="color:#cc7832;"&gt;if&lt;/span&gt;&lt;span style="color:#ffffff;"&gt; (file != &lt;/span&gt;&lt;span style="color:#cc7832;"&gt;null&lt;/span&gt;&lt;span style="color:#ffffff;"&gt;)&lt;/span&gt;&lt;br /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color:#ffffff;"&gt;{&lt;/span&gt;&lt;br /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color:#ffffff;"&gt;&lt;/span&gt;&lt;span style="color:#cc7832;"&gt;var&lt;/span&gt;&lt;span style="color:#ffffff;"&gt; highlights = &lt;/span&gt;&lt;span style="color:#cc7832;"&gt;new&lt;/span&gt;&lt;span style="color:#ffffff;"&gt; &lt;/span&gt;&lt;span style="color:#ffc66d;"&gt;List&lt;/span&gt;&lt;span style="color:#ffffff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#6897bb;"&gt;HighlightingInfo&lt;/span&gt;&lt;span style="color:#ffffff;"&gt;&amp;gt;();&lt;/span&gt;&lt;br /&gt; &lt;br /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color:#ffffff;"&gt;&lt;/span&gt;&lt;span style="color:#cc7832;"&gt;var&lt;/span&gt;&lt;span style="color:#ffffff;"&gt; processor = &lt;/span&gt;&lt;span style="color:#cc7832;"&gt;new&lt;/span&gt;&lt;span style="color:#ffffff;"&gt; &lt;/span&gt;&lt;span style="color:#ffc66d;"&gt;RecursiveElementProcessor&lt;/span&gt;&lt;span style="color:#ffffff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#6897bb;"&gt;IMethodDeclaration&lt;/span&gt;&lt;span style="color:#ffffff;"&gt;&amp;gt;(declaration =&amp;gt;&lt;/span&gt;&lt;br /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color:#ffffff;"&gt;{&lt;/span&gt;&lt;br /&gt; &lt;br /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color:#ffffff;"&gt;&lt;/span&gt;&lt;span style="color:#cc7832;"&gt;var&lt;/span&gt;&lt;span style="color:#ffffff;"&gt; accessRights = declaration.GetAccessRights();&lt;/span&gt;&lt;br /&gt; &lt;br /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color:#ffffff;"&gt;&lt;/span&gt;&lt;span style="color:#cc7832;"&gt;if&lt;/span&gt;&lt;span style="color:#ffffff;"&gt; (accessRights == &lt;/span&gt;&lt;span style="color:#6897bb;"&gt;AccessRights&lt;/span&gt;&lt;span style="color:#ffffff;"&gt;.PUBLIC &amp;amp;&amp;amp; !declaration.IsStatic &amp;amp;&amp;amp; !declaration.IsVirtual &amp;amp;&amp;amp;&lt;/span&gt;&lt;br /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color:#ffffff;"&gt;!declaration.IsOverride)&lt;/span&gt;&lt;br /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color:#ffffff;"&gt;{&lt;/span&gt;&lt;br /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color:#ffffff;"&gt;&lt;/span&gt;&lt;span style="color:#cc7832;"&gt;var&lt;/span&gt;&lt;span style="color:#ffffff;"&gt; docRange = declaration.GetNameDocumentRange();&lt;/span&gt;&lt;br /&gt; &lt;br /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color:#ffffff;"&gt;highlights.Add(&lt;/span&gt;&lt;span style="color:#cc7832;"&gt;new&lt;/span&gt;&lt;span style="color:#ffffff;"&gt; &lt;/span&gt;&lt;span style="color:#6897bb;"&gt;HighlightingInfo&lt;/span&gt;&lt;span style="color:#ffffff;"&gt;(docRange, &lt;/span&gt;&lt;span style="color:#cc7832;"&gt;new&lt;/span&gt;&lt;span style="color:#ffffff;"&gt; &lt;/span&gt;&lt;span style="color:#ffc66d;"&gt;MakeMethodVirtualSuggestion&lt;/span&gt;&lt;span style="color:#ffffff;"&gt;(declaration)));&lt;/span&gt;&lt;br /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color:#ffffff;"&gt;}&lt;/span&gt;&lt;br /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color:#ffffff;"&gt;});&lt;/span&gt;&lt;br /&gt; &lt;span style="color:#ffffff;"&gt;&lt;/span&gt;&lt;br /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color:#ffffff;"&gt;file.ProcessDescendants(processor);&lt;/span&gt;&lt;br /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color:#ffffff;"&gt;&lt;/span&gt;&lt;br /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color:#ffffff;"&gt;commiter(&lt;/span&gt;&lt;span style="color:#cc7832;"&gt;new&lt;/span&gt;&lt;span style="color:#ffffff;"&gt; &lt;/span&gt;&lt;span style="color:#ffc66d;"&gt;DaemonStageResult&lt;/span&gt;&lt;span style="color:#ffffff;"&gt;(highlights));&lt;/span&gt;&lt;br /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color:#ffffff;"&gt;}&lt;/span&gt;&lt;br /&gt; &lt;br /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color:#ffffff;"&gt;}&lt;/span&gt;&lt;br /&gt; &lt;br /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color:#ffffff;"&gt;&lt;/span&gt;&lt;br /&gt; &amp;nbsp;&amp;nbsp;&lt;span style="color:#ffffff;"&gt;}&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;The main meat of this class is in the &lt;b&gt;Execute &lt;/b&gt;method. We first check to make sure that we&amp;rsquo;ve not received an interruption (Interrupt Flag raised) due to some external action. Next step is to get access to the current file (remember that we are visiting the entire visible document, not just a specific method). Having the file, we can now create a &lt;b&gt;RecusiveElementProcessor*&lt;/b&gt; to perform a tree walk of the AST and perform the specific action on each element. The action to perform is declared as the lambda expression. Since we&amp;rsquo;re interested in the method declaration, the type is &lt;b&gt;IMethodDeclaration&lt;/b&gt; (there are many others). If we look at the expression, we can see that it&amp;rsquo;s pretty much the same as that of &lt;a href="http://hadihariri.com/blogengine/post/2010/01/12/Writing-plug-ins-for-ReSharper-Part-1-of-Undefined.aspx"&gt;Part 1&lt;/a&gt;, the only difference is that we add the results to the highlighting variable. &lt;/p&gt;
&lt;p&gt;The &lt;b&gt;HighlightingInfo &lt;/b&gt;class has a parameter which can be a Suggestion, Warning or Error, as explained previously. Since in our case we need a suggestion, we pass in the &lt;b&gt;MakeMethodVirtualSuggestion&lt;/b&gt;:&lt;/p&gt;
&lt;div style="padding-bottom:0px;margin:0px;padding-left:0px;padding-right:0px;display:inline;float:none;padding-top:0px;" id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:781a1c96-7177-497a-94aa-8aca6403e14a" class="wlWriterEditableSmartContent"&gt;
&lt;div class="le-pavsc-container"&gt;
&lt;div style="background-color:#000000;overflow:auto;padding:2px 5px;white-space:nowrap;"&gt;&lt;span style="color:#ffffff;"&gt;[&lt;/span&gt;&lt;span style="color:#ffc66d;"&gt;StaticSeverityHighlighting&lt;/span&gt;&lt;span style="color:#ffffff;"&gt;(&lt;/span&gt;&lt;span style="color:#6897bb;"&gt;Severity&lt;/span&gt;&lt;span style="color:#ffffff;"&gt;.SUGGESTION)]&lt;/span&gt;&lt;br /&gt; &amp;nbsp;&lt;span style="color:#ffffff;"&gt;&lt;/span&gt;&lt;span style="color:#cc7832;"&gt;public&lt;/span&gt;&lt;span style="color:#ffffff;"&gt; &lt;/span&gt;&lt;span style="color:#cc7832;"&gt;class&lt;/span&gt;&lt;span style="color:#ffffff;"&gt; &lt;/span&gt;&lt;span style="color:#ffc66d;"&gt;MakeMethodVirtualSuggestion&lt;/span&gt;&lt;span style="color:#ffffff;"&gt; : &lt;/span&gt;&lt;span style="color:#ffc66d;"&gt;CSharpHighlightingBase&lt;/span&gt;&lt;span style="color:#ffffff;"&gt;, &lt;/span&gt;&lt;span style="color:#6897bb;"&gt;IHighlighting&lt;/span&gt;&lt;br /&gt; &amp;nbsp;&lt;span style="color:#ffffff;"&gt;{&lt;/span&gt;&lt;br /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color:#ffffff;"&gt;&lt;/span&gt;&lt;span style="color:#cc7832;"&gt;public&lt;/span&gt;&lt;span style="color:#ffffff;"&gt; &lt;/span&gt;&lt;span style="color:#6897bb;"&gt;ICSharpTypeMemberDeclaration&lt;/span&gt;&lt;span style="color:#ffffff;"&gt; Declaration { &lt;/span&gt;&lt;span style="color:#cc7832;"&gt;get&lt;/span&gt;&lt;span style="color:#ffffff;"&gt;; &lt;/span&gt;&lt;span style="color:#cc7832;"&gt;private&lt;/span&gt;&lt;span style="color:#ffffff;"&gt; &lt;/span&gt;&lt;span style="color:#cc7832;"&gt;set&lt;/span&gt;&lt;span style="color:#ffffff;"&gt;; }&lt;/span&gt;&lt;br /&gt; &lt;br /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color:#ffffff;"&gt;&lt;/span&gt;&lt;span style="color:#cc7832;"&gt;public&lt;/span&gt;&lt;span style="color:#ffffff;"&gt; MakeMethodVirtualSuggestion(&lt;/span&gt;&lt;span style="color:#6897bb;"&gt;ICSharpTypeMemberDeclaration&lt;/span&gt;&lt;span style="color:#ffffff;"&gt; memberDeclaration)&lt;/span&gt;&lt;br /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color:#ffffff;"&gt;{&lt;/span&gt;&lt;br /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color:#ffffff;"&gt;Declaration = memberDeclaration;&lt;/span&gt;&lt;br /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color:#ffffff;"&gt;}&lt;/span&gt;&lt;br /&gt; &lt;br /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color:#ffffff;"&gt;&lt;/span&gt;&lt;span style="color:#cc7832;"&gt;public&lt;/span&gt;&lt;span style="color:#ffffff;"&gt; &lt;/span&gt;&lt;span style="color:#cc7832;"&gt;string&lt;/span&gt;&lt;span style="color:#ffffff;"&gt; ToolTip&lt;/span&gt;&lt;br /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color:#ffffff;"&gt;{&lt;/span&gt;&lt;br /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color:#ffffff;"&gt;&lt;/span&gt;&lt;span style="color:#cc7832;"&gt;get&lt;/span&gt;&lt;span style="color:#ffffff;"&gt; { &lt;/span&gt;&lt;span style="color:#cc7832;"&gt;return&lt;/span&gt;&lt;span style="color:#ffffff;"&gt; &lt;/span&gt;&lt;span style="color:#a5c25c;"&gt;&amp;quot;Method could be marked as virtual&amp;quot;&lt;/span&gt;&lt;span style="color:#ffffff;"&gt;; }&lt;/span&gt;&lt;br /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color:#ffffff;"&gt;}&lt;/span&gt;&lt;br /&gt; &lt;br /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color:#ffffff;"&gt;&lt;/span&gt;&lt;span style="color:#cc7832;"&gt;public&lt;/span&gt;&lt;span style="color:#ffffff;"&gt; &lt;/span&gt;&lt;span style="color:#cc7832;"&gt;string&lt;/span&gt;&lt;span style="color:#ffffff;"&gt; ErrorStripeToolTip&lt;/span&gt;&lt;br /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color:#ffffff;"&gt;{&lt;/span&gt;&lt;br /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color:#ffffff;"&gt;&lt;/span&gt;&lt;span style="color:#cc7832;"&gt;get&lt;/span&gt;&lt;span style="color:#ffffff;"&gt; { &lt;/span&gt;&lt;span style="color:#cc7832;"&gt;return&lt;/span&gt;&lt;span style="color:#ffffff;"&gt; ToolTip; }&lt;/span&gt;&lt;br /&gt; &lt;br /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color:#ffffff;"&gt;}&lt;/span&gt;&lt;br /&gt; &lt;br /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color:#ffffff;"&gt;&lt;/span&gt;&lt;span style="color:#cc7832;"&gt;public&lt;/span&gt;&lt;span style="color:#ffffff;"&gt; &lt;/span&gt;&lt;span style="color:#cc7832;"&gt;override&lt;/span&gt;&lt;span style="color:#ffffff;"&gt; &lt;/span&gt;&lt;span style="color:#cc7832;"&gt;bool&lt;/span&gt;&lt;span style="color:#ffffff;"&gt; IsValid()&lt;/span&gt;&lt;br /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color:#ffffff;"&gt;{&lt;/span&gt;&lt;br /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color:#ffffff;"&gt;&lt;/span&gt;&lt;span style="color:#cc7832;"&gt;return&lt;/span&gt;&lt;span style="color:#ffffff;"&gt; Declaration.IsValid();&lt;/span&gt;&lt;br /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color:#ffffff;"&gt;}&lt;/span&gt;&lt;br /&gt; &lt;br /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color:#ffffff;"&gt;&lt;/span&gt;&lt;span style="color:#cc7832;"&gt;public&lt;/span&gt;&lt;span style="color:#ffffff;"&gt; &lt;/span&gt;&lt;span style="color:#cc7832;"&gt;int&lt;/span&gt;&lt;span style="color:#ffffff;"&gt; NavigationOffsetPatch&lt;/span&gt;&lt;br /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color:#ffffff;"&gt;{&lt;/span&gt;&lt;br /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color:#ffffff;"&gt;&lt;/span&gt;&lt;span style="color:#cc7832;"&gt;get&lt;/span&gt;&lt;span style="color:#ffffff;"&gt; { &lt;/span&gt;&lt;span style="color:#cc7832;"&gt;return&lt;/span&gt;&lt;span style="color:#ffffff;"&gt; &lt;/span&gt;&lt;span style="color:#6897bb;"&gt;0&lt;/span&gt;&lt;span style="color:#ffffff;"&gt;; }&lt;/span&gt;&lt;br /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color:#ffffff;"&gt;}&lt;/span&gt;&lt;br /&gt; &amp;nbsp;&lt;span style="color:#ffffff;"&gt;}&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;This class is pretty simple. The main property to define is the &lt;b&gt;ToolTip&lt;/b&gt;, which is the text that will show when we hover of the highlighting. The &lt;b&gt;ErrorStripeToolTip&lt;/b&gt; is what&amp;rsquo;s displayed in the right-hand side gutter. Finally the Attribute &lt;b&gt;StaticSeverityHighlighting &lt;/b&gt;is to indicate what type of tip it is (Warning, Error, etc.). &lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;[*Note: In this case, the operation we want to perform is very simple. If we want a more complex scenario where we need to do some processing before and after each element is visited or have a more fine-grained control, we can implement the &lt;b&gt;IRecurisveElementProcessor&lt;/b&gt;. I&amp;rsquo;ll cover this in another post].&amp;nbsp; &lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;To recap, right now we would have everything place to display highlighting when a method that could be made virtual is encountered. The only remaining part is to now be able to apply a &lt;b&gt;QuickFix&lt;/b&gt;. This is in many ways similar to the ContextAction we saw in &lt;a href="http://hadihariri.com/blogengine/post/2010/01/12/Writing-plug-ins-for-ReSharper-Part-1-of-Undefined.aspx"&gt;Part 1&lt;/a&gt;:&lt;/p&gt;
&lt;div style="padding-bottom:0px;margin:0px;padding-left:0px;padding-right:0px;display:inline;float:none;padding-top:0px;" id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:9e844366-abb3-4116-887f-dfcbfb826cf0" class="wlWriterEditableSmartContent"&gt;
&lt;div class="le-pavsc-container"&gt;
&lt;div style="background-color:#000000;overflow:auto;padding:2px 5px;white-space:nowrap;"&gt;&lt;span style="color:#ffffff;"&gt;[&lt;/span&gt;&lt;span style="color:#ffc66d;"&gt;QuickFix&lt;/span&gt;&lt;span style="color:#ffffff;"&gt;]&lt;/span&gt;&lt;br /&gt; &lt;span style="color:#ffffff;"&gt;&lt;/span&gt;&lt;span style="color:#cc7832;"&gt;public&lt;/span&gt;&lt;span style="color:#ffffff;"&gt; &lt;/span&gt;&lt;span style="color:#cc7832;"&gt;class&lt;/span&gt;&lt;span style="color:#ffffff;"&gt; &lt;/span&gt;&lt;span style="color:#ffc66d;"&gt;MakeMethodVirtualQuickFix&lt;/span&gt;&lt;span style="color:#ffffff;"&gt; : &lt;/span&gt;&lt;span style="color:#ffc66d;"&gt;BulbItemImpl&lt;/span&gt;&lt;span style="color:#ffffff;"&gt;, &lt;/span&gt;&lt;span style="color:#6897bb;"&gt;IQuickFix&lt;/span&gt;&lt;br /&gt; &lt;span style="color:#ffffff;"&gt;{&lt;/span&gt;&lt;br /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color:#ffffff;"&gt;&lt;/span&gt;&lt;span style="color:#cc7832;"&gt;readonly&lt;/span&gt;&lt;span style="color:#ffffff;"&gt; &lt;/span&gt;&lt;span style="color:#ffc66d;"&gt;MakeMethodVirtualSuggestion&lt;/span&gt;&lt;span style="color:#ffffff;"&gt; _highlighter;&lt;/span&gt;&lt;br /&gt; &lt;br /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color:#ffffff;"&gt;&lt;/span&gt;&lt;span style="color:#808080;"&gt;// Takes as parameter the Highlighter the quickfix refers to&lt;/span&gt;&lt;br /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color:#ffffff;"&gt;&lt;/span&gt;&lt;span style="color:#cc7832;"&gt;public&lt;/span&gt;&lt;span style="color:#ffffff;"&gt; MakeMethodVirtualQuickFix(&lt;/span&gt;&lt;span style="color:#ffc66d;"&gt;MakeMethodVirtualSuggestion&lt;/span&gt;&lt;span style="color:#ffffff;"&gt; highlighter)&lt;/span&gt;&lt;br /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color:#ffffff;"&gt;{&lt;/span&gt;&lt;br /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color:#ffffff;"&gt;_highlighter = highlighter;&lt;/span&gt;&lt;br /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color:#ffffff;"&gt;}&lt;/span&gt;&lt;br /&gt; &lt;br /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color:#ffffff;"&gt;&lt;/span&gt;&lt;span style="color:#808080;"&gt;// In the transaction we make the necessary changes to the code&lt;/span&gt;&lt;br /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color:#ffffff;"&gt;&lt;/span&gt;&lt;span style="color:#cc7832;"&gt;protected&lt;/span&gt;&lt;span style="color:#ffffff;"&gt; &lt;/span&gt;&lt;span style="color:#cc7832;"&gt;override&lt;/span&gt;&lt;span style="color:#ffffff;"&gt; &lt;/span&gt;&lt;span style="color:#6897bb;"&gt;Action&lt;/span&gt;&lt;span style="color:#ffffff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#6897bb;"&gt;ITextControl&lt;/span&gt;&lt;span style="color:#ffffff;"&gt;&amp;gt; ExecuteTransaction(&lt;/span&gt;&lt;span style="color:#6897bb;"&gt;ISolution&lt;/span&gt;&lt;span style="color:#ffffff;"&gt; solution, &lt;/span&gt;&lt;span style="color:#6897bb;"&gt;IProgressIndicator&lt;/span&gt;&lt;span style="color:#ffffff;"&gt; progress)&lt;/span&gt;&lt;br /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color:#ffffff;"&gt;{&lt;/span&gt;&lt;br /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color:#ffffff;"&gt;_highlighter.Declaration.SetVirtual(&lt;/span&gt;&lt;span style="color:#cc7832;"&gt;true&lt;/span&gt;&lt;span style="color:#ffffff;"&gt;);&lt;/span&gt;&lt;br /&gt; &lt;br /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color:#ffffff;"&gt;&lt;/span&gt;&lt;span style="color:#cc7832;"&gt;return&lt;/span&gt;&lt;span style="color:#ffffff;"&gt; &lt;/span&gt;&lt;span style="color:#cc7832;"&gt;null&lt;/span&gt;&lt;span style="color:#ffffff;"&gt;;&lt;/span&gt;&lt;br /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color:#ffffff;"&gt;}&lt;/span&gt;&lt;br /&gt; &lt;br /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color:#ffffff;"&gt;&lt;/span&gt;&lt;span style="color:#808080;"&gt;// Text that appears in the context menu&lt;/span&gt;&lt;br /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color:#ffffff;"&gt;&lt;/span&gt;&lt;span style="color:#cc7832;"&gt;public&lt;/span&gt;&lt;span style="color:#ffffff;"&gt; &lt;/span&gt;&lt;span style="color:#cc7832;"&gt;override&lt;/span&gt;&lt;span style="color:#ffffff;"&gt; &lt;/span&gt;&lt;span style="color:#cc7832;"&gt;string&lt;/span&gt;&lt;span style="color:#ffffff;"&gt; Text&lt;/span&gt;&lt;br /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color:#ffffff;"&gt;{&lt;/span&gt;&lt;br /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color:#ffffff;"&gt;&lt;/span&gt;&lt;span style="color:#cc7832;"&gt;get&lt;/span&gt;&lt;span style="color:#ffffff;"&gt; { &lt;/span&gt;&lt;span style="color:#cc7832;"&gt;return&lt;/span&gt;&lt;span style="color:#ffffff;"&gt; &lt;/span&gt;&lt;span style="color:#a5c25c;"&gt;&amp;quot;Make Method Virtual&amp;quot;&lt;/span&gt;&lt;span style="color:#ffffff;"&gt;; }&lt;/span&gt;&lt;br /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color:#ffffff;"&gt;}&lt;/span&gt;&lt;br /&gt; &lt;br /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color:#ffffff;"&gt;&lt;/span&gt;&lt;span style="color:#808080;"&gt;// Indicates when the option is available &lt;/span&gt;&lt;br /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color:#ffffff;"&gt;&lt;/span&gt;&lt;span style="color:#cc7832;"&gt;public&lt;/span&gt;&lt;span style="color:#ffffff;"&gt; &lt;/span&gt;&lt;span style="color:#cc7832;"&gt;bool&lt;/span&gt;&lt;span style="color:#ffffff;"&gt; IsAvailable(&lt;/span&gt;&lt;span style="color:#6897bb;"&gt;IUserDataHolder&lt;/span&gt;&lt;span style="color:#ffffff;"&gt; cache)&lt;/span&gt;&lt;br /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color:#ffffff;"&gt;{&lt;/span&gt;&lt;br /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color:#ffffff;"&gt;&lt;/span&gt;&lt;span style="color:#cc7832;"&gt;return&lt;/span&gt;&lt;span style="color:#ffffff;"&gt; _highlighter.IsValid();&lt;/span&gt;&lt;br /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color:#ffffff;"&gt;}&lt;/span&gt;&lt;br /&gt; &lt;span style="color:#ffffff;"&gt;}&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;The &lt;b&gt;MakeMethodVirtualQuickFix &lt;/b&gt;needs to implement the &lt;b&gt;IBulbItem &lt;/b&gt;and &lt;b&gt;IQuickFix &lt;/b&gt;interfaces. For ease of implementation we can inherit from &lt;b&gt;BulbItemImpl&lt;/b&gt;. The constructor should take as parameter always the actual highlighting that has given way to invoking the QuickFix, in our case the &lt;b&gt;MakeMethodVirtualSuggestion&lt;/b&gt;. Similar to the ContextAction we implemented in &lt;a href="http://hadihariri.com/blogengine/post/2010/01/12/Writing-plug-ins-for-ReSharper-Part-1-of-Undefined.aspx"&gt;Part 1&lt;/a&gt;, the actual fix itself is pretty trivial. All we need to do is make the method virtual. How do we get access to the method? The easiest way is via the Declaration property of the highlighting passed in (this is a property we added before). The only thing left is to call the &lt;b&gt;SetVirtual &lt;/b&gt;method on it. Since we are in the &lt;b&gt;ExecuteTransaction &lt;/b&gt;method, ReSharper makes sure that any change made is executed as a whole. &lt;/p&gt;
&lt;p&gt;The rest of the properties are trivial. Text returns the text of the QuickFix (what appears in the menu), and &lt;b&gt;IsAvailable&lt;/b&gt; indicates when the &lt;b&gt;QuickFix&lt;/b&gt; is available, which in our case is whenever the highlighting is valid. &lt;/p&gt;
&lt;h3&gt;&amp;nbsp;&lt;/h3&gt;
&lt;h3&gt;The End Result&lt;/h3&gt;
&lt;p&gt;Once we compile the plug-in and place it in the corresponding Plugins folder under ReSharper\Bin, we&amp;rsquo;re done. Here&amp;rsquo;s the end result:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://devlicio.us/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/hadi_5F00_hariri/image_5F00_0E2808EE.png"&gt;&lt;img style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" title="image" alt="image" src="http://devlicio.us/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/hadi_5F00_hariri/image_5F00_thumb_5F00_2168BF8D.png" border="0" height="124" width="400" /&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;and invoking Alt+Enter on the highlighting gives us:&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://devlicio.us/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/hadi_5F00_hariri/image_5F00_2A091819.png"&gt;&lt;img style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" title="image" alt="image" src="http://devlicio.us/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/hadi_5F00_hariri/image_5F00_thumb_5F00_479AF318.png" border="0" height="185" width="399" /&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;h3&gt;Summary&lt;/h3&gt;
&lt;p&gt;Extending ReSharper to create highlightings and quick fixes is pretty simple once you understand how all the pieces fall into place. Most of the code will usually be the same and what will vary will be the actual element processing to be performed and the corresponding QuickFix. As mentioned previously (in the Note), for complex scenarios, we can have more control over the tree walk and that&amp;rsquo;s something we&amp;rsquo;ll examine in a future post.&lt;/p&gt;
&lt;p&gt;I&amp;rsquo;ve placed the code up on my &lt;a href="http://github.com/hhariri"&gt;github account&lt;/a&gt; so feel free to download it, play with it and ping me if you have any comments or questions. The code is updated to work with ReSharper 5.1&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://devlicio.us/aggbug.aspx?PostID=61155" width="1" height="1"&gt;&lt;img src="http://feeds.feedburner.com/~r/Devlicious/~4/RqbSZbk6u5I" height="1" width="1"/&gt;</description><category domain="http://devlicio.us/blogs/hadi_hariri/archive/tags/Tools/default.aspx">Tools</category><category domain="http://devlicio.us/blogs/hadi_hariri/archive/tags/ReSharper/default.aspx">ReSharper</category><feedburner:origLink>http://devlicio.us/blogs/hadi_hariri/archive/2010/07/20/writing-plug-ins-for-resharper-part-2-of-n.aspx</feedburner:origLink></item><item><title>How To – UppercuT and Gems</title><link>http://feedproxy.google.com/~r/Devlicious/~3/Lh1a669R5NU/how-to-uppercut-and-gems.aspx</link><pubDate>Tue, 20 Jul 2010 14:00:00 GMT</pubDate><guid isPermaLink="false">40756a8b-6212-4073-9d98-6c26781577de:61136</guid><dc:creator>Rob Reynolds</dc:creator><slash:comments>3</slash:comments><description>&lt;p&gt;In a previous &lt;a href="http://devlicio.us/blogs/rob_reynolds/archive/2010/07/16/how-to-gems-and-net.aspx" target="_blank"&gt;post&lt;/a&gt; I mentioned how I was going to show you how &lt;a href="http://projectuppercut.org/" target="_blank"&gt;UppercuT&lt;/a&gt; (UC) has the ability to make gems stupid simple to create and publish. You ask if gems can get any easier and to that I answer, &amp;ldquo;Why YES, they can!&amp;rdquo; How about just filling out the information for the gemspec, running a build and having a nice, shiny new gem ready for publishing?&lt;/p&gt;
&lt;h4&gt;&lt;strong&gt;Rock The Gems&lt;/strong&gt;&lt;/h4&gt;
&lt;p&gt;Basically you want to get the latest release of &lt;a href="http://projectuppercut.org" target="_blank"&gt;UppercuT&lt;/a&gt;. You can &lt;a href="http://code.google.com/p/uppercut/downloads/list" target="_blank"&gt;download it&lt;/a&gt; or grab the source and compile.&lt;/p&gt;
&lt;p&gt;There are already &lt;a href="http://uppercut.pbworks.com/HowToUse" target="_blank"&gt;instructions&lt;/a&gt; &lt;a href="http://uppercut.googlecode.com/svn/trunk/docs" target="_blank"&gt;out&lt;/a&gt; there for how to get UC in your project, so I&amp;rsquo;m not going to concentrate on that.&lt;/p&gt;
&lt;p&gt;Once you upgrade (or add and get everything else set up), you want to have this gems folder at your top level (just under trunk or branch name).&lt;/p&gt;
&lt;p&gt;&lt;a href="http://devlicio.us/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/rob_5F00_reynolds/image_5F00_2EF23BA0.png"&gt;&lt;img style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" title="gems folder at the top level" border="0" alt="gems folder at the top level" src="http://devlicio.us/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/rob_5F00_reynolds/image_5F00_thumb_5F00_5166CA5B.png" width="204" height="281" /&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;In that gems folder you are going to find a file named something like the file below. Rename that file to your new &lt;em&gt;gemname&lt;/em&gt;.gemspec. &lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; Once you have a gemspec file in a gems folder, your build server NOW needs to also have ruby and gems installed.&lt;/p&gt;
&lt;p&gt;Open that file in your favorite text editor and fill in the details. Here&amp;rsquo;s a &lt;a href="http://devlicio.us/blogs/rob_reynolds/archive/2010/07/16/how-to-gems-and-net.aspx" target="_blank"&gt;good post&lt;/a&gt; on how to do that.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://devlicio.us/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/rob_5F00_reynolds/image_5F00_3E459DAF.png"&gt;&lt;img style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" title="Rename the file to gemname.gemspec" border="0" alt="Rename the file to gemname.gemspec" src="http://devlicio.us/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/rob_5F00_reynolds/image_5F00_thumb_5F00_5D884482.png" width="244" height="213" /&gt;&lt;/a&gt;&amp;nbsp;&lt;a href="http://devlicio.us/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/rob_5F00_reynolds/image_5F00_3C94D1DB.png"&gt;&lt;img style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" title="Open in a text editor and edit the gemspec according to your needs" border="0" alt="Open in a text editor and edit the gemspec according to your needs" src="http://devlicio.us/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/rob_5F00_reynolds/image_5F00_thumb_5F00_628A8231.png" width="244" height="201" /&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;Then just for having the gems folder with a gemspec in it, UC will automatically try to build the gem for you (the code in your code_drop/&lt;em&gt;projectname&lt;/em&gt; folder is brought over to code_drop/gems/lib folder).&lt;/p&gt;
&lt;p&gt;&lt;a href="http://devlicio.us/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/rob_5F00_reynolds/image_5F00_41970F8A.png"&gt;&lt;img style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" title="code_drop/gems" border="0" alt="code_drop/gems" src="http://devlicio.us/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/rob_5F00_reynolds/image_5F00_thumb_5F00_27C2D95B.png" width="226" height="244" /&gt;&lt;/a&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://devlicio.us/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/rob_5F00_reynolds/image_5F00_3860D03D.png"&gt;&lt;img style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" title="Gem gets built with the correct version" border="0" alt="Gem gets built with the correct version" src="http://devlicio.us/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/rob_5F00_reynolds/image_5F00_thumb_5F00_104E211E.png" width="466" height="351" /&gt;&lt;/a&gt; &lt;/p&gt;
&lt;h4&gt;&lt;strong&gt;Removing All of the Other Output After the Gem is Built&lt;/strong&gt;&lt;/h4&gt;
&lt;p&gt;Once we are good with what we are getting back for the gem, we can start cleaning up. So we go into our build.custom (don&amp;rsquo;t have one? create it right next to the build folder) folder and create a file named &lt;strong&gt;gemsBuild.post.step&lt;/strong&gt;. &lt;/p&gt;
&lt;p&gt;&lt;a href="http://devlicio.us/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/rob_5F00_reynolds/image_5F00_702D186C.png"&gt;&lt;img style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" title="build.custom/gemsbuild.post.step" border="0" alt="build.custom/gemsbuild.post.step" src="http://devlicio.us/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/rob_5F00_reynolds/image_5F00_thumb_5F00_5658E23D.png" width="244" height="238" /&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;Let&amp;rsquo;s open the file and insert this:&lt;/p&gt;
&lt;pre class="xml" name="code"&gt;&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;utf-8&amp;quot;?&amp;gt;
&amp;lt;project name=&amp;quot;CUSTOM POST GEMSBUILD&amp;quot; default=&amp;quot;go&amp;quot;&amp;gt;
  &amp;lt;!-- Project UppercuT - http://projectuppercut.org --&amp;gt;
  &amp;lt;property name=&amp;quot;build.config.settings&amp;quot; value=&amp;quot;__NONE__&amp;quot; overwrite=&amp;quot;false&amp;quot; /&amp;gt;
  &amp;lt;include buildfile=&amp;quot;${build.config.settings}&amp;quot; if=&amp;quot;${file::exists(build.config.settings)}&amp;quot; /&amp;gt;
  &amp;lt;property name=&amp;quot;dirs.current&amp;quot; value=&amp;quot;${directory::get-parent-directory(project::get-buildfile-path())}&amp;quot; /&amp;gt;
  &amp;lt;property name=&amp;quot;path.to.toplevel&amp;quot; value=&amp;quot;..&amp;quot; /&amp;gt;
  &amp;lt;property name=&amp;quot;folder.code_drop&amp;quot; value=&amp;quot;code_drop&amp;quot; overwrite=&amp;quot;false&amp;quot; /&amp;gt;
  &amp;lt;property name=&amp;quot;dirs.drop&amp;quot; value=&amp;quot;${dirs.current}\${path.to.toplevel}\${folder.code_drop}&amp;quot; overwrite=&amp;quot;false&amp;quot; /&amp;gt;
  &amp;lt;property name=&amp;quot;folder.gems&amp;quot; value=&amp;quot;gems&amp;quot; overwrite=&amp;quot;false&amp;quot; /&amp;gt;
  
  &amp;lt;target name=&amp;quot;go&amp;quot; depends=&amp;quot;run_tasks&amp;quot; /&amp;gt;
  
  &amp;lt;target name=&amp;quot;run_tasks&amp;quot;&amp;gt;
    &amp;lt;delete&amp;gt;
      &amp;lt;fileset basedir=&amp;quot;${dirs.drop}/${folder.gems}&amp;quot; &amp;gt;
        &amp;lt;exclude name=&amp;quot;*.gem&amp;quot; /&amp;gt;
        &amp;lt;include name=&amp;quot;**/*&amp;quot; /&amp;gt;
      &amp;lt;/fileset&amp;gt;
    &amp;lt;/delete&amp;gt;
  &amp;lt;/target&amp;gt;
  
&amp;lt;/project&amp;gt;&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;Note: &lt;/strong&gt;Don&amp;rsquo;t like NAnt?&lt;strong&gt; &lt;/strong&gt;You can also use Ruby or PowerShell instead of NAnt to write your &lt;a href="http://uppercut.pbworks.com/CustomizeUsingExtensionPoints" target="_blank"&gt;custom extensions&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Now when we run our build again, we have a nice clean folder. &lt;/p&gt;
&lt;p&gt;&lt;a href="http://devlicio.us/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/rob_5F00_reynolds/image_5F00_35656F96.png"&gt;&lt;img style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" title="All clean - just the built gem. Nice..." border="0" alt="All clean - just the built gem. Nice..." src="http://devlicio.us/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/rob_5F00_reynolds/image_5F00_thumb_5F00_348D09AC.png" width="440" height="191" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;h4&gt;&lt;strong&gt;What If I Want to Change What Goes Into my Gem?&lt;/strong&gt;&lt;/h4&gt;
&lt;p&gt;Interested in influencing what goes INTO your gem in the first place? That&amp;rsquo;s a pretty good thing to be concerned with so that you don&amp;rsquo;t have all of your referenced assemblies sitting in there. Read about how to set up &lt;a href="http://devlicio.us/blogs/rob_reynolds/archive/2010/07/17/how-to-gems-and-net-dependencies-references.aspx" target="_blank"&gt;dependencies&lt;/a&gt;. Then you will create a file next to &lt;strong&gt;gemsbuild.post.step&lt;/strong&gt; named &lt;strong&gt;gemsPrepare.post.step&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://devlicio.us/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/rob_5F00_reynolds/image_5F00_3A67AD45.png"&gt;&lt;img style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" title="build.custom/gemsPrepare.post.step" border="0" alt="build.custom/gemsPrepare.post.step" src="http://devlicio.us/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/rob_5F00_reynolds/image_5F00_thumb_5F00_249DC4E8.png" width="204" height="263" /&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;In that file, you will insert something similar to the following (&lt;a href="http://roundhouse.googlecode.com/svn/trunk/build.custom/gemsPrepare.post.step" target="_blank"&gt;roundhouse file&lt;/a&gt;):&lt;/p&gt;
&lt;pre class="xml" name="code"&gt;&amp;lt;copy todir=&amp;quot;${dirs.drop}\${folder.gems}\lib&amp;quot;&amp;gt;
  &amp;lt;fileset basedir=&amp;quot;${dirs.drop}\${folder.gems}\lib\MSBuild&amp;quot;&amp;gt;
    &amp;lt;include name=&amp;quot;**/*.*&amp;quot; /&amp;gt;
  &amp;lt;/fileset&amp;gt;
&amp;lt;/copy&amp;gt;

&amp;lt;copy todir=&amp;quot;${dirs.drop}\${folder.gems}\lib&amp;quot;&amp;gt;
  &amp;lt;fileset basedir=&amp;quot;${dirs.drop}\${folder.gems}\lib\NAnt&amp;quot;&amp;gt;
    &amp;lt;include name=&amp;quot;**/*.*&amp;quot; /&amp;gt;
  &amp;lt;/fileset&amp;gt;
&amp;lt;/copy&amp;gt;

&amp;lt;delete&amp;gt;
  &amp;lt;fileset basedir=&amp;quot;${dirs.drop}\${folder.gems}\lib&amp;quot; &amp;gt;
    &amp;lt;include name=&amp;quot;ConsoleApp/**&amp;quot; /&amp;gt;
    &amp;lt;include name=&amp;quot;MSBuild/**&amp;quot; /&amp;gt;
    &amp;lt;include name=&amp;quot;NAnt/**&amp;quot; /&amp;gt;
  &amp;lt;/fileset&amp;gt;
&amp;lt;/delete&amp;gt;&lt;/pre&gt;
&lt;h4&gt;&lt;strong&gt;Learn More&lt;/strong&gt;&lt;/h4&gt;
&lt;p&gt;With this knowledge, you shall build. Interested in more UppercuT? Check out the &lt;a href="http://groups.google.com/group/chucknorrisframework" target="_blank"&gt;ChuckNorris&lt;/a&gt; framework and &lt;a href="http://groups.google.com/group/chucknorrisframework/subscribe" target="_blank"&gt;join&lt;/a&gt; the group.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;h4&gt;&lt;strong&gt;Related Posts&lt;/strong&gt;&lt;/h4&gt;
&lt;p&gt;Before you comment about &amp;ldquo;cluttering&amp;rdquo; the ruby community, please be sure to read this (we&amp;rsquo;re with you on this):&amp;nbsp; &lt;a title="http://devlicio.us/blogs/rob_reynolds/archive/2010/07/19/gems-for-net-community-response.aspx" href="http://devlicio.us/blogs/rob_reynolds/archive/2010/07/19/gems-for-net-community-response.aspx" target="_blank"&gt;http://devlicio.us/blogs/rob_reynolds/archive/2010/07/19/gems-for-net-community-response.aspx&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://devlicio.us/blogs/rob_reynolds/archive/2010/07/15/gems-package-management-for-net.aspx" target="_blank"&gt;Gems - Package Management for .NET&lt;/a&gt;&amp;nbsp; &lt;/p&gt;
&lt;p&gt;&lt;a href="http://devlicio.us/blogs/rob_reynolds/archive/2010/07/16/how-to-gems-and-net.aspx" target="_blank"&gt;How To &amp;ndash; Gems &amp;amp; .NET&lt;/a&gt; &amp;amp; &lt;a href="http://devlicio.us/blogs/rob_reynolds/archive/2010/07/17/how-to-gems-and-net-dependencies-references.aspx" target="_blank"&gt;How To &amp;ndash; Gems &amp;amp; .NET - Dependencies (References)&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://devlicio.us/blogs/rob_reynolds/archive/2010/07/26/the-future-of-net-open-source-software-delivery.aspx" target="_blank"&gt;The Future is Now!&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://devlicio.us/aggbug.aspx?PostID=61136" width="1" height="1"&gt;&lt;img src="http://feeds.feedburner.com/~r/Devlicious/~4/Lh1a669R5NU" height="1" width="1"/&gt;</description><category domain="http://devlicio.us/blogs/rob_reynolds/archive/tags/HowTo/default.aspx">HowTo</category><category domain="http://devlicio.us/blogs/rob_reynolds/archive/tags/UppercuT/default.aspx">UppercuT</category><category domain="http://devlicio.us/blogs/rob_reynolds/archive/tags/Development/default.aspx">Development</category><category domain="http://devlicio.us/blogs/rob_reynolds/archive/tags/Tools/default.aspx">Tools</category><category domain="http://devlicio.us/blogs/rob_reynolds/archive/tags/.NET/default.aspx">.NET</category><category domain="http://devlicio.us/blogs/rob_reynolds/archive/tags/Gems/default.aspx">Gems</category><feedburner:origLink>http://devlicio.us/blogs/rob_reynolds/archive/2010/07/20/how-to-uppercut-and-gems.aspx</feedburner:origLink></item><item><title>Gems For .NET – Community Response</title><link>http://feedproxy.google.com/~r/Devlicious/~3/zsOQSn7L93Y/gems-for-net-community-response.aspx</link><pubDate>Mon, 19 Jul 2010 18:28:03 GMT</pubDate><guid isPermaLink="false">40756a8b-6212-4073-9d98-6c26781577de:61133</guid><dc:creator>Rob Reynolds</dc:creator><slash:comments>12</slash:comments><description>&lt;p&gt;There has been a lot of response in the community about this &lt;a href="http://devlicio.us/blogs/rob_reynolds/archive/2010/07/15/gems-package-management-for-net.aspx" target="_blank"&gt;gems&lt;/a&gt; idea we’ve been talking about. I even had the opportunity to sit down with &lt;a href="http://twitter.com/qrush" target="_blank"&gt;Nick Quaranto&lt;/a&gt;, the guy behind &lt;a href="http://rubygems.org" target="_blank"&gt;Rubygems.org&lt;/a&gt;, over coffee Sunday and talk about where we think we are going and what it will take to get there. &lt;/p&gt;  &lt;p&gt;One of the biggest things that everyone wants to see carrying this idea forward is that we migrate off of Rubygems.org and have our own gem server. And we all agree this is a great idea. There are just two things that really keep that from happening at the current moment. The devil is in the details and when we are ready to move off to our own server, it’s real money at that point (to do it right). &lt;/p&gt;  &lt;p&gt;Right now we are embracing the idea of “one community,” and we are certainly not the first non-ruby community to use RubyGems.org. Long term a different host for the .net gems will be both necessary and beneficial. As we move off, we’ll be able to even expand some of the things we can do as far as checking gems as they are published to make sure they meet certain constraints.&amp;#160; &lt;/p&gt;  &lt;p&gt;If you are concerned about getting started versus later migrating – the process will be well thought out and seamless for the user experience of getting your gems and pushing them. The user experience is still going to be rock solid, and the same concept of gem install &lt;em&gt;gemname&lt;/em&gt; is going to be there no matter what happens.&lt;/p&gt;  &lt;p&gt;And for you gem owners – we’ll be working closely with Nick to ensure that the process is still rockstar.&lt;/p&gt;  &lt;p&gt;The more community involvement there is from you and others like you, the faster we move to our own servers. And as far as when, well that all depends on you.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://devlicio.us/aggbug.aspx?PostID=61133" width="1" height="1"&gt;&lt;img src="http://feeds.feedburner.com/~r/Devlicious/~4/zsOQSn7L93Y" height="1" width="1"/&gt;</description><category domain="http://devlicio.us/blogs/rob_reynolds/archive/tags/.NET/default.aspx">.NET</category><category domain="http://devlicio.us/blogs/rob_reynolds/archive/tags/Gems/default.aspx">Gems</category><feedburner:origLink>http://devlicio.us/blogs/rob_reynolds/archive/2010/07/19/gems-for-net-community-response.aspx</feedburner:origLink></item><item><title>My Objective Today is to Make You Think</title><link>http://feedproxy.google.com/~r/Devlicious/~3/_309VoJlHt0/my-objective-today-is-to-make-you-think.aspx</link><pubDate>Mon, 19 Jul 2010 00:08:00 GMT</pubDate><guid isPermaLink="false">40756a8b-6212-4073-9d98-6c26781577de:61124</guid><dc:creator>Jak Charlton</dc:creator><slash:comments>3</slash:comments><description>&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&amp;quot;Maybe There is a Better Way&amp;quot;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;I recently presented at DeveloperDeveloperDeveloper in Sydney, and although my talk was Stuff About CQRS, I opened with the slide&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;My Object Today Is to Make You Think ... &amp;#39;Maybe There is a Better Way&amp;#39;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;(&lt;a href="http://thinkddd.com/blog/2010/07/17/dddsydney-presentation-stuff-about-cqrs/"&gt;slides here&lt;/a&gt;)&lt;/p&gt;
&lt;p&gt;The real focus of this was around how normal people think, and how unlike normal people we developers really are. My role in development is all about enabling better communication, because fundamentally I believe the real value a developer brings to a project is not technical, but is in the way they interact with the team, and more importantly with the normal people they are actually creating software for.&lt;/p&gt;
&lt;p&gt;Obviously some of this has roots in DDD, the Ubiquitous Language is obviously an attempt to traverse this chasm that seems to exist between us.&lt;/p&gt;
&lt;p&gt;Then I touched on user interfaces, and how they are so rarely designed the way people think - normal people think about their objectives and goals, not in terms of data like we developers do. Inductive UIs are focused on tasks, unlike the traditional data driven UIs that we tend to throw at users - users and people don&amp;#39;t think in grids and columns and rows, they think &amp;quot;I want to change my address&amp;quot;, not &amp;quot;open my customer record, edit the three fields under address and save to the database&amp;quot; - only a sadist or a developer would think that way.&lt;/p&gt;
&lt;p&gt;And finally I touched on things like NoSQL databases, which neatly solve a communication problem - they stop us thinking about How to store information and let us focus on What we are storing and Why.&lt;/p&gt;
&lt;p&gt;And lastly I tried to show the link between CQRS and these business problems - how it made you focus on the language, on tasks and objectives and how it let you detach the How from the What and Why.&lt;/p&gt;
&lt;p&gt;But most importantly, what I was trying to do in that presentation was to throw some non-mainstream ideas out into the audience, to spark discussion and debate, and to get people to think - Maybe There is a Better Way &amp;nbsp;&lt;/p&gt;
&lt;p&gt;If only a few of those in the audience went away and Googled some of the ideas I was talking about, it will be another step towards moving development away from it&amp;#39;s heavy focus on technology and technological solutions - and towards a people and business driven focus, where technology is an artifact, not the deciding factor.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://devlicio.us/aggbug.aspx?PostID=61124" width="1" height="1"&gt;&lt;img src="http://feeds.feedburner.com/~r/Devlicious/~4/_309VoJlHt0" height="1" width="1"/&gt;</description><category domain="http://devlicio.us/blogs/casey/archive/tags/Rants/default.aspx">Rants</category><category domain="http://devlicio.us/blogs/casey/archive/tags/Architecture/default.aspx">Architecture</category><category domain="http://devlicio.us/blogs/casey/archive/tags/DDD/default.aspx">DDD</category><category domain="http://devlicio.us/blogs/casey/archive/tags/cqrs/default.aspx">cqrs</category><feedburner:origLink>http://devlicio.us/blogs/casey/archive/2010/07/19/my-objective-today-is-to-make-you-think.aspx</feedburner:origLink></item><item><title>Caliburn.Micro Soup to Nuts Pt. 3 – All About Actions</title><link>http://feedproxy.google.com/~r/Devlicious/~3/URtYgLWC0nQ/caliburn-micro-soup-to-nuts-pt-3-all-about-actions.aspx</link><pubDate>Sat, 17 Jul 2010 16:04:00 GMT</pubDate><guid isPermaLink="false">40756a8b-6212-4073-9d98-6c26781577de:61112</guid><dc:creator>Rob Eisenberg</dc:creator><slash:comments>2</slash:comments><description>&lt;p&gt;We briefly introduced actions in &lt;a target="_blank" href="http://devlicio.us/blogs/rob_eisenberg/archive/2010/07/06/caliburn-micro-soup-to-nuts-pt-1-configuration-actions-and-conventions.aspx"&gt;Pt. 1&lt;/a&gt;, but there is so much more to know. To begin our investigation, we&amp;rsquo;ll take our simple &amp;ldquo;Hello&amp;rdquo; example and see what it looks like when we explicitly create the actions rather than use conventions. Here&amp;rsquo;s the Xaml:&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;pre name="code" class="xml:nogutter:nocontrols"&gt;&amp;lt;UserControl x:Class=&amp;quot;Caliburn.Micro.Hello.ShellView&amp;quot;
             xmlns=&amp;quot;http://schemas.microsoft.com/winfx/2006/xaml/presentation&amp;quot;
             xmlns:x=&amp;quot;http://schemas.microsoft.com/winfx/2006/xaml&amp;quot;
             xmlns:i=&amp;quot;clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity&amp;quot;
             xmlns:cal=&amp;quot;http://www.caliburnproject.org&amp;quot;&amp;gt;
    &amp;lt;StackPanel&amp;gt;
        &amp;lt;TextBox x:Name=&amp;quot;Name&amp;quot; /&amp;gt;
        &amp;lt;Button Content=&amp;quot;Click Me&amp;quot;&amp;gt;
            &amp;lt;i:Interaction.Triggers&amp;gt;
                &amp;lt;i:EventTrigger EventName=&amp;quot;Click&amp;quot;&amp;gt;
                    &amp;lt;cal:ActionMessage MethodName=&amp;quot;SayHello&amp;quot; /&amp;gt;
                &amp;lt;/i:EventTrigger&amp;gt;
            &amp;lt;/i:Interaction.Triggers&amp;gt;
        &amp;lt;/Button&amp;gt;
    &amp;lt;/StackPanel&amp;gt;
&amp;lt;/UserControl&amp;gt;&lt;/pre&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;As you can see, the Actions feature leverages System.Windows.Interactivity for it&amp;rsquo;s trigger mechanism. This means that you can use anything that inherits from System.Windows.Interactivity.TriggerBase to trigger the sending of an ActionMessage.*&amp;nbsp; Perhaps the most common trigger is an EventTrigger, but you can create almost any kind of trigger imaginable or leverage some common triggers already created by the community.&amp;nbsp; ActionMessage is, of coarse, the Caliburn.Micro-specific part of this markup. It indicates that when the trigger occurs, we should send a message of &amp;ldquo;SayHello.&amp;rdquo;&amp;nbsp; So, why do I use the language &amp;ldquo;send a message&amp;rdquo; instead of &amp;ldquo;execute a method&amp;rdquo; when describing this functionality? That&amp;rsquo;s the interesting and powerful part.&amp;nbsp; ActionMessage bubbles through the Visual Tree searching for a target instance that can handle it. If a target is found, but does not have a &amp;ldquo;SayHello&amp;rdquo; method, the framework will continue to bubble until it finds one, throwing an exception if no &amp;ldquo;handler&amp;rdquo; is found.** This bubbling nature of ActionMessage comes in handy in a number of interesting scenarios, Master/Details being a key use case. Another important feature to note is Action guards. When a handler is found for the &amp;ldquo;SayHello&amp;rdquo; message, it will check to see if that class also has either a property or a method named &amp;ldquo;CanSayHello.&amp;rdquo; If you have a guard property and your class implements INotifyPropertyChanged, then the framework will observe changes in that property and re-evaluate the guard accordingly. We&amp;rsquo;ll discuss method guards in further detail below.&lt;/p&gt;
&lt;p&gt;Now you&amp;rsquo;re probably wondering how to specify the target of an ActionMessage. Looking at the markup above, there&amp;rsquo;s no visible indication of what that target will be. So, where does that come from? Since we used a Model-First approach, when Caliburn.Micro (hereafter CM) created the view and bound it to the ViewModel using the ViewModelBinder, it set this up for us. Anything that goes through the ViewModelBinder will have its action target set automatically. But, you can set it yourself as well, using the attached property Action.Target. Setting this property positions an ActionMessage &amp;ldquo;handler&amp;rdquo; in the Visual Tree attached to the node on with you declare the property. It also sets the DataContext to the same value, since you often want these two things to be the same. However, you can vary the Action.Target from the DataContext if you like. Simply use the Action.TargetWithoutContext attached property instead. One nice thing about Action.Target is that you can set it to a System.String and CM will use that string to resolve an instance from the IoC container using the provided value as its key. This gives you a nice way of doing View-First MVVM if you so desire. If you want Action.Target set and you want Action/Binding Conventions applied as well, you can use the Bind.Model attached property in the same way.&lt;/p&gt;
&lt;p&gt;Let&amp;rsquo;s see how we would apply this to achieve MVVM using a View-First technique (gasp!) Here&amp;rsquo;s how we would change our bootstrapper:&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;pre name="code" class="c#:nogutter:nocontrols"&gt;public class MefBootstrapper : Bootstrapper
{
    //same as before

    protected override void DisplayRootView()
    {
        Application.Current.RootVisual = new ShellView();
    }

    //same as before
}&lt;/pre&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Because we are using View-First, we&amp;rsquo;ve inherited from the non-generic Bootstrapper. The MEF configuration is the same as seen previously, so I have left that out for brevity&amp;rsquo;s sake. The only other thing that is changed is how the view gets created. In this scenario, we simply override DisplayRootView, instantiate the view ourselves and set it as the RootVisual (or call Show in the case of WPF). Next, we&amp;rsquo;ll slightly alter how we are exporting our ShellViewModel, by adding an explicitly named contract:&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;pre name="code" class="c#:nogutter:nocontrols"&gt;[Export(&amp;quot;Shell&amp;quot;, typeof(IShell))]
public class ShellViewModel : PropertyChangedBase, IShell
{
    //same as before
}&lt;/pre&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Finally, we will alter our view to pull in the VM and perform all bindings:&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;pre name="code" class="xml:nogutter:nocontrols"&gt;&amp;lt;UserControl x:Class=&amp;quot;Caliburn.Micro.ViewFirst.ShellView&amp;quot;
             xmlns=&amp;quot;http://schemas.microsoft.com/winfx/2006/xaml/presentation&amp;quot;
             xmlns:x=&amp;quot;http://schemas.microsoft.com/winfx/2006/xaml&amp;quot;
             xmlns:cal=&amp;quot;http://www.caliburnproject.org&amp;quot;
             cal:Bind.Model=&amp;quot;Shell&amp;quot;&amp;gt;
    &amp;lt;StackPanel&amp;gt;
        &amp;lt;TextBox x:Name=&amp;quot;Name&amp;quot; /&amp;gt;
        &amp;lt;Button x:Name=&amp;quot;SayHello&amp;quot;
                Content=&amp;quot;Click Me&amp;quot; /&amp;gt;
    &amp;lt;/StackPanel&amp;gt;
&amp;lt;/UserControl&amp;gt;&lt;/pre&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Notice the use of the Bind.Model attached property. This resolves our VM by key from the IoC container, sets the Action.Target and DataContext and applies all conventions. I thought it would be nice to show how View-First development is fully supported with CM, but mainly I want to make clear the various ways that you can set targets for actions and the implications of using each technique. Here&amp;rsquo;s a summary of the available attached properties:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Action.Target &amp;ndash; Sets both the Action.Target property and the DataContext property to the specified instance. String values are used to resolve an instance from the IoC container. &lt;/li&gt;
&lt;li&gt;Action.TargetWithoutContext &amp;ndash; Sets only the Action.Target property to the specified instance. String values are used to resolve an instance from the IoC container. &lt;/li&gt;
&lt;li&gt;Bind.Model &amp;ndash; View-First - Set&amp;rsquo;s the Action.Target and DataContext properties to the specified instance. Applies conventions to the view. String values are used to resolve an instance from the IoC container. &lt;/li&gt;
&lt;li&gt;View.Model &amp;ndash; ViewModel-First &amp;ndash; Locates the view for the specified VM instance and injects it at the content site. Sets the VM to the Action.Target and the DataContext. Applies conventions to the view. &lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Now, let&amp;rsquo;s take a look at another interesting aspect of ActionMessage: Parameters. To see this in action, let&amp;rsquo;s switch back to our original ViewModel-First bootstrapper, etc. and begin by changing our ShellViewModel to look like this: &lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;pre name="code" class="c#:nogutter:nocontrols"&gt;using System.ComponentModel.Composition;
using System.Windows;

[Export(typeof(IShell))]
public class ShellViewModel : IShell
{
    public bool CanSayHello(string name)
    {
        return !string.IsNullOrWhiteSpace(name);
    }

    public void SayHello(string name)
    {
        MessageBox.Show(string.Format(&amp;quot;Hello {0}!&amp;quot;, name));
    }
}&lt;/pre&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;There are a few things to note here. First, we are now working with a completely POCO class; no INPC goop here. Second, we have added an input parameter to our SayHello method. Finally, we changed our CanSayHello property into a method with the same inputs as the action, but with a bool return type. Now, let&amp;rsquo;s have a look at the Xaml:&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;pre name="code" class="xml:nogutter:nocontrols"&gt;&amp;lt;UserControl x:Class=&amp;quot;Caliburn.Micro.HelloParameters.ShellView&amp;quot;
             xmlns=&amp;quot;http://schemas.microsoft.com/winfx/2006/xaml/presentation&amp;quot;
             xmlns:x=&amp;quot;http://schemas.microsoft.com/winfx/2006/xaml&amp;quot;
             xmlns:i=&amp;quot;clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity&amp;quot;
             xmlns:cal=&amp;quot;http://www.caliburnproject.org&amp;quot;&amp;gt;
    &amp;lt;StackPanel&amp;gt;
        &amp;lt;TextBox x:Name=&amp;quot;Name&amp;quot; /&amp;gt;
        &amp;lt;Button Content=&amp;quot;Click Me&amp;quot;&amp;gt;
            &amp;lt;i:Interaction.Triggers&amp;gt;
                &amp;lt;i:EventTrigger EventName=&amp;quot;Click&amp;quot;&amp;gt;
                    &amp;lt;cal:ActionMessage MethodName=&amp;quot;SayHello&amp;quot;&amp;gt;
                        &amp;lt;cal:Parameter Value=&amp;quot;{Binding ElementName=Name, Path=Text}&amp;quot; /&amp;gt;
                    &amp;lt;/cal:ActionMessage&amp;gt;
                &amp;lt;/i:EventTrigger&amp;gt;
            &amp;lt;/i:Interaction.Triggers&amp;gt;
        &amp;lt;/Button&amp;gt;
    &amp;lt;/StackPanel&amp;gt;
&amp;lt;/UserControl&amp;gt;&lt;/pre&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Our markup now has one modification: We declared the parameter as part of the ActionMessage using an ElementName Binding. You can have any number of parameters you desire. Value is a DependencyProperty, so all the standard binding capabilities apply to parameters. Did I mention you can do all this in Blend?&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://devlicio.us/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/rob_5F00_eisenberg/ActionsInBlend_5F00_363545A1.jpg"&gt;&lt;img height="161" width="244" src="http://devlicio.us/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/rob_5F00_eisenberg/ActionsInBlend_5F00_thumb_5F00_0CC10461.jpg" alt="ActionsInBlend" border="0" title="ActionsInBlend" style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" /&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;One thing that is nice about this is that every time the value of a parameter changes, we&amp;rsquo;ll call the guard method associated with the action(CanSayHello in this case) and use its result to update the UI that the ActionMessage is attached to. Go ahead and run the application. You&amp;rsquo;ll see that it behaves the same as in previous examples.&lt;/p&gt;
&lt;p&gt;In addition to literal values and Binding Expressions, there are a number of helpful &amp;ldquo;special&amp;rdquo; values that you can use with parameters. These allow you a convenient way to access common contextual information:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;$eventArgs &amp;ndash; Passes the Trigger&amp;rsquo;s EventArgs or input parameter to your Action. Note: This will be null for guard methods since the trigger hasn&amp;rsquo;t actually occurred. &lt;/li&gt;
&lt;li&gt;$dataContext &amp;ndash; Passes the DataContext of the element that the ActionMessage is attached to. This is very useful in Master/Detail scenarios where the ActionMessage may bubble to a parent VM but needs to carry with it the child instance to be acted upon. &lt;/li&gt;
&lt;li&gt;$source &amp;ndash; The actual FrameworkElement that triggered the ActionMessage to be sent. &lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;You must start the variable with a &amp;ldquo;$&amp;rdquo; but the name is treated in a case-insensitive way by CM.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Word to the Wise&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Parameters are a convenience feature. They are very powerful and can help you out of some tricky spots, but they can be easily abused. Personally, I only use parameters in the simplest scenarios. One place where they have worked nicely for me is in login forms. Another scenario, as mentioned previously is Master/Detail operations.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Now, do you want to see something truly wicked? Change your Xaml back to this:&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;pre name="code" class="xml:nogutter:nocontrols"&gt;&amp;lt;UserControl x:Class=&amp;quot;Caliburn.Micro.HelloParameters.ShellView&amp;quot;
             xmlns=&amp;quot;http://schemas.microsoft.com/winfx/2006/xaml/presentation&amp;quot;
             xmlns:x=&amp;quot;http://schemas.microsoft.com/winfx/2006/xaml&amp;quot;&amp;gt;
    &amp;lt;StackPanel&amp;gt;
        &amp;lt;TextBox x:Name=&amp;quot;Name&amp;quot; /&amp;gt;
        &amp;lt;Button x:Name=&amp;quot;SayHello&amp;quot; 
                Content=&amp;quot;Click Me&amp;quot; /&amp;gt;
    &amp;lt;/StackPanel&amp;gt;
&amp;lt;/UserControl&amp;gt;&lt;/pre&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Running the application will confirm for you that CM&amp;rsquo;s conventions even understand ActionMessage parameters. We&amp;rsquo;ll discuss conventions a lot more in the future, but you should be happy to know that these conventions are case-insensitive and can even detect the before-mentioned &amp;ldquo;special&amp;rdquo; values.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Now, lets look at a simple Master/Detail scenario that demonstrates ActionMessage bubbling, but let&amp;rsquo;s do it with a shorthand syntax that is designed to be more developer friendly. We&amp;rsquo;ll start by adding a simple new class named Model:&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;pre name="code" class="c#:nogutter:nocontrols"&gt;using System;

public class Model
{
    public Guid Id { get; set; }
}&lt;/pre&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;And then we&amp;rsquo;ll change our ShellViewModel to this:&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;pre name="code" class="c#:nogutter:nocontrols"&gt;using System;
using System.ComponentModel.Composition;

[Export(typeof(IShell))]
public class ShellViewModel : IShell
{
    public BindableCollection&amp;lt;Model&amp;gt; Items { get; private set; }

    public ShellViewModel()
    {
        Items = new BindableCollection&amp;lt;Model&amp;gt;{
            new Model { Id = Guid.NewGuid() },
            new Model { Id = Guid.NewGuid() },
            new Model { Id = Guid.NewGuid() },
            new Model { Id = Guid.NewGuid() }
        };
    }

    public void Add()
    {
        Items.Add(new Model { Id = Guid.NewGuid() });
    }

    public void Remove(Model child)
    {
        Items.Remove(child);
    }
}&lt;/pre&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Now our shell has a collection of Model instances along with the ability to add or remove from the collection. Notice that the Remove method takes a single parameter of type Model. Now, let&amp;rsquo;s update the ShellView:&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;pre name="code" class="xml:nogutter:nocontrols"&gt;&amp;lt;UserControl x:Class=&amp;quot;Caliburn.Micro.BubblingAction.ShellView&amp;quot;
             xmlns=&amp;quot;http://schemas.microsoft.com/winfx/2006/xaml/presentation&amp;quot;
             xmlns:x=&amp;quot;http://schemas.microsoft.com/winfx/2006/xaml&amp;quot;
             xmlns:cal=&amp;quot;http://www.caliburnproject.org&amp;quot;&amp;gt;
    &amp;lt;StackPanel&amp;gt;
        &amp;lt;ItemsControl x:Name=&amp;quot;Items&amp;quot;&amp;gt;
            &amp;lt;ItemsControl.ItemTemplate&amp;gt;
                &amp;lt;DataTemplate&amp;gt;
                    &amp;lt;StackPanel Orientation=&amp;quot;Horizontal&amp;quot;&amp;gt;
                        &amp;lt;Button Content=&amp;quot;Remove&amp;quot;
                                cal:Message.Attach=&amp;quot;Remove($dataContext)&amp;quot; /&amp;gt;
                        &amp;lt;TextBlock Text=&amp;quot;{Binding Id}&amp;quot; /&amp;gt;
                    &amp;lt;/StackPanel&amp;gt;
                &amp;lt;/DataTemplate&amp;gt;
            &amp;lt;/ItemsControl.ItemTemplate&amp;gt;
        &amp;lt;/ItemsControl&amp;gt;
        &amp;lt;Button Content=&amp;quot;Add&amp;quot;
                cal:Message.Attach=&amp;quot;Add&amp;quot; /&amp;gt;
    &amp;lt;/StackPanel&amp;gt;
&amp;lt;/UserControl&amp;gt;&lt;/pre&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;The first thing to notice is that we are using a more Xaml-developer-friendly mechanism for declaring our ActionMessages. The Message.Attach property is backed by a simple parser which takes its textual input and transforms it into the full Interaction.Trigger/ActionMessage that you&amp;rsquo;ve seen previously. If you work primarily in the Xaml editor and not in the designer, you&amp;rsquo;re going to like Message.Attach. Notice that neither Message.Attach declarations specify which event should send the message. If you leave off the event, the parser will use the ConventionManager to determine the default event to use for the trigger. In the case of Button, it&amp;rsquo;s Click. You can always be explicit of coarse. Here&amp;rsquo;s what the full syntax for our Remove message would look like if we were declaring everything:&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;pre name="code" class="xml:nogutter:nocontrols"&gt;&amp;lt;Button Content=&amp;quot;Remove&amp;quot;
        cal:Message.Attach=&amp;quot;[Event Click] = [Action Remove($dataContext)]&amp;quot; /&amp;gt;&lt;/pre&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Suppose we were to re-write our parameterized SayHello action with the Message.Attach syntax. It would look like this:&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;pre name="code" class="xml:nogutter:nocontrols"&gt;&amp;lt;Button Content=&amp;quot;Click Me&amp;quot;
        cal:Message.Attach=&amp;quot;[Event Click] = [Action SayHello(Name.Text)]&amp;quot; /&amp;gt;&lt;/pre&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;But we could also leverage some smart defaults of the parser and do it like this:&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;pre name="code" class="xml:nogutter:nocontrols"&gt;&amp;lt;Button Content=&amp;quot;Click Me&amp;quot;
        cal:Message.Attach=&amp;quot;SayHello(Name)&amp;quot; /&amp;gt;&lt;/pre&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;You can specify literals as parameters as well and even declare multiple actions by separating them with a semicolon:&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;pre name="code" class="xml:nogutter:nocontrols"&gt;&amp;lt;Button Content=&amp;quot;Let&amp;#39;s Talk&amp;quot;
        cal:Message.Attach=&amp;quot;[Event MouseEnter] = [Action Talk(&amp;#39;Hello&amp;#39;, Name.Text)];
                            [Event MouseLeave] = [Action Talk(&amp;#39;Goodbye&amp;#39;, Name.Text)]&amp;quot; /&amp;gt;&lt;/pre&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;WARNING: Those developers who ask me to expand this functionality into a full-blown expression parser will be taken out back and&amp;hellip;dealt with. Message.Attach is not about cramming code into Xaml. It&amp;rsquo;s purpose is to provide a streamlined syntax for declaring when/what messages to send to the ViewModel. Please don&amp;rsquo;t abuse this.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;If you haven&amp;rsquo;t already, run the application. Any doubts you had will hopefully be put to rest when you see that the message bubbling works as advertised :) Something else I would like to point out is that CM automatically performs type-conversion on parameters. So, for example, you can pump TextBox.Text into a System.Double parameter without any fear of a casting issue.&lt;/p&gt;
&lt;p&gt;So, we&amp;rsquo;ve discussed using Interaction.Triggers with ActionMessage, including the use of Parameters with literals, element bindings*** and special values. We&amp;rsquo;ve discussed the various ways to set the action target depending on your needs/architectural style: Action.Target, Action.TargetWithoutContext, Bind.Model or View.Model. We also saw an example of the bubbling nature of ActionMessage and demoed it using the streamlined Message.Attach syntax. All along the way we&amp;rsquo;ve looked at various examples of conventions in action too. Now, there&amp;rsquo;s one final killer feature of ActionMessage we haven&amp;rsquo;t discussed yet&amp;hellip;Coroutines. But, that will have to wait until next time.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;*Currently, the full version of Caliburn is not based on System.Windows.Interactivity. Caliburn&amp;rsquo;s trigger mechanism was around long before Blend&amp;rsquo;s.&amp;nbsp; You may notice a shocking similarity in the markup. That said, Caliburn v2.0 will be migrated to use the Blend model in the near future.&lt;/p&gt;
&lt;p&gt;**Actually, if no handler is found, before an exception is thrown, the framework will check the current DataContext to see if it has the requested method. This seamed like a reasonable fallback behavior.&lt;/p&gt;
&lt;p&gt;***One important detail about ElementName Bindings that I didn&amp;rsquo;t mention&amp;hellip;It doesn&amp;rsquo;t work with WP7 currently. Due to the fact that WP7 is based on a version of Silverlight 3 which had an incomplete implementation of DependencyObject/DependencyProperty, the infrastructure is not present to make this work in any sort of sane way. However, parameter literals and special values still work as described along with all the rest of the ActionMessage features.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://devlicio.us/aggbug.aspx?PostID=61112" width="1" height="1"&gt;&lt;img src="http://feeds.feedburner.com/~r/Devlicious/~4/URtYgLWC0nQ" height="1" width="1"/&gt;</description><category domain="http://devlicio.us/blogs/rob_eisenberg/archive/tags/WPF/default.aspx">WPF</category><category domain="http://devlicio.us/blogs/rob_eisenberg/archive/tags/Xaml/default.aspx">Xaml</category><category domain="http://devlicio.us/blogs/rob_eisenberg/archive/tags/databinding/default.aspx">databinding</category><category domain="http://devlicio.us/blogs/rob_eisenberg/archive/tags/WPF_2F00_e/default.aspx">WPF/e</category><category domain="http://devlicio.us/blogs/rob_eisenberg/archive/tags/Caliburn/default.aspx">Caliburn</category><category domain="http://devlicio.us/blogs/rob_eisenberg/archive/tags/Featured/default.aspx">Featured</category><category domain="http://devlicio.us/blogs/rob_eisenberg/archive/tags/Silverlight/default.aspx">Silverlight</category><category domain="http://devlicio.us/blogs/rob_eisenberg/archive/tags/RIA/default.aspx">RIA</category><category domain="http://devlicio.us/blogs/rob_eisenberg/archive/tags/Tutorial/default.aspx">Tutorial</category><category domain="http://devlicio.us/blogs/rob_eisenberg/archive/tags/MEF/default.aspx">MEF</category><category domain="http://devlicio.us/blogs/rob_eisenberg/archive/tags/MVVM/default.aspx">MVVM</category><category domain="http://devlicio.us/blogs/rob_eisenberg/archive/tags/UI+Architecture/default.aspx">UI Architecture</category><category domain="http://devlicio.us/blogs/rob_eisenberg/archive/tags/Caliburn+Micro/default.aspx">Caliburn Micro</category><feedburner:origLink>http://devlicio.us/blogs/rob_eisenberg/archive/2010/07/17/caliburn-micro-soup-to-nuts-pt-3-all-about-actions.aspx</feedburner:origLink><enclosure url="http://feedproxy.google.com/~r/Devlicious/~5/-cyCfGhFUQQ/Samples.zip" length="30486" type="application/x-zip-compressed" /><feedburner:origEnclosureLink>http://devlicio.us/cfs-file.ashx/__key/CommunityServer.Components.PostAttachments/00.00.06.11.12/Samples.zip</feedburner:origEnclosureLink></item><item><title>How To – Gems And .NET – Dependencies (References)</title><link>http://feedproxy.google.com/~r/Devlicious/~3/QbTb4vONHWY/how-to-gems-and-net-dependencies-references.aspx</link><pubDate>Sat, 17 Jul 2010 13:04:00 GMT</pubDate><guid isPermaLink="false">40756a8b-6212-4073-9d98-6c26781577de:61109</guid><dc:creator>Rob Reynolds</dc:creator><slash:comments>3</slash:comments><description>&lt;p&gt;In my &lt;a target="_blank" href="http://devlicio.us/blogs/rob_reynolds/archive/2010/07/16/how-to-gems-and-net.aspx"&gt;last post&lt;/a&gt; I didn&amp;rsquo;t mention dependencies.&amp;nbsp; Dependencies are their own animal. They require a couple more things to be in place. Let&amp;rsquo;s talk about those things.&lt;/p&gt;
&lt;p&gt;In the .NET world, the dependency for compiled bits is usually an exact version of a reference.&lt;/p&gt;
&lt;p&gt;Let me explain. So for example, you have a reference to log4net, and you don&amp;rsquo;t &lt;a target="_blank" href="http://research.microsoft.com/en-us/people/mbarnett/ilmerge.aspx"&gt;ILMerge&lt;/a&gt; it into your assembly. You now have a dependency that the DLL needs to be there and a particular version (outside of &lt;a target="_blank" href="http://ferventcoder.com/archive/2009/07/19/net-binding-redirects-ndash-updating-referenced-assemblies-without-recompiling-code.aspx"&gt;redirecting the bindings&lt;/a&gt;).&amp;nbsp; So what I&amp;rsquo;m getting at is that you require an exact version of a particular DLL. And what you really need is an exact name, version, culture, and public key token of a DLL.&amp;nbsp; But let&amp;rsquo;s keep things simple. It&amp;rsquo;s really the version and the name when culture is neutral (and the key shouldn&amp;rsquo;t change in the same version). So just the name and version.&lt;/p&gt;
&lt;h4&gt;&lt;strong&gt;Adding a Reference as a Dependency&lt;/strong&gt;&lt;/h4&gt;
&lt;p&gt;For each reference you have to a library, you find out what version it is (assembly version) and then add that as a dependency. You can do that by cracking open reflector and taking a look at the actual assembly version.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://devlicio.us/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/rob_5F00_reynolds/image_5F00_592293C5.png"&gt;&lt;img height="339" width="417" src="http://devlicio.us/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/rob_5F00_reynolds/image_5F00_thumb_5F00_0A41CE66.png" alt="The assembly version" border="0" title="The assembly version" style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" /&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;Don&amp;rsquo;t use the properties. Neither file version or product version are going to be accurate here:&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;a href="http://devlicio.us/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/rob_5F00_reynolds/image_5F00_1645FAED.png"&gt;&lt;img height="328" width="329" src="http://devlicio.us/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/rob_5F00_reynolds/image_5F00_thumb_5F00_2E696548.png" alt="Properties of log4net.dll - file and product verions" border="0" title="Properties of log4net.dll - file and product verions" style="border-bottom:0px;border-left:0px;display:inline;border-top:0px;border-right:0px;" /&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;There is nothing out there that says that assembly, file and informational (also known as product) versions have to be the same. .NET relies on the assembly version for referencing. It makes sense that we should as well. Here&amp;rsquo;s a better example where things are different:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://devlicio.us/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/rob_5F00_reynolds/image_5F00_226538C1.png"&gt;&lt;img height="320" width="277" src="http://devlicio.us/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/rob_5F00_reynolds/image_5F00_thumb_5F00_41A7DF94.png" alt="Castle File Version 1.2.0.6623" border="0" title="Castle File Version 1.2.0.6623" style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" /&gt;&lt;/a&gt; &lt;a href="http://devlicio.us/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/rob_5F00_reynolds/image_5F00_47EEB622.png"&gt;&lt;img height="286" width="354" src="http://devlicio.us/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/rob_5F00_reynolds/image_5F00_thumb_5F00_0DFF7336.png" alt="Castle Assembly Version 1.2.0.0" border="0" title="Castle Assembly Version 1.2.0.0" style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" /&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;So what would I put in my gemspec? If your reference was to log4net version 1.2.10.0, then you need to assign a dependency to that exact version. Done like so:&lt;/p&gt;
&lt;pre name="code" class="ruby"&gt;spec.add_dependency(&amp;#39;log4net&amp;#39;,&amp;#39;= 1.2.10.0&amp;#39;)&lt;/pre&gt;
&lt;p&gt;I believe you add each referenced dependency to it&amp;rsquo;s own line.&lt;/p&gt;
&lt;h4&gt;&lt;strong&gt;Gem Exists?&lt;/strong&gt;&lt;/h4&gt;
&lt;p&gt;Now to the sanity check. Before you even add it as a dependency, you want to ensure that the gem exists.&lt;/p&gt;
&lt;p&gt;Go to &lt;a href="http://rubygems.org"&gt;http://rubygems.org&lt;/a&gt; and in the top right there is a search box. Search for your reference there.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://devlicio.us/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/rob_5F00_reynolds/image_5F00_284185E0.png"&gt;&lt;img height="111" width="554" src="http://devlicio.us/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/rob_5F00_reynolds/image_5F00_thumb_5F00_52CD40F0.png" alt="Search box on RubyGems.org" border="0" title="Search box on RubyGems.org" style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" /&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;So let&amp;rsquo;s search for log4net to be sure it&amp;rsquo;s there.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://devlicio.us/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/rob_5F00_reynolds/image_5F00_3B528CBF.png"&gt;&lt;img height="292" width="404" src="http://devlicio.us/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/rob_5F00_reynolds/image_5F00_thumb_5F00_2CC76ACD.png" alt="Search results for log4net" border="0" title="Search results for log4net" style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" /&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;Sweet! I can move on to my next reference because the right version of the gem exists.&lt;/p&gt;
&lt;p&gt;Keep in mind that the name of the gem may not be the one you are looking for and/or the name may be slightly different. For example. I have a gem for &lt;a target="_blank" href="http://projectuppercut.org/"&gt;UppercuT&lt;/a&gt;. The gem is named &lt;a target="_blank" href="http://rubygems.org/gems/uppercutbuild"&gt;uppercutbuild&lt;/a&gt; because there was already a gem named uppercut.&lt;/p&gt;
&lt;h4&gt;&lt;strong&gt;Gem Doesn&amp;rsquo;t Exist?&lt;/strong&gt;&lt;/h4&gt;
&lt;p&gt;Now if it&amp;rsquo;s not there, you can add it. When the actual authors want to start managing the gem, you can just add them as owners so they can push their own gems.&lt;/p&gt;
&lt;p&gt;To check the owners of a gem you type:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;gem owner &lt;em&gt;gemname&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;a href="http://devlicio.us/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/rob_5F00_reynolds/image_5F00_3CF332C6.png"&gt;&lt;img height="123" width="244" src="http://devlicio.us/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/rob_5F00_reynolds/image_5F00_thumb_5F00_5C35D999.png" alt="Gem owners for log4net" border="0" title="Gem owners for log4net" style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" /&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;To add someone, according to the &lt;a target="_blank" href="http://rubygems.org/pages/gem_docs"&gt;gem docs&lt;/a&gt;, you issue this command (all on one line):&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;gem owner gemname --add &lt;em&gt;users.confirmed.email.address.for.ruby.gems@wherever.com&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;And that&amp;rsquo;s it.&lt;/p&gt;
&lt;p&gt;You see how I am listed as the owner of the log4net gems? I am not really the developer, when I created the gem, I tied it as closely as I could to the apache project and the committers. When those guys are ready to own the gem, I have the specs for both 1.2.9 and 1.2.10 (both are commonly referred to without the last version octet) and I can just add them as owners.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;h4&gt;&lt;strong&gt;Related Posts&lt;/strong&gt;&lt;/h4&gt;
&lt;p&gt;Before you comment about &amp;ldquo;cluttering&amp;rdquo; the ruby community, please be sure to read this (we&amp;rsquo;re with you on this):&amp;nbsp; &lt;a target="_blank" href="http://devlicio.us/blogs/rob_reynolds/archive/2010/07/19/gems-for-net-community-response.aspx" title="http://devlicio.us/blogs/rob_reynolds/archive/2010/07/19/gems-for-net-community-response.aspx"&gt;http://devlicio.us/blogs/rob_reynolds/archive/2010/07/19/gems-for-net-community-response.aspx&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a target="_blank" href="http://devlicio.us/blogs/rob_reynolds/archive/2010/07/15/gems-package-management-for-net.aspx"&gt;Gems - Package Management for .NET&lt;/a&gt; &amp;amp; &lt;a target="_blank" href="http://devlicio.us/blogs/rob_reynolds/archive/2010/07/16/how-to-gems-and-net.aspx"&gt;How To &amp;ndash; Gems &amp;amp; .NET&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a target="_blank" href="http://devlicio.us/blogs/rob_reynolds/archive/2010/07/20/how-to-uppercut-and-gems.aspx"&gt;Walkthrough - Create Gems Even Easier With a Conventional Build (UppercuT)!&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a target="_blank" href="http://devlicio.us/blogs/rob_reynolds/archive/2010/07/26/the-future-of-net-open-source-software-delivery.aspx"&gt;The Future is Now!&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://devlicio.us/aggbug.aspx?PostID=61109" width="1" height="1"&gt;&lt;img src="http://feeds.feedburner.com/~r/Devlicious/~4/QbTb4vONHWY" height="1" width="1"/&gt;</description><category domain="http://devlicio.us/blogs/rob_reynolds/archive/tags/HowTo/default.aspx">HowTo</category><category domain="http://devlicio.us/blogs/rob_reynolds/archive/tags/UppercuT/default.aspx">UppercuT</category><category domain="http://devlicio.us/blogs/rob_reynolds/archive/tags/Development/default.aspx">Development</category><category domain="http://devlicio.us/blogs/rob_reynolds/archive/tags/.NET/default.aspx">.NET</category><category domain="http://devlicio.us/blogs/rob_reynolds/archive/tags/Gems/default.aspx">Gems</category><feedburner:origLink>http://devlicio.us/blogs/rob_reynolds/archive/2010/07/17/how-to-gems-and-net-dependencies-references.aspx</feedburner:origLink></item><item><title>How To - Gems And .NET</title><link>http://feedproxy.google.com/~r/Devlicious/~3/iuCEFTNpDNM/how-to-gems-and-net.aspx</link><pubDate>Fri, 16 Jul 2010 15:30:00 GMT</pubDate><guid isPermaLink="false">40756a8b-6212-4073-9d98-6c26781577de:61095</guid><dc:creator>Rob Reynolds</dc:creator><slash:comments>11</slash:comments><description>&lt;p&gt;In my last &lt;a target="_blank" href="http://devlicio.us/blogs/rob_reynolds/archive/2010/07/15/gems-package-management-for-net.aspx"&gt;post&lt;/a&gt; I showed gems being used for .NET. Now let&amp;rsquo;s talk about How.&amp;nbsp; Most of this stuff I&amp;rsquo;ve learned over the past two days, so if I have a mistake here or you have a better idea, please don&amp;rsquo;t hesitate to offer a better solution.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;The GemSpec&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;The &lt;a target="_blank" href="http://docs.rubygems.org/read/chapter/20"&gt;Gem::Specification reference&lt;/a&gt; is your friend.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;In order to create a gem, you need to define a gem specification, commonly      &lt;br /&gt;called a &amp;ldquo;gemspec&amp;rdquo;. &lt;/p&gt;
&lt;p&gt;A gemspec consists of several &lt;em&gt;attributes&lt;/em&gt;. Some of these are required;       &lt;br /&gt;most of them are optional.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;From here you learn what is required and what will just get you there.&lt;/p&gt;
&lt;h4&gt;&lt;strong&gt;Setup&lt;/strong&gt;&lt;/h4&gt;
&lt;p&gt;1. Create a folder named gems in your top level source directory.&lt;/p&gt;
&lt;p&gt;2. In that folder we are going to put our gemspec and version files. This is where we will store the files in source control (and one of them may become autogenerated). &lt;/p&gt;
&lt;p&gt;3. We will bring our gems folder to our compiled source folder after we build. Then we can add in the compiled output.&lt;/p&gt;
&lt;h4&gt;&lt;strong&gt;GemSpec for .NET&lt;/strong&gt;&lt;/h4&gt;
&lt;p&gt;1. Create a file named &lt;em&gt;project&lt;/em&gt;.gemspec. In our example it is &lt;strong&gt;&lt;em&gt;roundhouse&lt;/em&gt;&lt;/strong&gt;.gemspec. This is the most important file for this entire process. &lt;/p&gt;
&lt;p&gt;&lt;a href="http://devlicio.us/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/rob_5F00_reynolds/image_5F00_011CD097.png"&gt;&lt;img height="141" width="207" src="http://devlicio.us/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/rob_5F00_reynolds/image_5F00_thumb_5F00_727224B1.png" alt="First two files" border="0" title="First two files" style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" /&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;2. Open the gemspec in your favorite notepad editor. Copy the below in and change it for you needs.&lt;/p&gt;
&lt;pre name="code" class="ruby"&gt;version = File.read(File.expand_path(&amp;quot;../VERSION&amp;quot;,__FILE__)).strip

Gem::Specification.new do |spec|
  spec.platform    = Gem::Platform::RUBY
  spec.name        = &amp;#39;roundhouse&amp;#39;
  spec.version     = version
  spec.files = Dir[&amp;#39;lib/**/*&amp;#39;]

  spec.summary     = &amp;#39;RoundhousE - Professional Database Change and Versioning Management&amp;#39;
  spec.description = &amp;#39;RoundhousE is a Professional Database Change and Versioning Management tool&amp;#39;
  
  spec.authors           = [&amp;#39;Rob &amp;quot;FerventCoder&amp;quot; Reynolds&amp;#39;,&amp;#39;Pascal Mestdach&amp;#39;,&amp;#39;Jochen Jonckheere&amp;#39;,&amp;#39;Dru Sellers&amp;#39;]
  spec.email             = &amp;#39;chucknorrisframework@googlegroups.com&amp;#39;
  spec.homepage          = &amp;#39;http://projectroundhouse.org&amp;#39;
  spec.rubyforge_project = &amp;#39;roundhouse&amp;#39;
end&lt;/pre&gt;
&lt;p&gt;3. Just about everything with tick marks above you will edit to suit your needs. spec.name and spec.rubyforge_project (and the gemspec file name) should all match and not be an already existing project name on RubyForge.&lt;/p&gt;
&lt;p&gt;4. If you are a singular author, instead of &lt;em&gt;spec.authors&lt;/em&gt;, replace it with&lt;/p&gt;
&lt;pre name="code" class="ruby"&gt;spec.author = &amp;#39;somebody&amp;#39;&lt;/pre&gt;
&lt;p&gt;You can also set up description for multiple lines.&lt;/p&gt;
&lt;pre name="code" class="ruby"&gt;spec.description = &amp;lt;&amp;lt;-EOF
   Rake is a Make-like program implemented in Ruby. Tasks and
   dependencies are specified in standard Ruby syntax.
 EOF&lt;/pre&gt;
&lt;h4&gt;&lt;strong&gt;Dependencies On Other Libraries &lt;/strong&gt;&lt;/h4&gt;
&lt;p&gt;What we call references. You have a dependency on them existing for your library to run. See this &lt;a target="_blank" href="http://devlicio.us/blogs/rob_reynolds/archive/2010/07/17/how-to-gems-and-net-dependencies-references.aspx"&gt;post&lt;/a&gt;.&lt;/p&gt;
&lt;h4&gt;&lt;strong&gt;VERSION file&lt;/strong&gt;&lt;/h4&gt;
&lt;p&gt;This file is stupid simple. It&amp;rsquo;s a version number. I believe you can put whatever you want in here. Use the Assembly Version number here and stick with the .NET 4 octets of numbers (like &lt;em&gt;0.0.0.0) &lt;/em&gt;for version. &lt;/p&gt;
&lt;p&gt;1. Create a file named VERSION.&lt;/p&gt;
&lt;p&gt;2. Open it in your favorite editor and put the version you want here.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://devlicio.us/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/rob_5F00_reynolds/image_5F00_46C15AB5.png"&gt;&lt;img height="119" width="244" src="http://devlicio.us/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/rob_5F00_reynolds/image_5F00_thumb_5F00_57C58898.png" alt="VERSION with 0.5.0.242 as contents of file" border="0" title="VERSION with 0.5.0.242 as contents of file" style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" /&gt;&lt;/a&gt; &lt;/p&gt;
&lt;h4&gt;&lt;strong&gt;Libraries&lt;/strong&gt;&lt;/h4&gt;
&lt;p&gt;1. Create a folder called &lt;strong&gt;lib&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://devlicio.us/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/rob_5F00_reynolds/image_5F00_046E4272.png"&gt;&lt;img height="153" width="243" src="http://devlicio.us/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/rob_5F00_reynolds/image_5F00_thumb_5F00_5CC7C647.png" alt="adding in lib folder" border="0" title="adding in lib folder" style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" /&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;2. Copy &lt;strong&gt;YOUR&lt;/strong&gt; compiled DLLs into here. Your references (or dependencies) should not go here. See &lt;a target="_blank" href="http://devlicio.us/blogs/rob_reynolds/archive/2010/07/17/how-to-gems-and-net-dependencies-references.aspx"&gt;How To: Gems and .NET - Dependencies&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;a href="http://devlicio.us/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/rob_5F00_reynolds/image_5F00_486B52F9.png"&gt;&lt;img height="434" width="335" src="http://devlicio.us/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/rob_5F00_reynolds/image_5F00_thumb_5F00_726B5121.png" alt="Put your dlls in lib folder" border="0" title="Put your dlls in lib folder" style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" /&gt;&lt;/a&gt; &lt;/p&gt;
&lt;h4&gt;&lt;strong&gt;Documentation&lt;/strong&gt;&lt;/h4&gt;
&lt;p&gt;Create a docs folder. In that folder goes your documentation. This could be release notes, a ReadMe, actual documentation. This area is open. Just make sure you add the docs folder to the specification.&lt;/p&gt;
&lt;pre name="code" class="ruby"&gt;spec.files = Dir[&amp;#39;lib/**/*&amp;#39;] + Dir[&amp;#39;docs/**/*&amp;#39;]&lt;/pre&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;h4&gt;&lt;strong&gt;Executables&lt;/strong&gt;&lt;/h4&gt;
&lt;p&gt;If you want to give someone the ability to run an executable from the command line after installing your application with gems, and you use .NET, this is how you do it.&lt;/p&gt;
&lt;p&gt;1. Create a folder named &lt;strong&gt;bin&lt;/strong&gt; as a subdirectory next to the gemspec.&lt;/p&gt;
&lt;p&gt;2. Put your executable (and dependencies) into the bin directory.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://devlicio.us/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/rob_5F00_reynolds/image_5F00_0536828F.png"&gt;&lt;img height="171" width="244" src="http://devlicio.us/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/rob_5F00_reynolds/image_5F00_thumb_5F00_4494361F.png" alt="create a bin directory" border="0" title="create a bin directory" style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" /&gt;&lt;/a&gt; &lt;a href="http://devlicio.us/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/rob_5F00_reynolds/image_5F00_75B370BF.png"&gt;&lt;img height="244" width="222" src="http://devlicio.us/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/rob_5F00_reynolds/image_5F00_thumb_5F00_65C42BFB.png" alt="stand alone executable in bin" border="0" title="stand alone executable in bin" style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" /&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;3. Create your shim file (it&amp;rsquo;s named what you would type at the command line). I&amp;rsquo;ve called mine &lt;strong&gt;rh&lt;/strong&gt;. The one above allows ruby to be able to actually execute the Windows executable. Let&amp;rsquo;s open it and see what it looks like. This, we learned from an answer to a &lt;a target="_blank" href="http://stackoverflow.com/questions/3250794/gems-with-net-applications-how-do-i-set-up-the-executables-so-they-run-without"&gt;post on stack overflow&lt;/a&gt;.&amp;nbsp; This shim also goes in source control&lt;/p&gt;
&lt;pre name="code" class="ruby"&gt;result = system(File.dirname(__FILE__) + &amp;quot;/rh.exe &amp;quot; + ARGV.join(&amp;#39; &amp;#39;))
exit 1 unless result&lt;/pre&gt;
&lt;p&gt;4. Don&amp;rsquo;t forget that space at the end of your executable name.&lt;/p&gt;
&lt;p&gt;5. Open your gemspec. We need to make sure we have spec.executables filled out and our new directory added to our Files.&lt;/p&gt;
&lt;pre name="code" class="ruby"&gt;version = File.read(File.expand_path(&amp;quot;../VERSION&amp;quot;,__FILE__)).strip

Gem::Specification.new do |spec|
  spec.platform    = Gem::Platform::RUBY
  spec.name        = &amp;#39;roundhouse&amp;#39;
  spec.version     = version
  spec.files = Dir[&amp;#39;lib/**/*&amp;#39;] + Dir[&amp;#39;docs/**/*&amp;#39;] + Dir[&amp;#39;bin/**/*&amp;#39;]
  spec.bindir = &amp;#39;bin&amp;#39;
  spec.executables &amp;lt;&amp;lt; &amp;#39;rh&amp;#39;

  spec.summary     = &amp;#39;RoundhousE - Professional Database Change and Versioning Management&amp;#39;
  spec.description = &amp;#39;RoundhousE is a Professional Database Change and Versioning Management tool&amp;#39;
  
  spec.authors           = [&amp;#39;Rob &amp;quot;FerventCoder&amp;quot; Reynolds&amp;#39;,&amp;#39;Pascal Mestdach&amp;#39;,&amp;#39;Jochen Jonckheere&amp;#39;,&amp;#39;Dru Sellers&amp;#39;]
  spec.email             = &amp;#39;chucknorrisframework@googlegroups.com&amp;#39;
  spec.homepage          = &amp;#39;http://projectroundhouse.org&amp;#39;
  spec.rubyforge_project = &amp;#39;roundhouse&amp;#39;
end&lt;/pre&gt;
&lt;h4&gt;&lt;strong&gt;Build And Push&lt;/strong&gt;&lt;/h4&gt;
&lt;p&gt;You must already have &lt;a target="_blank" href="http://www.ruby-lang.org/en/downloads/"&gt;Ruby&lt;/a&gt; (1.8.6 or better) and &lt;a target="_blank" href="http://rubygems.org/pages/download"&gt;RubyGems&lt;/a&gt; installed and/or updated to at least 1.3.7 (gem update &amp;ndash;system). You will want to use a RubyInstaller version of Ruby under the &lt;strong&gt;Ruby on Windows &lt;/strong&gt;section.&lt;/p&gt;
&lt;p&gt;1. Open a command line and type &lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;gem build &lt;em&gt;&lt;strong&gt;project&lt;/strong&gt;&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;2. If there are no issues, you should have a gem for upload.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://devlicio.us/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/rob_5F00_reynolds/image_5F00_237113B8.png"&gt;&lt;img height="83" width="244" src="http://devlicio.us/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/rob_5F00_reynolds/image_5F00_thumb_5F00_378A3041.png" alt="roundhouse-0.5.0.242.gem" border="0" title="roundhouse-0.5.0.242.gem" style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" /&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;&lt;a href="http://devlicio.us/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/rob_5F00_reynolds/image_5F00_4AA0473E.png"&gt;&lt;img height="83" width="485" src="http://devlicio.us/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/rob_5F00_reynolds/image_5F00_thumb_5F00_29ACD497.png" alt="roundhouse-0.5.0.242.gem" border="0" title="roundhouse-0.5.0.242.gem" style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" /&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;3. Create an account with &lt;a target="_blank" href="http://rubygems.org/"&gt;RubyGems.org&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;4. Ensure your project name isn&amp;rsquo;t already taken by searching for it. If it is you will need to rename your gemspec file, spec.name, and spec.rubyforge_project to a name that is not taken.&lt;/p&gt;
&lt;p&gt;5. Type the following command:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;gem push &lt;strong&gt;&lt;em&gt;project&lt;/em&gt;&lt;/strong&gt;_&lt;strong&gt;&lt;em&gt;someversionnumbers&lt;/em&gt;&lt;/strong&gt;.gem&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;a href="http://devlicio.us/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/rob_5F00_reynolds/image_5F00_3DD106CF.png"&gt;&lt;img height="57" width="244" src="http://devlicio.us/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/rob_5F00_reynolds/image_5F00_thumb_5F00_215414EF.png" alt="gem push roundhouse" border="0" title="gem push roundhouse" style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" /&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;6. Let it finish. Head out to rubygems.org and look at your shiny, new gem!&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;a href="http://devlicio.us/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/rob_5F00_reynolds/image_5F00_077FDEC0.png"&gt;&lt;img height="244" width="240" src="http://devlicio.us/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/rob_5F00_reynolds/image_5F00_thumb_5F00_71694D60.png" alt="sweet!" border="0" title="sweet!" style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" /&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;7. Test it.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;gem install &lt;em&gt;&lt;strong&gt;project&lt;/strong&gt;&lt;/em&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;gem uninstall &lt;strong&gt;&lt;em&gt;project&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;FollowUp&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;In my next post, I&amp;rsquo;ll show you how to make it stupid simple. &lt;a target="_blank" href="http://projectuppercut.org"&gt;UppercuT&lt;/a&gt; will support this feature natively so all you have to do is have a directory called gems (at the top level of your source) with the gemspec. During the build, it will create the VERSION file and copy your output the the lib folder (custom step for bin folder will be necessary). Then it will execute a step that builds the gem. All for the price of &amp;ldquo;build&amp;rdquo;. That&amp;rsquo;s coming up in the next blog post. In the meantime, feel free to ask any questions you have. Stay tuned&amp;hellip;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;h4&gt;&lt;strong&gt;Related Posts&lt;/strong&gt;&lt;/h4&gt;
&lt;p&gt;Before you comment about &amp;ldquo;cluttering&amp;rdquo; the ruby community, please be sure to read this (we&amp;rsquo;re with you on this):&amp;nbsp; &lt;a target="_blank" href="http://devlicio.us/blogs/rob_reynolds/archive/2010/07/19/gems-for-net-community-response.aspx" title="http://devlicio.us/blogs/rob_reynolds/archive/2010/07/19/gems-for-net-community-response.aspx"&gt;http://devlicio.us/blogs/rob_reynolds/archive/2010/07/19/gems-for-net-community-response.aspx&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a target="_blank" href="http://devlicio.us/blogs/rob_reynolds/archive/2010/07/15/gems-package-management-for-net.aspx"&gt;Gems - Package Management for .NET&lt;/a&gt; &amp;amp; &lt;a target="_blank" href="http://devlicio.us/blogs/rob_reynolds/archive/2010/07/17/how-to-gems-and-net-dependencies-references.aspx"&gt;How To &amp;ndash; Gems &amp;amp; .NET - Dependencies (References)&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a target="_blank" href="http://devlicio.us/blogs/rob_reynolds/archive/2010/07/20/how-to-uppercut-and-gems.aspx"&gt;Walkthrough - Create Gems Even Easier With a Conventional Build (UppercuT)!&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a target="_blank" href="http://devlicio.us/blogs/rob_reynolds/archive/2010/07/26/the-future-of-net-open-source-software-delivery.aspx"&gt;The Future is Now!&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://devlicio.us/aggbug.aspx?PostID=61095" width="1" height="1"&gt;&lt;img src="http://feeds.feedburner.com/~r/Devlicious/~4/iuCEFTNpDNM" height="1" width="1"/&gt;</description><category domain="http://devlicio.us/blogs/rob_reynolds/archive/tags/HowTo/default.aspx">HowTo</category><category domain="http://devlicio.us/blogs/rob_reynolds/archive/tags/UppercuT/default.aspx">UppercuT</category><category domain="http://devlicio.us/blogs/rob_reynolds/archive/tags/Development/default.aspx">Development</category><category domain="http://devlicio.us/blogs/rob_reynolds/archive/tags/.NET/default.aspx">.NET</category><category domain="http://devlicio.us/blogs/rob_reynolds/archive/tags/Gems/default.aspx">Gems</category><feedburner:origLink>http://devlicio.us/blogs/rob_reynolds/archive/2010/07/16/how-to-gems-and-net.aspx</feedburner:origLink></item><item><title>Gems - Package Management For .NET</title><link>http://feedproxy.google.com/~r/Devlicious/~3/6cvbiETraAo/gems-package-management-for-net.aspx</link><pubDate>Fri, 16 Jul 2010 04:27:00 GMT</pubDate><guid isPermaLink="false">40756a8b-6212-4073-9d98-6c26781577de:61091</guid><dc:creator>Rob Reynolds</dc:creator><slash:comments>17</slash:comments><description>&lt;p&gt;The Ruby community has enjoyed a great user experience with a package management system they use called Gems. A gem is a package (or a library), compressed with some additional metadata, and can be either source files or binaries. Let&amp;rsquo;s focus on binary gems. We have the same concept in .NET (DLLs/EXEs). You may have references to other DLLs. When you want to update a reference you are using on a project, you may also need to update its dependencies as well. And so on and so forth. A package management project is meant to help make that easier. It&amp;rsquo;s actually really hard to explain what gems or package management without just showing you. So take a look here:&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &lt;a href="http://devlicio.us/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/rob_5F00_reynolds/image_5F00_5AC297E8.png"&gt;&lt;img height="181" width="455" src="http://devlicio.us/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/rob_5F00_reynolds/image_5F00_thumb_5F00_0456631C.png" alt="gem install sidepop - installed log4net - installed sidepop" border="0" title="gem install sidepop - installed log4net - installed sidepop" style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;I type:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;gem install sidepop&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;And that&amp;rsquo;s it. It looks and sees that I have a dependency on log4net. Notice how it nicely just pulls down log4net version 1.2.10 as well? &lt;/p&gt;
&lt;h4&gt;&lt;strong&gt;Background&lt;/strong&gt;&lt;/h4&gt;
&lt;p&gt;I can count on one hand all of the package management projects that have been &lt;a target="_blank" href="http://strangelights.com/blog/archive/2010/05/16/1661.aspx"&gt;started&lt;/a&gt; &lt;a target="_blank" href="http://github.com/dagda1/horn_src"&gt;for&lt;/a&gt; &lt;a target="_blank" href="http://github.com/phatboyg/nu"&gt;.NET&lt;/a&gt;. &lt;a target="_blank" href="http://twitter.com/drusellers"&gt;Dru Sellers&lt;/a&gt;, &lt;a target="_blank" href="http://twitter.com/phatboyg"&gt;Chris Patterson&lt;/a&gt;, and I have talked about package management stuff from time to time. Dru and Chris have been a part of one project (&lt;a target="_blank" href="http://github.com/phatboyg/nu"&gt;Nu&lt;/a&gt;) that has been started several times to start to answer this question. We&amp;rsquo;ve participated on the mailing list for &lt;a target="_blank" href="http://groups.google.com/group/horn-development"&gt;HornGet&lt;/a&gt;. At one point I casually asked why we couldn&amp;rsquo;t just use gems. Other people out there have probably stated the same thing. But no one has really carried the idea forward. Until now.&lt;/p&gt;
&lt;p&gt;Yesterday Dru asked for a &lt;a target="_blank" href="http://code.google.com/p/uppercut/issues/detail?id=16"&gt;gem-ify&lt;/a&gt; feature for &lt;a target="_blank" href="http://projectuppercut.org"&gt;UppercuT&lt;/a&gt;. We started talking and looking at how easy it is to create a gem. Then we figured out how to make the &lt;a target="_blank" href="http://stackoverflow.com/questions/3250794/gems-with-net-applications-how-do-i-set-up-the-executables-so-they-run-without"&gt;executables&lt;/a&gt; piece work as well. This is where you can install a gem and then call the executable from the command line anywhere and get output. From the &lt;a target="_blank" href="http://groups.google.com/group/chucknorrisframework/browse_thread/thread/4f0c0deeadbd61d4"&gt;thread&lt;/a&gt; on &lt;a target="_blank" href="http://groups.google.com/group/chucknorrisframework/"&gt;ChuckNorris&lt;/a&gt; where we talked about this:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Here is something you might find pretty interesting: &lt;a target="_blank" href="http://rubygems.org/gems/roundhouse"&gt;http://rubygems.org/gems/roundhouse&lt;/a&gt;&amp;nbsp;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;a href="http://rubygems.org/gems/roundhouse"&gt;&lt;/a&gt;If you have ruby installed, you can install roundhouse now from the command line:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;gem install roundhouse&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;This gives you the opportunity to type this anywhere:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;rh &amp;lt;options&amp;gt;&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h4&gt;&lt;strong&gt;Why Should I Care?&lt;/strong&gt;&lt;/h4&gt;
&lt;p&gt;If you work with Open Source, you know how much of a pain it can be to update your references. You update one library, say NHibernate, and find out that you also need to update your references to Castle. And possibly, you might then need to update your references to log4net. It can be a painful process. This is the start of answering that question.&lt;/p&gt;
&lt;h4&gt;&lt;strong&gt;&lt;strong&gt;&lt;a href="http://devlicio.us/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/rob_5F00_reynolds/image_5F00_18034CB0.png"&gt;&lt;img height="221" width="404" src="http://devlicio.us/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/rob_5F00_reynolds/image_5F00_thumb_5F00_76A3A713.png" align="right" alt="Right now it&amp;#39;s starting to look like the answer for gems in .NET is just gems." border="0" title="Right now it&amp;#39;s starting to look like the answer for gems in .NET is just gems." style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;margin-left:0px;border-left-width:0px;margin-right:0px;" /&gt;&lt;/a&gt;&lt;/strong&gt;Why Should I Get Excited?&lt;/strong&gt;&lt;/h4&gt;
&lt;p&gt;It sounds like &lt;a target="_blank" href="http://twitter.com/jeremydmiller/statuses/18628012354"&gt;Jeremy Miller&lt;/a&gt; among others are getting excited about this. And why not? We&amp;rsquo;ve been trying to answer the gems question since Ruby made it so easy. &lt;/p&gt;
&lt;p&gt;The implications of this are awesome! I still haven&amp;rsquo;t fully grokked what we&amp;rsquo;ve just opened up.&amp;nbsp; But it&amp;rsquo;s huge! &lt;/p&gt;
&lt;p&gt;It doesn&amp;rsquo;t get us all of the way there to updating the references in our source code folder. That&amp;rsquo;s where projects, like Nu, are going to start showing up that leverage the idea of using the gems infrastructure to get the libraries from the ruby folders to your source code folder. You are going to see UppercuT come back soon with taking care of getting your gem built with the proper version.&lt;/p&gt;
&lt;p&gt;This is the start of something very cool.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;h4&gt;&lt;strong&gt;Related Posts&lt;/strong&gt;&lt;/h4&gt;
&lt;p&gt;Before you comment about &amp;ldquo;cluttering&amp;rdquo; the ruby community, please be sure to read this (we&amp;rsquo;re with you on this):&amp;nbsp; &lt;a target="_blank" href="http://devlicio.us/blogs/rob_reynolds/archive/2010/07/19/gems-for-net-community-response.aspx" title="http://devlicio.us/blogs/rob_reynolds/archive/2010/07/19/gems-for-net-community-response.aspx"&gt;http://devlicio.us/blogs/rob_reynolds/archive/2010/07/19/gems-for-net-community-response.aspx&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a target="_blank" href="http://devlicio.us/blogs/rob_reynolds/archive/2010/07/16/how-to-gems-and-net.aspx"&gt;How To - Gems and .NET&lt;/a&gt;&amp;nbsp; and &lt;a target="_blank" href="http://devlicio.us/blogs/rob_reynolds/archive/2010/07/17/how-to-gems-and-net-dependencies-references.aspx"&gt;How To &amp;ndash; Gems &amp;amp; .NET - Dependencies (References)&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a target="_blank" href="http://devlicio.us/blogs/rob_reynolds/archive/2010/07/20/how-to-uppercut-and-gems.aspx"&gt;Walkthrough &amp;ndash; Create Gems Even Easier With a Conventional Build (UppercuT)!&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a target="_blank" href="http://devlicio.us/blogs/rob_reynolds/archive/2010/07/26/the-future-of-net-open-source-software-delivery.aspx"&gt;The Future is Now!&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://devlicio.us/aggbug.aspx?PostID=61091" width="1" height="1"&gt;&lt;img src="http://feeds.feedburner.com/~r/Devlicious/~4/6cvbiETraAo" height="1" width="1"/&gt;</description><category domain="http://devlicio.us/blogs/rob_reynolds/archive/tags/RoundhousE/default.aspx">RoundhousE</category><category domain="http://devlicio.us/blogs/rob_reynolds/archive/tags/SidePOP/default.aspx">SidePOP</category><category domain="http://devlicio.us/blogs/rob_reynolds/archive/tags/UppercuT/default.aspx">UppercuT</category><category domain="http://devlicio.us/blogs/rob_reynolds/archive/tags/Development/default.aspx">Development</category><category domain="http://devlicio.us/blogs/rob_reynolds/archive/tags/Tools/default.aspx">Tools</category><category domain="http://devlicio.us/blogs/rob_reynolds/archive/tags/.NET/default.aspx">.NET</category><category domain="http://devlicio.us/blogs/rob_reynolds/archive/tags/Gems/default.aspx">Gems</category><feedburner:origLink>http://devlicio.us/blogs/rob_reynolds/archive/2010/07/15/gems-package-management-for-net.aspx</feedburner:origLink></item><item><title>Announcing SharpRobotica.com ...the softer side of robotics</title><link>http://feedproxy.google.com/~r/Devlicious/~3/K0u46VuehvE/announcing-sharprobotica-com-for-the-softer-side-of-robotics.aspx</link><pubDate>Tue, 13 Jul 2010 03:47:00 GMT</pubDate><guid isPermaLink="false">40756a8b-6212-4073-9d98-6c26781577de:61075</guid><dc:creator>Billy McCafferty</dc:creator><slash:comments>1</slash:comments><description>&lt;p&gt;After confidentaly turning over the reigns of &lt;a href="http://wiki.sharparchitecture.net"&gt;S#arp Architecture&lt;/a&gt; to the adept and au fait hands of&amp;nbsp;&lt;a href="http://weblogs.asp.net/alecwhittington/"&gt;Alec Whittington&lt;/a&gt;, I&amp;nbsp;capriciously&amp;nbsp;&lt;a href="http://devlicio.us/blogs/billy_mccafferty/archive/2010/02/03/software-architectural-approaches-for-robotics.aspx"&gt;announced&lt;/a&gt; that I&amp;#39;d be turning my writing attentions towards robotics...with the diabolical intentions of taking over the world (obviously).&lt;/p&gt;
&lt;p&gt;It became apparent after a few posts that the direction I began taking was diverging far from the subject matter of my&amp;nbsp;esteemed&amp;nbsp;colleagues at devlicio.us. &amp;nbsp;Rather than dilute the theme of&amp;nbsp;devlicio.us, I figured it was time to create the proper context for such topics...&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.sharprobotica.com/"&gt;&lt;img src="http://www.sharprobotica.com/wp-content/themes/starscape/styles/logos/sharp_robotica.png" border="0" style="max-width:550px;border:0;float:right;" alt="" /&gt;&lt;/a&gt;It&amp;#39;s my great pleasure to announce the humble beginnings of &lt;a href="http://www.sharprobotica.com/"&gt;SharpRobotica.com&lt;/a&gt;. &amp;nbsp;This blogging community (with an author population of uno at the moment, being yours truly) emphasizes and explores the software side of robotics. &amp;nbsp;While there are many robotic sites, the focus of SharpRobotica.com, accordingly, is in bringing professional software techniques and insight to this vernal, yet burgeoning, industry.&lt;/p&gt;
&lt;p&gt;For years, hardware lagged far behind software in the world of robotics; developers were tirelessly constrained by the performance and capabilities of the available hardware platforms. &amp;nbsp;But with the &lt;a href="http://upload.wikimedia.org/wikipedia/commons/6/68/Shakey.png"&gt;hardware&lt;/a&gt; of &lt;a href="http://www.aldebaran-robotics.com/en"&gt;robotics&lt;/a&gt; &lt;a href="http://www.bostondynamics.com/robot_littledog.html"&gt;becoming&lt;/a&gt;&amp;nbsp;&lt;a href="http://robotic.media.mit.edu"&gt;startlingly&lt;/a&gt;&amp;nbsp;&lt;a href="http://www.robotcub.org/"&gt;sophisticated&lt;/a&gt;, there is now incredible opportunity and demand for solid algorithms and software solutions for balancing the scale once again, by creating software which can adeptly take advantage of available robotics hardware to conquer ever challenging contexts such as &lt;a href="http://www.france24.com/en/20100712-robots-replace-cap-over-gushing-bp-oil-well"&gt;underwater&lt;/a&gt;, &lt;a href="http://robonaut.jsc.nasa.gov/default.asp"&gt;space&lt;/a&gt;, &lt;a href="http://www.pcworld.com/article/186576/true_companion_sexbot_alters_the_dating_landscape.html"&gt;entertainment&lt;/a&gt;, &lt;a href="http://www.scientificamerican.com/article.cfm?id=three-mile-island-robots"&gt;hazardous environments&lt;/a&gt;, and &lt;a href="http://www.zygbotics.com/2009/03/27/robot-nurses-to-care-for-japanese-elderly-within-five-year/"&gt;in the home&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;So if you have an interest in robotics and/or interested in applying your software skills to a completely new context, many of the posts and discussions might be right up your alley. &amp;nbsp;Also, &lt;strong&gt;if you&amp;#39;re interested in being an author on SharpRobotica.com&lt;/strong&gt;, &lt;a href="http://www.sharprobotica.com/wp-login.php?action=register"&gt;sign up&lt;/a&gt; as a user and &lt;a href="http://www.sharprobotica.com/?page_id=186"&gt;let me know you&amp;#39;re interested&lt;/a&gt;!&lt;/p&gt;
&lt;p&gt;So while I&amp;#39;ll still be showing up now and again on devlicio.us...I invite you to also&amp;nbsp;&lt;a href="http://www.sharprobotica.com/?feed=rss2"&gt;subscribe&lt;/a&gt; for a gander to SharpRobotica.com.&lt;/p&gt;
&lt;p&gt;Enjoy!&lt;br /&gt;Billy McCafferty&amp;nbsp;&lt;/p&gt;
&lt;p&gt;P.S. Thanks &lt;a href="http://codebetter.com/blogs/brendan.tompkins/"&gt;Mr. Tompkins&lt;/a&gt; (audacious&amp;nbsp;founder of &lt;a href="http://codebetter.com/"&gt;CodeBetter.com&lt;/a&gt; and &lt;a href="http://devlicio.us/"&gt;devlicio.us&lt;/a&gt;) for the support of this announcement!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://devlicio.us/aggbug.aspx?PostID=61075" width="1" height="1"&gt;&lt;img src="http://feeds.feedburner.com/~r/Devlicious/~4/K0u46VuehvE" height="1" width="1"/&gt;</description><category domain="http://devlicio.us/blogs/billy_mccafferty/archive/tags/Robotics/default.aspx">Robotics</category><feedburner:origLink>http://devlicio.us/blogs/billy_mccafferty/archive/2010/07/12/announcing-sharprobotica-com-for-the-softer-side-of-robotics.aspx</feedburner:origLink></item><item><title>Updated Bits for WP7 – Beta Build</title><link>http://feedproxy.google.com/~r/Devlicious/~3/LgGU9uEU0vM/updated-bits-for-wp7-beta-build.aspx</link><pubDate>Mon, 12 Jul 2010 20:56:00 GMT</pubDate><guid isPermaLink="false">40756a8b-6212-4073-9d98-6c26781577de:61069</guid><dc:creator>Derik Whittaker</dc:creator><slash:comments>2</slash:comments><description>&lt;p&gt;Today MS announced an updated release of the WP7 tools.&amp;nbsp; I can tell you from using intermediate builds this is getting better and better.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Check out the build here - &lt;a title="http://www.microsoft.com/downloads/details.aspx?FamilyID=c8496c2a-54d9-4b11-9491-a1bfaf32f2e3&amp;amp;displaylang=en" href="http://www.microsoft.com/downloads/details.aspx?FamilyID=c8496c2a-54d9-4b11-9491-a1bfaf32f2e3&amp;amp;displaylang=en"&gt;http://www.microsoft.com/downloads/details.aspx?FamilyID=c8496c2a-54d9-4b11-9491-a1bfaf32f2e3&amp;amp;displaylang=en&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Have fun with the new Bits.&lt;/p&gt;
&lt;p&gt;Oh, and great job WP7 Team.&lt;/p&gt;
&lt;p&gt;Till next time,&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://devlicio.us/aggbug.aspx?PostID=61069" width="1" height="1"&gt;&lt;img src="http://feeds.feedburner.com/~r/Devlicious/~4/LgGU9uEU0vM" height="1" width="1"/&gt;</description><category domain="http://devlicio.us/blogs/derik_whittaker/archive/tags/WP7/default.aspx">WP7</category><feedburner:origLink>http://devlicio.us/blogs/derik_whittaker/archive/2010/07/12/updated-bits-for-wp7-beta-build.aspx</feedburner:origLink></item><item><title>'ServiceReferences.ClientConfig' in the .xap application package Error in WP7</title><link>http://feedproxy.google.com/~r/Devlicious/~3/3kqXW8U1tnc/servicereferences-clientconfig-in-the-xap-application-package-error-in-wp7.aspx</link><pubDate>Mon, 12 Jul 2010 13:53:26 GMT</pubDate><guid isPermaLink="false">40756a8b-6212-4073-9d98-6c26781577de:61067</guid><dc:creator>Derik Whittaker</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;If you are trying to create a WP7 (or any silverlight project for that matter) and you are trying to access a WCF web service you may receive the following error when you try to create an instance of the WCF service.&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;Cannot find &amp;#39;ServiceReferences.ClientConfig&amp;#39; in the .xap application package. This file is used to configure client proxies for web services, and allows the application to locate the services it needs. Either include this file in the application package, or modify your code to use a client proxy constructor that specifies the service address and binding explicitly. Please see inner exception for details.&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;In my project I saw this because my WCF service references were NOT in the UI project, they were in a common/domain project.&amp;#160; Because of this the ServiceReferences.ClientConfig file was not being put in to the .xap package.&amp;#160; To solve this you simply need add a reference of the ServiceREferences.ClientConfig file inside your UI project.&amp;#160; Recompile and the problem goes away.&lt;/p&gt;  &lt;p&gt;Hope this helps.&lt;/p&gt;  &lt;p&gt;Till next time,&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://devlicio.us/aggbug.aspx?PostID=61067" width="1" height="1"&gt;&lt;img src="http://feeds.feedburner.com/~r/Devlicious/~4/3kqXW8U1tnc" height="1" width="1"/&gt;</description><category domain="http://devlicio.us/blogs/derik_whittaker/archive/tags/WP7/default.aspx">WP7</category><category domain="http://devlicio.us/blogs/derik_whittaker/archive/tags/Silverlight/default.aspx">Silverlight</category><feedburner:origLink>http://devlicio.us/blogs/derik_whittaker/archive/2010/07/12/servicereferences-clientconfig-in-the-xap-application-package-error-in-wp7.aspx</feedburner:origLink></item><item><title>Thank You Activision! King’s Quest Lives On!</title><link>http://feedproxy.google.com/~r/Devlicious/~3/yg7Ru2hqL5w/thank-you-activision-king-s-quest-lives-on.aspx</link><pubDate>Sat, 10 Jul 2010 19:40:00 GMT</pubDate><guid isPermaLink="false">40756a8b-6212-4073-9d98-6c26781577de:61048</guid><dc:creator>Rob Eisenberg</dc:creator><slash:comments>2</slash:comments><description>&lt;p&gt;&lt;a target="_blank" href="http://devlicio.us/blogs/rob_eisenberg/archive/2010/03/09/help-save-king-s-quest.aspx"&gt;Some months back&lt;/a&gt; I blogged about &lt;a target="_blank" href="http://www.tsl-game.com/"&gt;&amp;ldquo;The Silver Lining,&amp;rdquo;&lt;/a&gt; a King&amp;rsquo;s Quest fan project that&amp;rsquo;s been in development for almost eight years.&amp;nbsp; I was upset because Activision, after acquiring Vivendi-Universal, decided to shutdown the project. Well, it seams that things have changed! Activision has granted Phoenix Online a full non-profit license to release all five episodes over the coarse of 2010. Thank you Activision! You did something really good. In about 20 minutes from now, &lt;a target="_blank" href="http://www.tsl-game.com/episode_i.php"&gt;Episode 1: What is Decreed Must Be&lt;/a&gt;, releases to web.&amp;nbsp; Here&amp;rsquo;s the &lt;a target="_blank" href="http://www.tsl-game.com/episodes.php"&gt;list of episodes&lt;/a&gt; planned in the series:&lt;/p&gt;
&lt;p&gt;&lt;a target="_blank" href="http://www.tsl-game.com/episode_i.php"&gt;Episode 1: What Is Decreed Must Be&lt;/a&gt;    &lt;br /&gt;Episode 2: Two Households    &lt;br /&gt;Episode 3: My Only Love Sprung From My Only Hate    &lt;br /&gt;Episode 4: &amp;lsquo;Tis In My Memory Locked, And You Yourself Shall Hold The Key Of It    &lt;br /&gt;Episode 5: A Thousand Times Goodnight&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Can you tell I&amp;rsquo;m excited?! Counting down the minutes&amp;hellip;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://devlicio.us/aggbug.aspx?PostID=61048" width="1" height="1"&gt;&lt;img src="http://feeds.feedburner.com/~r/Devlicious/~4/yg7Ru2hqL5w" height="1" width="1"/&gt;</description><feedburner:origLink>http://devlicio.us/blogs/rob_eisenberg/archive/2010/07/10/thank-you-activision-king-s-quest-lives-on.aspx</feedburner:origLink></item><item><title>Do Story Points Relate to Complexity or Time? Response</title><link>http://feedproxy.google.com/~r/Devlicious/~3/FG0lt2n5tj8/do-story-points-relate-to-complexity-or-time-response.aspx</link><pubDate>Fri, 09 Jul 2010 02:24:57 GMT</pubDate><guid isPermaLink="false">40756a8b-6212-4073-9d98-6c26781577de:61033</guid><dc:creator>Rob Reynolds</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;I was recently pointed to an InfoQ article titled &lt;a href="http://www.infoq.com/news/2010/07/story-points-complexity-effort" target="_blank"&gt;Do Story Points Relate to Complexity or Time?&lt;/a&gt; It mentions that some teams estimate by a matter of complexity versus how long in effort something will take. &lt;a href="http://blog.mountaingoatsoftware.com/" target="_blank"&gt;Mike Cohn&lt;/a&gt;, who wrote the original post &lt;a href="http://blog.mountaingoatsoftware.com/its-effort-not-complexity" target="_blank"&gt;It’s Effort, Not Complexity&lt;/a&gt;, makes some very good points into how people should estimate based on how much time a story will take to finish versus another story. Relative effort, not complexity. The argument here is that complexity should not matter if two stories take the same amount of time to complete.&lt;/p&gt;  &lt;p&gt;I thought Mike and the article illustrate some very important points. Effort &lt;strong&gt;&lt;em&gt;is&lt;/em&gt;&lt;/strong&gt; different than complexity. The &lt;a href="http://www.infoq.com/news/2010/07/story-points-complexity-effort" target="_blank"&gt;InfoQ&lt;/a&gt; story mentions:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;/p&gt;    &lt;div style="padding-bottom:5px;margin:0px;padding-left:5px;padding-right:5px;display:inline;float:right;padding-top:5px;" id="scid:5737277B-5D6D-4f48-ABFC-DD9C333F4C5D:7c7ecc26-12c0-4298-9b47-d3fec43d5df9" class="wlWriterSmartContent"&gt;&lt;embed height="355" type="application/x-shockwave-flash" width="425" src="http://www.youtube.com/v/sstCC7T0Do4&amp;amp;hl=en_US&amp;amp;fs=1" /&gt;       &lt;div style="clear:both;font-size:0.8em;"&gt;Dentist - In a BOX!&lt;/div&gt;   &lt;/div&gt; Mike gave an interesting example where he compares the two backlog items of licking 1000 stamps and performing a simple brain surgery. According to Mike, despite their vast difference in complexity, they should still be given the same story points because they would take the same amount of time.     &lt;p&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;I am humbly reminded of the humorous video on the right (Dentist – In A BOX!) when presented with this idea of performing brain surgery. The other part of the story that was great talked about story points being a &lt;a href="http://blog.mountaingoatsoftware.com/its-effort-not-complexity/comment-page-1#comment-81996" target="_blank"&gt;function of effort, risk and uncertainty&lt;/a&gt; (link back to Mike’s original comment):&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;Perhaps the way to say that is that points are a function of effort, risk and uncertainty, or SP = f(E, R, U). (Call one of those complexity if you want; it’s not important.) The idea is that points are an estimate of the effort involved. Risk, uncertainty, complexity, doubt and other things people have mentioned here can be incorporated BUT only to the extent they affect the expected effort. If something is complex but that complexity will not affect the time to implement the feature, that complexity should not affect the estimate—that was my point with the lists of numbers to be multiplied or added.&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;I do want to point out what Mike mentioned in one of his other &lt;a href="http://blog.mountaingoatsoftware.com/its-effort-not-complexity/comment-page-1#comment-81739" target="_blank"&gt;comments&lt;/a&gt;: &lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;Thinking of points as a function of Effort, Complexity and Doubt is fine. In my reply above to John I just combined Complexity and Doubt into one thing: Uncertainty. &lt;/p&gt;    &lt;p&gt;Points are a measure of how long it will take (effort). How long it will take can be affected by other things and those can influence our estimate. The key is to remember and understand that it is always about time–no client ever cares how hard we had to think, only how long it took.&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;&lt;em&gt;“No client ever cares about how hard we had to think,only how long it took.”&lt;/em&gt; What I believe I am hearing is that Mike is not discounting that there is effort in understanding. Thinking, research, and learning time is still effort, and I think a lot of people miss this important point when they talk about effort. The example provided was a doctor versus a boy on the two tasks. What happens if they are the same person and that person is not a doctor? What if it’s you?! In my mind, that makes a better determination of what developers face when estimating a simple problem versus a complex one. &lt;/p&gt;  &lt;p&gt;Let’s explore this idea in more detail. What all goes into the effort required to lick 1000 stamps versus perform brain surgery if you had to do them? Sure the effort of actually performing the task is roughly the same, but the effort to learn how to lick a stamp is significantly less than the effort required to learn how to perform brain surgery. And that I believe more accurately represents what we as developers go through.&lt;/p&gt;  &lt;p&gt;To further illustrate, where I work, we also take stories and estimate tasks from those stories. With that I have started including ramp up time as part of the effort for my team as developers. A problem could take 15 minutes for me to code. But it might take me 2 hours to understand what it is that needs to be done. That is not a 15 minute task. That is a 2 hour and 15 minute task. And the effort involved was 2 hours and 15 minutes.&lt;/p&gt;  &lt;p&gt;Thoughts?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://devlicio.us/aggbug.aspx?PostID=61033" width="1" height="1"&gt;&lt;img src="http://feeds.feedburner.com/~r/Devlicious/~4/FG0lt2n5tj8" height="1" width="1"/&gt;</description><category domain="http://devlicio.us/blogs/rob_reynolds/archive/tags/Development/default.aspx">Development</category><category domain="http://devlicio.us/blogs/rob_reynolds/archive/tags/Agile/default.aspx">Agile</category><feedburner:origLink>http://devlicio.us/blogs/rob_reynolds/archive/2010/07/08/do-story-points-relate-to-complexity-or-time-response.aspx</feedburner:origLink></item><item><title>Caliburn.Micro Soup to Nuts Pt. 2 – Customizing The Bootstrapper</title><link>http://feedproxy.google.com/~r/Devlicious/~3/s1LpPOhlr1k/caliburn-micro-soup-to-nuts-pt-2-customizing-the-bootstrapper.aspx</link><pubDate>Fri, 09 Jul 2010 00:28:00 GMT</pubDate><guid isPermaLink="false">40756a8b-6212-4073-9d98-6c26781577de:61031</guid><dc:creator>Rob Eisenberg</dc:creator><slash:comments>9</slash:comments><description>&lt;p&gt;&lt;a href="http://devlicio.us/blogs/rob_eisenberg/archive/2010/07/06/caliburn-micro-soup-to-nuts-pt-1-configuration-actions-and-conventions.aspx" target="_blank"&gt;In the last part&lt;/a&gt; we discussed the most basic configuration for &lt;a href="http://caliburnmicro.codeplex.com/" target="_blank"&gt;Caliburn.Micro&lt;/a&gt; and demonstrated a couple of simple features related to Actions and Conventions. In this part, I would like to explore the Bootstrapper class a little more. Let&amp;rsquo;s begin by configuring our application to use an IoC container. We&amp;rsquo;ll use MEF for this example, but Caliburn.Micro will work well with any container. First, go ahead and &lt;a href="http://devlicio.us/cfs-file.ashx/__key/CommunityServer.Components.PostAttachments/00.00.06.09.93/Caliburn.Micro.Hello.zip" target="_blank"&gt;grab the code from Part 1&lt;/a&gt;. We are going to use that as our starting point. Add two additional references: System.ComponentModel.Composition and System.ComponentModel.Composition.Initialization. Those are the assemblies that contain MEF&amp;rsquo;s functionality.* Now, let&amp;rsquo;s create a new Bootstrapper called MefBootstrapper. Use the following code:&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;pre class="c#:nogutter:nocontrols" name="code"&gt;using System;
using System.Collections.Generic;
using System.ComponentModel.Composition;
using System.ComponentModel.Composition.Hosting;
using System.ComponentModel.Composition.Primitives;
using System.Linq;

public class MefBootstrapper : Bootstrapper&amp;lt;IShell&amp;gt;
{
    private CompositionContainer container;

    protected override void Configure()
    {
        container = CompositionHost.Initialize(
            new AggregateCatalog(
                AssemblySource.Instance.Select(x =&amp;gt; new AssemblyCatalog(x)).OfType&amp;lt;ComposablePartCatalog&amp;gt;()
                )
            );

        var batch = new CompositionBatch();

        batch.AddExportedValue&amp;lt;IWindowManager&amp;gt;(new WindowManager());
        batch.AddExportedValue&amp;lt;IEventAggregator&amp;gt;(new EventAggregator());
        batch.AddExportedValue(container);

        container.Compose(batch);
    }

    protected override object GetInstance(Type serviceType, string key)
    {
        string contract = string.IsNullOrEmpty(key) ? AttributedModelServices.GetContractName(serviceType) : key;
        var exports = container.GetExportedValues&amp;lt;object&amp;gt;(contract);

        if (exports.Count() &amp;gt; 0)
            return exports.First();

        throw new Exception(string.Format(&amp;quot;Could not locate any instances of contract {0}.&amp;quot;, contract));
    }

    protected override IEnumerable&amp;lt;object&amp;gt; GetAllInstances(Type serviceType)
    {
        return container.GetExportedValues&amp;lt;object&amp;gt;(AttributedModelServices.GetContractName(serviceType));
    }

    protected override void BuildUp(object instance)
    {
        container.SatisfyImportsOnce(instance);
    }
}&lt;/pre&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;That&amp;rsquo;s all the code to integrate MEF.&amp;nbsp; First, we override the Configure method of the Bootstrapper class. This gives us an opportunity to set up our IoC container as well as perform any other framework configuration we may want to do, such as customizing conventions. In this case, I&amp;rsquo;m taking advantage of Silverlight&amp;rsquo;s CompositionHost to setup the CompositionContainer. You can just instantiate the container directly if you are working with .NET. Then, I&amp;rsquo;m creating an AggregateCatalog and populating it with AssemblyCatalogs; one for each Assembly in AssemblySource.Instance. So, what is AssemblySoure.Instance? This is the place that Caliburn.Micro looks for Views. You can add assemblies to this at any time during your application to make them available to the framework, but there is also a special place to do it in the Bootstrapper. Simply override SelectAssemblies like this:&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;pre class="c#:nogutter:nocontrols" name="code"&gt;protected override IEnumerable&amp;lt;Assembly&amp;gt; SelectAssemblies()
{
    return new[] {
        Assembly.GetExecutingAssembly()
    };
}&lt;/pre&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;All you have to do is return a list of searchable assemblies. By default, the base class returns the assembly that your Application exists in. So, if all your views are in the same assembly as your application, you don&amp;rsquo;t even need to worry about this. If you have multiple referenced assemblies that contain views, this is an extension point you need to remember. Also, if you are dynamically loading modules, you&amp;rsquo;ll need to make sure they get registered with your IoC container and the AssemblySoure.Instance when they are loaded. &lt;/p&gt;
&lt;p&gt;After creating the container and providing it with the catalogs, I make sure to add a few Caliburn.Micro-specific services. The framework provides default implementations of both IWindowManager and IEventAggregator. Those are pieces that I&amp;rsquo;m likely to take dependencies on elsewhere, so I want them to be available for injection. I also register the container with itself (just a personal preference).&lt;/p&gt;
&lt;p&gt;After we configure the container, we need to tell Caliburn.Micro how to use it.&amp;nbsp; That is the purpose of the three overrides that follow. &amp;ldquo;GetInstance&amp;rdquo; and &amp;ldquo;GetAllInstances&amp;rdquo; are required by the framework. &amp;ldquo;BuildUp&amp;rdquo; is optionally used to supply property dependencies to instances of IResult that are executed by the framework. &lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Word to the Wise&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;While Caliburn.Micro does provide ServiceLocator functionality through the Bootstrapper&amp;rsquo;s overrides and the IoC class, you should avoid using this directly in your application code. ServiceLocator is considered by many to be an anti-pattern. Pulling from a container tends to obscure the intent of the dependent code and can make testing more complicated. In future articles I will demonstrate at least one scenario where you may be tempted to access the ServiceLocator from a ViewModel. I&amp;rsquo;ll also demonstrate some solutions.**&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Besides what is shown above, there are some other notable methods on the Bootstrapper. You can override OnStartup and OnExit to execute code when the application starts or shuts down respectively and OnUnhandledException to cleanup after any exception that wasn&amp;rsquo;t specifically handled by your application code.&amp;nbsp; The last override, DisplayRootView, is unique. Let&amp;rsquo;s look at how it is implemented in Bootstrapper&amp;lt;TRootModel&amp;gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;pre class="c#:nogutter:nocontrols" name="code"&gt;protected override void DisplayRootView() 
{
    var viewModel = IoC.Get&amp;lt;TRootModel&amp;gt;();
#if SILVERLIGHT
    var view = ViewLocator.LocateForModel(viewModel, null, null);
    ViewModelBinder.Bind(viewModel, view, null);

    var activator = viewModel as IActivate;
    if (activator != null)
        activator.Activate();

    Application.Current.RootVisual = view;
#else
    new WindowManager().Show(viewModel);
#endif
}&lt;/pre&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;The Silverlight version of this method resolves your root VM from the container, locates the view for it and binds the two together. It then makes sure to &amp;ldquo;activate&amp;rdquo; the VM if it implements the appropriate interface. The WPF version does the same thing by using the WindowManager class, more or less. DisplayRootView is basically a convenience implementation for model-first development. If you don&amp;rsquo;t like it, perhaps because you prefer view-first MVVM, then this is the method you want to override to change that behavior.&lt;/p&gt;
&lt;p&gt;Now that you understand all about the Bootstrapper, let&amp;rsquo;s get our sample working. We need to add the IShell interface. In our case, it&amp;rsquo;s just a marker interface. But, in a real application, you would&amp;nbsp; have some significant shell-related functionality baked into this contract. Here&amp;rsquo;s the code:&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;pre class="c#:nogutter:nocontrols" name="code"&gt;public interface IShell
{
}&lt;/pre&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Now, we need to implement the interface and decorate our ShellViewModel with the appropriate MEF attributes:&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;pre class="c#:nogutter:nocontrols" name="code"&gt;[Export(typeof(IShell))]
public class ShellViewModel : PropertyChangedBase, IShell
{
   ...implementation is same as before...
}&lt;/pre&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;That&amp;rsquo;s it! Your up and running with your bootstrapper configured for MEF.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;*If you are using .NET, you will only need to reference System.ComponentModel.Composition.&lt;/p&gt;
&lt;p&gt;**I&amp;rsquo;m quite guilty of this myself, but I&amp;rsquo;m trying to be more conscious of it.&amp;nbsp; I&amp;rsquo;m also excited to see that modern IoC containers as well as Caliburn.Micro provide some very nice ways to avoid this situation.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://devlicio.us/aggbug.aspx?PostID=61031" width="1" height="1"&gt;&lt;img src="http://feeds.feedburner.com/~r/Devlicious/~4/s1LpPOhlr1k" height="1" width="1"/&gt;</description><category domain="http://devlicio.us/blogs/rob_eisenberg/archive/tags/WPF/default.aspx">WPF</category><category domain="http://devlicio.us/blogs/rob_eisenberg/archive/tags/Xaml/default.aspx">Xaml</category><category domain="http://devlicio.us/blogs/rob_eisenberg/archive/tags/databinding/default.aspx">databinding</category><category domain="http://devlicio.us/blogs/rob_eisenberg/archive/tags/WPF_2F00_e/default.aspx">WPF/e</category><category domain="http://devlicio.us/blogs/rob_eisenberg/archive/tags/Caliburn/default.aspx">Caliburn</category><category domain="http://devlicio.us/blogs/rob_eisenberg/archive/tags/Featured/default.aspx">Featured</category><category domain="http://devlicio.us/blogs/rob_eisenberg/archive/tags/Silverlight/default.aspx">Silverlight</category><category domain="http://devlicio.us/blogs/rob_eisenberg/archive/tags/RIA/default.aspx">RIA</category><category domain="http://devlicio.us/blogs/rob_eisenberg/archive/tags/Tutorial/default.aspx">Tutorial</category><category domain="http://devlicio.us/blogs/rob_eisenberg/archive/tags/MEF/default.aspx">MEF</category><category domain="http://devlicio.us/blogs/rob_eisenberg/archive/tags/MVVM/default.aspx">MVVM</category><category domain="http://devlicio.us/blogs/rob_eisenberg/archive/tags/UI+Architecture/default.aspx">UI Architecture</category><category domain="http://devlicio.us/blogs/rob_eisenberg/archive/tags/Caliburn+Micro/default.aspx">Caliburn Micro</category><feedburner:origLink>http://devlicio.us/blogs/rob_eisenberg/archive/2010/07/08/caliburn-micro-soup-to-nuts-pt-2-customizing-the-bootstrapper.aspx</feedburner:origLink><enclosure url="http://feedproxy.google.com/~r/Devlicious/~5/ER-MIR-KCUk/Caliburn.Micro.HelloMef.zip" length="7463" type="application/x-zip-compressed" /><feedburner:origEnclosureLink>http://devlicio.us/cfs-file.ashx/__key/CommunityServer.Components.PostAttachments/00.00.06.10.31/Caliburn.Micro.HelloMef.zip</feedburner:origEnclosureLink></item><item><title>Show Covering Tests with dotCover</title><link>http://feedproxy.google.com/~r/Devlicious/~3/KmAmoTUWlLY/show-covering-tests-with-dotcover.aspx</link><pubDate>Tue, 06 Jul 2010 20:58:00 GMT</pubDate><guid isPermaLink="false">40756a8b-6212-4073-9d98-6c26781577de:61003</guid><dc:creator>Hadi Hariri</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;One of the new features &lt;a href="http://www.jetbrains.com/dotcover"&gt;dotCover&lt;/a&gt; has added is the ability to find tests that cover a certain piece of code. Something remotely similar has been available in &lt;a href="http://www.jetbrains.com/resharper"&gt;ReSharper&lt;/a&gt;, although it has been kind of an archaic solution (i.e. Find Usages on Method calls, locate Test assemblies in Result window). &lt;/p&gt;
&lt;p&gt;dotCover makes this easier by providing quick access to this information and extends it in functionality. &lt;/p&gt;
&lt;p&gt;Below we can see some tests from an MVC application. Let&amp;rsquo;s run Code Coverage on it using dotCover first. &lt;/p&gt;
&lt;p&gt;&lt;a href="http://devlicio.us/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/hadi_5F00_hariri/image_5F00_58BD7464.png"&gt;&lt;img style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" title="image" alt="image" src="http://devlicio.us/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/hadi_5F00_hariri/image_5F00_thumb_5F00_31DF3857.png" width="594" border="0" height="282" /&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;Now let&amp;rsquo;s switch over to the Source Code and select some random source code, in this case the &lt;b&gt;MembershipService.ChangePassword &lt;/b&gt;line in the &lt;b&gt;ChangePassword &lt;/b&gt;action:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://devlicio.us/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/hadi_5F00_hariri/image_5F00_0B00FC4A.png"&gt;&lt;img style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" title="image" alt="image" src="http://devlicio.us/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/hadi_5F00_hariri/image_5F00_thumb_5F00_66ABF1FA.png" width="595" border="0" height="270" /&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;In order to see the tests that cover this line of code, we can either press the default key combination of Ctrl+Alt+K or select the option &lt;b&gt;Show Covering Tests &lt;/b&gt;from the dotCover:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://devlicio.us/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/hadi_5F00_hariri/image_5F00_238073CD.png"&gt;&lt;img style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" title="image" alt="image" src="http://devlicio.us/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/hadi_5F00_hariri/image_5F00_thumb_5F00_7B0191B8.png" width="244" border="0" height="152" /&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;dotCover will then display a small window showing all the different tests that cover that line of code. &lt;/p&gt;
&lt;p&gt;&lt;a href="http://devlicio.us/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/hadi_5F00_hariri/image_5F00_746E1228.png"&gt;&lt;img style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" title="image" alt="image" src="http://devlicio.us/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/hadi_5F00_hariri/image_5F00_thumb_5F00_438B5ABD.png" width="608" border="0" height="107" /&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;At this point, we can run the selected tests or add them to the existing ReSharper Test Runner session. This allows us to easily jump from specific sections of code to the corresponding tests and execute them instantly. &lt;/p&gt;
&lt;p&gt;One minor note: The default key mapping conflicts with KeePass, but you can easily re-assign it via Visual Studio Tools | Options | Keyboard, or do as I did and change KeePass to Ctrl+Alt+P (P as in Password&amp;hellip;makes more sense). &lt;/p&gt;
&lt;p&gt;&lt;a href="http://devlicio.us/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/hadi_5F00_hariri/SNAGHTML5841541_5F00_47B53282.png"&gt;&lt;img style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" title="SNAGHTML5841541" alt="SNAGHTML5841541" src="http://devlicio.us/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/hadi_5F00_hariri/SNAGHTML5841541_5F00_thumb_5F00_4955D889.png" width="420" border="0" height="245" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://devlicio.us/aggbug.aspx?PostID=61003" width="1" height="1"&gt;&lt;img src="http://feeds.feedburner.com/~r/Devlicious/~4/KmAmoTUWlLY" height="1" width="1"/&gt;</description><category domain="http://devlicio.us/blogs/hadi_hariri/archive/tags/Tools/default.aspx">Tools</category><category domain="http://devlicio.us/blogs/hadi_hariri/archive/tags/dotCover/default.aspx">dotCover</category><feedburner:origLink>http://devlicio.us/blogs/hadi_hariri/archive/2010/07/06/show-covering-tests-with-dotcover.aspx</feedburner:origLink></item><item><title>Caliburn.Micro Soup to Nuts Pt. 1 – Configuration, Actions and Conventions</title><link>http://feedproxy.google.com/~r/Devlicious/~3/SR0glDpYNoM/caliburn-micro-soup-to-nuts-pt-1-configuration-actions-and-conventions.aspx</link><pubDate>Tue, 06 Jul 2010 17:47:00 GMT</pubDate><guid isPermaLink="false">40756a8b-6212-4073-9d98-6c26781577de:60993</guid><dc:creator>Rob Eisenberg</dc:creator><slash:comments>16</slash:comments><description>&lt;p&gt;In this tutorial we will learn a few of the basics of &lt;a target="_blank" href="http://caliburnmicro.codeplex.com/"&gt;Caliburn.Micro&lt;/a&gt;. Let&amp;rsquo;s start by getting the framework.&amp;nbsp; Head on over to &lt;a href="http://caliburnmicro.codeplex.com/SourceControl/list/changesets" title="http://caliburnmicro.codeplex.com/SourceControl/list/changesets"&gt;http://caliburnmicro.codeplex.com/SourceControl/list/changesets&lt;/a&gt;&amp;nbsp; Either use Mercurial to clone the repo or click on the link for the latest change set, then click on the download link. I recommend that you go ahead and get setup with TortoiseHG for Mercurial. You can read &lt;a target="_blank" href="http://codeplex.codeplex.com/wikipage?title=Using%20TortoiseHG%20with%20CodePlex&amp;amp;referringTitle=Source%20control%20clients&amp;amp;ProjectName=codeplex"&gt;here&lt;/a&gt; and/or watch a free TekPub video &lt;a target="_blank" href="http://tekpub.com/codeplex"&gt;here&lt;/a&gt; for information on that.&amp;nbsp; Once you have the source downloaded, navigate to the &amp;ldquo;src&amp;rdquo; folder. Open the &amp;ldquo;Caliburn.Micro.sln&amp;rdquo; Pess Ctrl-Shift-B (or use the Build menu) to build the solution in Visual Studio. Now that we have the framework and it&amp;rsquo;s been successfully built, let&amp;rsquo;s create a simple application.&lt;/p&gt;
&lt;p&gt;Open Visual Studio and create a new Silverlight 4 Application called &amp;ldquo;Caliburn.Micro.Hello&amp;rdquo;. You don&amp;rsquo;t need a web site or test project. Add a reference to System.Windows.Interactivity.dll and Caliburn.Micro.dll. You can find them both in the \src\Caliburn.Micro.Silverlight\Bin\Release (or Debug) folder. Delete &amp;ldquo;MainPage.xaml&amp;rdquo; and clean up your &amp;ldquo;App.xaml.cs&amp;rdquo; so that it looks like this:&lt;/p&gt;
&lt;pre name="code" class="c#:nogutter:nocontrols"&gt;namespace Caliburn.Micro.Hello
{
    using System.Windows;

    public partial class App : Application
    {
        public App()
        {
            InitializeComponent();
        }
    }
}&lt;/pre&gt;
&lt;p&gt;Since Caliburn.Micro prefers a View-Model-First approach, let&amp;rsquo;s start there. Create your first VM and call it ShellViewModel. Use the following code for the implementation:&lt;/p&gt;
&lt;pre name="code" class="c#:nogutter:nocontrols"&gt;namespace Caliburn.Micro.Hello
{
    using System.Windows;

    public class ShellViewModel : PropertyChangedBase
    {
        string name;

        public string Name
        {
            get { return name; }
            set
            {
                name = value;
                NotifyOfPropertyChange(() =&amp;gt; Name);
                NotifyOfPropertyChange(() =&amp;gt; CanSayHello);
            }
        }

        public bool CanSayHello
        {
            get { return !string.IsNullOrWhiteSpace(Name); }
        }

        public void SayHello()
        {
            MessageBox.Show(string.Format(&amp;quot;Hello {0}!&amp;quot;, Name)); //Don&amp;#39;t do this.
        }
    }
}&lt;/pre&gt;
&lt;p&gt;Notice that the ShellViewModel inherits from PropertyChangedBase. This is a base class that implements the infrastructure for property change notification and automatically performs UI thread marshalling. It will come in handy :)&lt;/p&gt;
&lt;p&gt;Now that we have our VM, let&amp;rsquo;s create the bootstrapper that will configure the framework and tell it what to do. Create a new class named HelloBootstrapper. You can use this tiny bit of code:&lt;/p&gt;
&lt;pre name="code" class="c#:nogutter:nocontrols"&gt;namespace Caliburn.Micro.Hello
{
    public class HelloBootstrapper : Bootstrapper&amp;lt;ShellViewModel&amp;gt; {}
}&lt;/pre&gt;
&lt;p&gt;There are two Bootsrappers available in Caliburn.Micro. This version allows you to specify the type of &amp;ldquo;root view model&amp;rdquo; via the generic type. The &amp;ldquo;root view mdoel&amp;rdquo; is a VM that Caliburn.Micro will instantiate and use to show your application. Next, we need to place the HelloBootstrapper somewhere where it will be run at startup. To do that, change your App.xaml to match this:&lt;/p&gt;
&lt;pre name="code" class="xml:nogutter:nocontrols"&gt;&amp;lt;Application xmlns=&amp;quot;http://schemas.microsoft.com/winfx/2006/xaml/presentation&amp;quot;
             xmlns:x=&amp;quot;http://schemas.microsoft.com/winfx/2006/xaml&amp;quot;
             xmlns:local=&amp;quot;clr-namespace:Caliburn.Micro.Hello&amp;quot;
             x:Class=&amp;quot;Caliburn.Micro.Hello.App&amp;quot;&amp;gt;
    &amp;lt;Application.Resources&amp;gt;
        &amp;lt;local:HelloBootstrapper x:Key=&amp;quot;bootstrapper&amp;quot; /&amp;gt;
    &amp;lt;/Application.Resources&amp;gt;
&amp;lt;/Application&amp;gt;&lt;/pre&gt;
&lt;p&gt;All we have to do is place a Caliburn.Micro bootstrapper in the Application.Resources and it will do the rest of the work.* Now, run the application. You should see something like this:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://devlicio.us/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/rob_5F00_eisenberg/ViewNotFound_5F00_4648EFC7.jpg"&gt;&lt;img height="134" width="244" src="http://devlicio.us/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/rob_5F00_eisenberg/ViewNotFound_5F00_thumb_5F00_5657BE7E.jpg" alt="ViewNotFound" border="0" title="ViewNotFound" style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" /&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;Caliburn.Micro creates the ShellViewModel, but doesn&amp;rsquo;t know how to render it. So, let&amp;rsquo;s create a view. Create a new Silverlight User Control named ShellView. Use the following xaml:&lt;/p&gt;
&lt;pre name="code" class="xml:nogutter:nocontrols"&gt;&amp;lt;UserControl x:Class=&amp;quot;Caliburn.Micro.Hello.ShellView&amp;quot;
             xmlns=&amp;quot;http://schemas.microsoft.com/winfx/2006/xaml/presentation&amp;quot;
             xmlns:x=&amp;quot;http://schemas.microsoft.com/winfx/2006/xaml&amp;quot;&amp;gt;
    &amp;lt;StackPanel&amp;gt;
        &amp;lt;TextBox x:Name=&amp;quot;Name&amp;quot; /&amp;gt;
        &amp;lt;Button x:Name=&amp;quot;SayHello&amp;quot;
                Content=&amp;quot;Click Me&amp;quot; /&amp;gt;
    &amp;lt;/StackPanel&amp;gt;
&amp;lt;/UserControl&amp;gt;&lt;/pre&gt;
&lt;p&gt;Run the application again. You should now see the UI:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://devlicio.us/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/rob_5F00_eisenberg/ViewFound_5F00_35D07ECC.jpg"&gt;&lt;img height="135" width="244" src="http://devlicio.us/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/rob_5F00_eisenberg/ViewFound_5F00_thumb_5F00_65FA5A40.jpg" alt="ViewFound" border="0" title="ViewFound" style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" /&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;Typing something in the TextBox will enable the Button and clicking it will show a message:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://devlicio.us/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/rob_5F00_eisenberg/ViweWithData_5F00_45731A8E.jpg"&gt;&lt;img height="244" width="243" src="http://devlicio.us/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/rob_5F00_eisenberg/ViweWithData_5F00_thumb_5F00_409066D2.jpg" alt="ViweWithData" border="0" title="ViweWithData" style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" /&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;Caliburn.Micro uses a simple naming convention to locate Views for ViewModels.&amp;nbsp; Essentially, it takes the FullName and removes &amp;ldquo;Model&amp;rdquo; from it. So, given MyApp.ViewModels.MyViewModel, it would look for MyApp.Views.MyView. Looking at the View and ViewModel side-by-side, you can see that the TextBox with x:Name=&amp;rdquo;Name&amp;rdquo; is bound to the &amp;ldquo;Name&amp;rdquo; property on the VM. You can also see that the Button with x:Name=&amp;rdquo;SayHello&amp;rdquo; is bound to the method with the same name on the VM.&amp;nbsp; The &amp;ldquo;CanSayHello&amp;rdquo; property is guarding access to the &amp;ldquo;SayHello&amp;rdquo; action by disabling the Button. These are the basics of Caliburn.Micro&amp;rsquo;s ActionMessage and Conventions functionality. There&amp;rsquo;s much more to show. But, next time I want to show how we can integrate an IoC container such as MEF. This sample is attached below.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;*All the functionality described in this article works identically for both Caliburn.Micro and Caliburn&amp;hellip;with one exception. Caliburn does not have a Bootstrapper currently. At this time, you would inherit from CaliburnApplication and override CreateRootModel. In the coming months, Caliburn&amp;rsquo;s custom application class will be replaced by a bootstrapper mechanism similar to Caliburn.Micro.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://devlicio.us/aggbug.aspx?PostID=60993" width="1" height="1"&gt;&lt;img src="http://feeds.feedburner.com/~r/Devlicious/~4/SR0glDpYNoM" height="1" width="1"/&gt;</description><category domain="http://devlicio.us/blogs/rob_eisenberg/archive/tags/WPF/default.aspx">WPF</category><category domain="http://devlicio.us/blogs/rob_eisenberg/archive/tags/Xaml/default.aspx">Xaml</category><category domain="http://devlicio.us/blogs/rob_eisenberg/archive/tags/databinding/default.aspx">databinding</category><category domain="http://devlicio.us/blogs/rob_eisenberg/archive/tags/WPF_2F00_e/default.aspx">WPF/e</category><category domain="http://devlicio.us/blogs/rob_eisenberg/archive/tags/.NET+3.5/default.aspx">.NET 3.5</category><category domain="http://devlicio.us/blogs/rob_eisenberg/archive/tags/Caliburn/default.aspx">Caliburn</category><category domain="http://devlicio.us/blogs/rob_eisenberg/archive/tags/Featured/default.aspx">Featured</category><category domain="http://devlicio.us/blogs/rob_eisenberg/archive/tags/Silverlight/default.aspx">Silverlight</category><category domain="http://devlicio.us/blogs/rob_eisenberg/archive/tags/RIA/default.aspx">RIA</category><category domain="http://devlicio.us/blogs/rob_eisenberg/archive/tags/Tutorial/default.aspx">Tutorial</category><category domain="http://devlicio.us/blogs/rob_eisenberg/archive/tags/MVVM/default.aspx">MVVM</category><category domain="http://devlicio.us/blogs/rob_eisenberg/archive/tags/UI+Architecture/default.aspx">UI Architecture</category><category domain="http://devlicio.us/blogs/rob_eisenberg/archive/tags/Caliburn+Micro/default.aspx">Caliburn Micro</category><feedburner:origLink>http://devlicio.us/blogs/rob_eisenberg/archive/2010/07/06/caliburn-micro-soup-to-nuts-pt-1-configuration-actions-and-conventions.aspx</feedburner:origLink><enclosure url="http://feedproxy.google.com/~r/Devlicious/~5/gOveajBDZAY/Caliburn.Micro.Hello.zip" length="6350" type="application/x-zip-compressed" /><feedburner:origEnclosureLink>http://devlicio.us/cfs-file.ashx/__key/CommunityServer.Components.PostAttachments/00.00.06.09.93/Caliburn.Micro.Hello.zip</feedburner:origEnclosureLink></item></channel></rss>
