<feed xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns="http://www.w3.org/2005/Atom" xml:lang="en-US">
    <title>Vincent Grondin</title>
    <link rel="self" type="application/xml" href="http://geekswithblogs.net/vincentgrondin/Atom.aspx" />
    <subtitle type="html"> </subtitle>
    <id>http://geekswithblogs.net/vincentgrondin/Default.aspx</id>
    <author>
        <name>Vincent Grondin</name>
        <uri>http://geekswithblogs.net/vincentgrondin/Default.aspx</uri>
    </author>
    <generator uri="http://subtextproject.com" version="Subtext Version 0.0.0.0">Subtext</generator>
    <updated>2012-04-17T22:41:02Z</updated>
    <entry>
        <title>DevTeach Vancouver approaching fast !</title>
        <link rel="self" type="text/html" href="http://geekswithblogs.net/vincentgrondin/archive/2012/04/17/devteach-vancouver-approaching-fast.aspx" />
        <id>http://geekswithblogs.net/vincentgrondin/archive/2012/04/17/devteach-vancouver-approaching-fast.aspx</id>
        <published>2012-04-17T22:41:02-04:00:00</published>
        <updated>2012-04-17T22:41:02Z</updated>
        <content type="html">&lt;p&gt;Just a friendly reminder for people in the Vancouver area that DevTeach Vancouver is just a few weeks away !  &lt;a href="http://www.devteach.com/Register.aspx"&gt;Registration is open&lt;/a&gt; and I can't help but promoting a full day of TFS 2010 workshop given by Etienne Tremblay and myself plus we will most likely add extra material to cover for TFS vNext...  The four added topics will be:&lt;/p&gt;&lt;p&gt;Moving from TFS 2010 to TFS vNext&lt;/p&gt;&lt;p&gt;The Storyboarding addin for PowerPoint&lt;/p&gt;&lt;p&gt;Intellitrace in a Production Environment&lt;/p&gt;&lt;p&gt;Exploratory Testing&lt;/p&gt;&lt;p&gt; &lt;/p&gt;&lt;p&gt;Also I'll be presenting a 1h session on mocking and mocking frameworks during the main event.  We'll compare Isolator, Justmock and Moq....&lt;/p&gt;&lt;p&gt;See you in Vancouver !&lt;/p&gt;&lt;img src="http://geekswithblogs.net/vincentgrondin/aggbug/149359.aspx" width="1" height="1" /&gt;</content>
        <wfw:comment>http://geekswithblogs.net/vincentgrondin/comments/149359.aspx</wfw:comment>
        <slash:comments>0</slash:comments>
        <wfw:commentRss>http://geekswithblogs.net/vincentgrondin/comments/commentRss/149359.aspx</wfw:commentRss>
        <trackback:ping>http://geekswithblogs.net/vincentgrondin/services/trackbacks/149359.aspx</trackback:ping>
    </entry>
    <entry>
        <title>Coded UI Test Builder Visual Cues Offset</title>
        <link rel="self" type="text/html" href="http://geekswithblogs.net/vincentgrondin/archive/2012/04/16/coded-ui-test-builder-visual-cues-offset.aspx" />
        <id>http://geekswithblogs.net/vincentgrondin/archive/2012/04/16/coded-ui-test-builder-visual-cues-offset.aspx</id>
        <published>2012-04-16T20:28:24-04:00:00</published>
        <updated>2012-04-16T20:28:24Z</updated>
        <content type="html">&lt;p&gt;Wow it's been a long time since I posted anything in here.....&lt;/p&gt;
&lt;p&gt;Today I'll be very brief because the subject is quite easy to cover but can be quite puzzling when it happens to you...  These days at work I'm exploring Coded UI Test in VS2010, Microsoft Test Manager 2010 and Microsoft Test Runner 2010 which is cool because I've been digging aroung VS2010 testing tools on my own since a year now and also started focusing on VNext's testing tools...  So when you automate a test you will most likely end up having to use the Coded UI Test Builder shown &lt;a href="https://skydrive.live.com/#cid=BDF9CF467011E705&amp;amp;id=BDF9CF467011E705%21243"&gt;here&lt;/a&gt;   &lt;/p&gt;
&lt;p&gt;When inspecting controls on your app with the little "Target" tool, you could be confronted to your controls being highlighted "in the wrong place" on your screen.  Kind of like there would be some sort of offset between the control you are pointing to and the visual rectangle cue created by the tool to say "here's the control I think you're pointing to"... Looking at the picture &lt;a href="https://skydrive.live.com/#cid=BDF9CF467011E705&amp;amp;id=BDF9CF467011E705%21245"&gt;here&lt;/a&gt; you can see it's pretty anoying to point at a control, see the tool inspecting the right object but highlighting it lower and to the right of where the control actually is...  I have no clue if this only happens in WPF but here's the solution or at least what worked for me...  In my case I was using the "Medium - 125%" display setting in the personalization of my Windows 7 laptop...  The Coded UI Test Builder only works well when your display is set to 100% (smallest in my case).  Change &lt;a href="https://skydrive.live.com/#cid=BDF9CF467011E705&amp;amp;id=BDF9CF467011E705%21246"&gt;that option&lt;/a&gt; to 100% and everything will start being highlighted &lt;a href="https://skydrive.live.com/#cid=BDF9CF467011E705&amp;amp;id=BDF9CF467011E705%21244"&gt;at the right place in the tool&lt;/a&gt;...  I do think that this was intentionnal and that the tool was built to work only when using 100%...  What a shame but now you know so stop reading and go back to work !&lt;/p&gt;
&lt;p&gt;Happy automating :)&lt;/p&gt;&lt;img src="http://geekswithblogs.net/vincentgrondin/aggbug/149344.aspx" width="1" height="1" /&gt;</content>
        <wfw:comment>http://geekswithblogs.net/vincentgrondin/comments/149344.aspx</wfw:comment>
        <slash:comments>0</slash:comments>
        <wfw:commentRss>http://geekswithblogs.net/vincentgrondin/comments/commentRss/149344.aspx</wfw:commentRss>
        <trackback:ping>http://geekswithblogs.net/vincentgrondin/services/trackbacks/149344.aspx</trackback:ping>
    </entry>
    <entry>
        <title>A full day of Azure conferences...</title>
        <link rel="self" type="text/html" href="http://geekswithblogs.net/vincentgrondin/archive/2011/09/25/a-full-day-of-azure-conferences.aspx" />
        <id>http://geekswithblogs.net/vincentgrondin/archive/2011/09/25/a-full-day-of-azure-conferences.aspx</id>
        <published>2011-09-25T22:17:44-04:00:00</published>
        <updated>2011-09-25T22:17:44Z</updated>
        <content type="html">&lt;p&gt;On October the 15th, the Montreal .NET User Group will hold a special event... a full day of conferences and workshops on Azure !  The speakers for the special event will be our very own Guy Barrette, Azure MVP, Sébastien Warin also and Azure MVP and Cory Fowler who just happens to be yet another Azure MVP !  Ain't that just amazing to see how many of them Azure MVPs we managed to pack in the same room for you to learn from?  All this for one low price... 10$....  and you have to be a registered and paid for member of the .NET Montreal User Group...&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;Circle the date on your calendar, Saturday October 15th, from 9am to 16h30pm at the UQAM university, room R-M110.&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.dotnetmontreal.com/events/25706911/"&gt;http://www.dotnetmontreal.com/events/25706911/&lt;/a&gt;&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;Cheers !&lt;/p&gt;&lt;img src="http://geekswithblogs.net/vincentgrondin/aggbug/147042.aspx" width="1" height="1" /&gt;</content>
        <wfw:comment>http://geekswithblogs.net/vincentgrondin/comments/147042.aspx</wfw:comment>
        <slash:comments>0</slash:comments>
        <wfw:commentRss>http://geekswithblogs.net/vincentgrondin/comments/commentRss/147042.aspx</wfw:commentRss>
        <trackback:ping>http://geekswithblogs.net/vincentgrondin/services/trackbacks/147042.aspx</trackback:ping>
    </entry>
    <entry>
        <title>Dev Teach Ottawa approching FAST !</title>
        <link rel="self" type="text/html" href="http://geekswithblogs.net/vincentgrondin/archive/2011/09/23/dev-teach-ottawa-approching-fast.aspx" />
        <id>http://geekswithblogs.net/vincentgrondin/archive/2011/09/23/dev-teach-ottawa-approching-fast.aspx</id>
        <published>2011-09-23T22:37:11-04:00:00</published>
        <updated>2011-09-23T22:37:11Z</updated>
        <content type="html">&lt;p&gt;The long awaited Dev Teach conference approches FAST and will be held in Ottawa on nov the 2nd to nov the 4th!&lt;/p&gt;
&lt;p&gt;Very interesting material both in the main event and in pre-conferences with 2 friends of mine, Laurent Duveau and Mario Cardinal both giving a pre-conference workshop !  For my part, I'll be giving a talk on Mocking and Mocking Frameworks as I really think people need to be more aware of their power and the fact that nowadays, effective, responsive, scalable unit testing inevitably equals mocking frameworks...  There is a grand total of 48 sessions planned for the event: 12 sessions by ITProTeach for IT Professionals, 12 sessions by SQLTeach for DBAs and finally 24 sessions by DevTeach for developers.&lt;/p&gt;
&lt;p&gt;If you are in the area, you should definitly try to attend the conference.... &lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;Register today !&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt; &lt;/p&gt;&lt;img src="http://geekswithblogs.net/vincentgrondin/aggbug/147021.aspx" width="1" height="1" /&gt;</content>
        <wfw:comment>http://geekswithblogs.net/vincentgrondin/comments/147021.aspx</wfw:comment>
        <slash:comments>0</slash:comments>
        <wfw:commentRss>http://geekswithblogs.net/vincentgrondin/comments/commentRss/147021.aspx</wfw:commentRss>
        <trackback:ping>http://geekswithblogs.net/vincentgrondin/services/trackbacks/147021.aspx</trackback:ping>
    </entry>
    <entry>
        <title>Vote for my talk at Techdays Montreal 2011 !!!</title>
        <link rel="self" type="text/html" href="http://geekswithblogs.net/vincentgrondin/archive/2011/09/13/vote-for-my-talk-at-techdays-montreal-2011.aspx" />
        <id>http://geekswithblogs.net/vincentgrondin/archive/2011/09/13/vote-for-my-talk-at-techdays-montreal-2011.aspx</id>
        <published>2011-09-13T12:39:10-04:00:00</published>
        <updated>2011-09-13T12:48:02Z</updated>
        <content type="html">&lt;p&gt;Techdays Montreal approches fast and will be held at the Palais des Congrès on november the 29th and 30th of 2011.&lt;/p&gt;
&lt;p&gt;This year, the event content will be decided by you, the attendees !&lt;/p&gt;
&lt;p&gt;You can vote for your favorite content here on a track by track basis and voting ends this FRIDAY the 16th !!!!&lt;/p&gt;
&lt;p class="ecxMsoNormal"&gt;&lt;a target="_blank" href="http://bit.ly/tdcan2011vote"&gt;&lt;font color="#0068cf"&gt;http://bit.ly/tdcan2011vote&lt;/font&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p class="ecxMsoNormal"&gt;Note that &lt;strong&gt;you do not need &lt;/strong&gt;to fill every page to cast in your vote....  BTW I think they activated IP checking to prevent people from casting multiple votes so vote from HOME, not WORK... and if you vote for me then vote from HOME, WORK, CELL, GF's house, school  etc   :)   Mouhahah !&lt;/p&gt;
&lt;p class="ecxMsoNormal"&gt;Please check out the session I'll give on MOCKING and vote for me if that's something you would like to see at Techdays 2011 Montreal !!!&lt;/p&gt;
&lt;p class="ecxMsoNormal"&gt; &lt;/p&gt;
&lt;p class="ecxMsoNormal"&gt;Thanks ! &lt;/p&gt;&lt;img src="http://geekswithblogs.net/vincentgrondin/aggbug/146852.aspx" width="1" height="1" /&gt;</content>
        <wfw:comment>http://geekswithblogs.net/vincentgrondin/comments/146852.aspx</wfw:comment>
        <slash:comments>0</slash:comments>
        <wfw:commentRss>http://geekswithblogs.net/vincentgrondin/comments/commentRss/146852.aspx</wfw:commentRss>
        <trackback:ping>http://geekswithblogs.net/vincentgrondin/services/trackbacks/146852.aspx</trackback:ping>
    </entry>
    <entry>
        <title>Bridging the Gap - En Français à Québec le 14 Mai 2011  !!!!</title>
        <link rel="self" type="text/html" href="http://geekswithblogs.net/vincentgrondin/archive/2011/03/29/bridging-the-gap---en-francais.aspx" />
        <id>http://geekswithblogs.net/vincentgrondin/archive/2011/03/29/bridging-the-gap---en-francais.aspx</id>
        <published>2011-03-29T16:17:10-04:00:00</published>
        <updated>2011-03-29T16:21:22Z</updated>
        <content type="html">&lt;p&gt;Our 13 sessions are now available in english on :&lt;/p&gt;
&lt;p&gt;Nos 13 sessions sont maintenant disponibles en anglais sur :&lt;/p&gt;
&lt;p&gt;&lt;a href="http://blogs.msdn.com/b/cdnsoldevs/archive/2011/03/13/bridging-the-gap-between-developers-and-testers-using-visual-studio-2010.aspx"&gt;CHANNEL 9 !!!!&lt;/a&gt;&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;Bonjour à tous, l'événement "Bridging the Gap Between Developers and Testers Using Visual Studio 2010" sera également présentées LIVE le samedi 14 Mai 2011 à Québec.  Toute une journée de contenu "Real Life" gratuite, présentée par Etienne Tremblay et moi même en personne et EN FRANÇAIS.&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;Pour plus d'informations ou pour vous inscrire, veuillez vous référer au site de &lt;a href="http://www.devteach.com/community/"&gt;DevTeach&lt;/a&gt;. &lt;/p&gt;&lt;img src="http://geekswithblogs.net/vincentgrondin/aggbug/144571.aspx" width="1" height="1" /&gt;</content>
        <wfw:comment>http://geekswithblogs.net/vincentgrondin/comments/144571.aspx</wfw:comment>
        <slash:comments>0</slash:comments>
        <wfw:commentRss>http://geekswithblogs.net/vincentgrondin/comments/commentRss/144571.aspx</wfw:commentRss>
        <trackback:ping>http://geekswithblogs.net/vincentgrondin/services/trackbacks/144571.aspx</trackback:ping>
    </entry>
    <entry>
        <title>Bridging The Gap Between Developers And Testers With VS 2010</title>
        <link rel="self" type="text/html" href="http://geekswithblogs.net/vincentgrondin/archive/2011/02/14/bridging-the-gap-between-developers-and-testers-with-vs-2010.aspx" />
        <id>http://geekswithblogs.net/vincentgrondin/archive/2011/02/14/bridging-the-gap-between-developers-and-testers-with-vs-2010.aspx</id>
        <published>2011-02-14T10:31:02-05:00:00</published>
        <updated>2011-04-08T14:12:05Z</updated>
        <content type="html">&lt;p&gt;On January 29th &lt;a href="http://geekswithblogs.net/etiennetremblay/archive/2011/02/13/bridging-the-gap-between-developers-and-testers-with-vs-2010.aspx"&gt;Etienne Tremblay&lt;/a&gt; and I presented infront of roughly 120 people in Ottawa a 7 hours "sketch" on how VS 2010 and TFS 2010 can help both devs and testers in their respective work.  The presentation focused on how a testers' work can positively influence a developers' work and vice versa.  The format was quite unusual as I said it's a "sketch" where Etienne and I "ignore" the audience and we do as if we were at work and the audience is sort of "spying" on us.  In all I'm quite pleased with the content we presented and the format sure was alot of fun to render and I think the audience liked it too...  The good news for you people reading this post is that it got RECORDED and it's now available for download in quick 25 to 35 minutes format on the dev teach web site:&lt;/p&gt;
&lt;p&gt; &lt;a title="http://www.devteach.com/ALM-TFS2010-Bridgingthegap.aspx" href="http://www.devteach.com/ALM-TFS2010-Bridgingthegap.aspx"&gt;&lt;font color="#000080"&gt;http://www.devteach.com/ALM-TFS2010-Bridgingthegap.aspx&lt;/font&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;There were 2 cameras, one filming us and one capturing the screen for our demos.  We switch from one to another in an intersting flow and Jean-René Roy made sure he kept all our goofs and didn't edit those funny "oups moments" where we screw-up in the scenario...  Mostly educative but hilarious at times !!!&lt;/p&gt;
&lt;p&gt;I encourage you all to download and watch the 13 episodes...  Follow a day at work for a tester and a developper using VS 2010 and TFS 2010 to improve their chemistry ! &lt;/p&gt;
&lt;p&gt;Thanks to Jean-René Roy for all the work he's put into this event and to Microsoft and Pyxis for sponsoring the event.&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt; &lt;/p&gt;&lt;img src="http://geekswithblogs.net/vincentgrondin/aggbug/143932.aspx" width="1" height="1" /&gt;</content>
        <wfw:comment>http://geekswithblogs.net/vincentgrondin/comments/143932.aspx</wfw:comment>
        <slash:comments>0</slash:comments>
        <wfw:commentRss>http://geekswithblogs.net/vincentgrondin/comments/commentRss/143932.aspx</wfw:commentRss>
        <trackback:ping>http://geekswithblogs.net/vincentgrondin/services/trackbacks/143932.aspx</trackback:ping>
    </entry>
    <entry>
        <title>Urban Turtle is such an awesome product !</title>
        <link rel="self" type="text/html" href="http://geekswithblogs.net/vincentgrondin/archive/2011/01/30/urban-turtle-is-such-an-awesome-product.aspx" />
        <id>http://geekswithblogs.net/vincentgrondin/archive/2011/01/30/urban-turtle-is-such-an-awesome-product.aspx</id>
        <published>2011-01-30T22:16:23-05:00:00</published>
        <updated>2011-01-30T22:16:23Z</updated>
        <content type="html">&lt;p class="ecxMsoNormal" style="margin-left: 35.4pt"&gt;&lt;span style="font-size: medium"&gt;&lt;span lang="EN-US"&gt;Mario Cardinal, the host of the Visual Studio Talk Show, is quite happy these days. He works with the Urban Turtle team and they received significant support from Microsoft. Brian Harry, who is the Product Unit Manager for Team Foundation Server, has published an outstanding blog post about Urban Turtle that says: "&lt;b&gt;...awesome Scrum experience for TFS.&lt;/b&gt;” You can read Brian Harry's blog post at the following URL: &lt;/span&gt;&lt;/span&gt;&lt;span lang="EN-US"&gt;&lt;a href="http://urbanturtle.com/awesome" target="_blank"&gt;&lt;span style="font-size: medium"&gt;&lt;font color="#0068cf"&gt;http://urbanturtle.com/awesome&lt;/font&gt;&lt;/span&gt;&lt;/a&gt;&lt;/span&gt;&lt;span style="font-size: medium"&gt;&lt;span lang="EN-US"&gt;.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;img src="http://geekswithblogs.net/vincentgrondin/aggbug/143708.aspx" width="1" height="1" /&gt;</content>
        <wfw:comment>http://geekswithblogs.net/vincentgrondin/comments/143708.aspx</wfw:comment>
        <slash:comments>1</slash:comments>
        <wfw:commentRss>http://geekswithblogs.net/vincentgrondin/comments/commentRss/143708.aspx</wfw:commentRss>
        <trackback:ping>http://geekswithblogs.net/vincentgrondin/services/trackbacks/143708.aspx</trackback:ping>
    </entry>
    <entry>
        <title>Speaker at Tech Days 2010 in Montreal</title>
        <link rel="self" type="text/html" href="http://geekswithblogs.net/vincentgrondin/archive/2010/11/25/speaker-at-tech-days-2010-in-montreal.aspx" />
        <id>http://geekswithblogs.net/vincentgrondin/archive/2010/11/25/speaker-at-tech-days-2010-in-montreal.aspx</id>
        <published>2010-11-25T15:17:28-05:00:00</published>
        <updated>2010-11-25T15:17:28Z</updated>
        <content type="html">&lt;p&gt;Thanks to everyone who took part in Tech Days 2010 either as a speaker, attendee or else.&lt;/p&gt;
&lt;p&gt;It was a great event where I got to present 2 sessions.  For everyone who might want to material for both sessions, &lt;a href="http://cid-bdf9cf467011e705.office.live.com/browse.aspx/.Public/Blog%20sample%20downloads/Tech%20Days%202010?uc=2"&gt;here&lt;/a&gt; it is!&lt;/p&gt;
&lt;p&gt;My guess is that the audio material should be available soon, on the microsoft tech days site...&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;Cheers&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;&lt;img src="http://geekswithblogs.net/vincentgrondin/aggbug/142872.aspx" width="1" height="1" /&gt;</content>
        <wfw:comment>http://geekswithblogs.net/vincentgrondin/comments/142872.aspx</wfw:comment>
        <slash:comments>0</slash:comments>
        <wfw:commentRss>http://geekswithblogs.net/vincentgrondin/comments/commentRss/142872.aspx</wfw:commentRss>
        <trackback:ping>http://geekswithblogs.net/vincentgrondin/services/trackbacks/142872.aspx</trackback:ping>
    </entry>
    <entry>
        <title>Conference at Vermont's Code Camp</title>
        <link rel="self" type="text/html" href="http://geekswithblogs.net/vincentgrondin/archive/2010/09/21/conference-at-vermonts-code-camp.aspx" />
        <id>http://geekswithblogs.net/vincentgrondin/archive/2010/09/21/conference-at-vermonts-code-camp.aspx</id>
        <published>2010-09-21T21:43:56-04:00:00</published>
        <updated>2010-09-21T21:43:56Z</updated>
        <content type="html">&lt;p&gt;Well, it's been a long time since my last post and unfortunately it's another simple thread to share my material but I'll resume posting here and there in the next couple weeks...&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;Here's the   &lt;a href="http://cid-bdf9cf467011e705.office.live.com/browse.aspx/.Public/Blog%20sample%20downloads/Conference%20at%20Vermont%5E4s%20Code%20Camp"&gt;link &lt;/a&gt;    to my presentation and supporting material which was about Lambdas and Extension Methods using Visual Studio 2010...  The powerpoint is there and so is the small project I used to demo my subjects...  There's also the source code for the Umbrella project...&lt;/p&gt;
&lt;p&gt;Cheers !&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;&lt;img src="http://geekswithblogs.net/vincentgrondin/aggbug/141923.aspx" width="1" height="1" /&gt;</content>
        <wfw:comment>http://geekswithblogs.net/vincentgrondin/comments/141923.aspx</wfw:comment>
        <slash:comments>0</slash:comments>
        <wfw:commentRss>http://geekswithblogs.net/vincentgrondin/comments/commentRss/141923.aspx</wfw:commentRss>
        <trackback:ping>http://geekswithblogs.net/vincentgrondin/services/trackbacks/141923.aspx</trackback:ping>
    </entry>
    <entry>
        <title>Conference on LinQ at Montreal's ETS</title>
        <link rel="self" type="text/html" href="http://geekswithblogs.net/vincentgrondin/archive/2010/05/31/conference-on-linq-at-montreals-ets.aspx" />
        <id>http://geekswithblogs.net/vincentgrondin/archive/2010/05/31/conference-on-linq-at-montreals-ets.aspx</id>
        <published>2010-05-31T20:50:08-04:00:00</published>
        <updated>2010-05-31T20:50:08Z</updated>
        <content type="html">&lt;p&gt;Today I gave a presentation at Montreal's "Ecole de Technologies Supérieure" and I said I would put my presentation and the material itself online in here....  The audience was exclusively composed of teachers from colleges around Montreal. &lt;/p&gt;
&lt;p&gt;There's the link to download the content :&lt;/p&gt;
&lt;p&gt;&lt;a href="http://cid-bdf9cf467011e705.skydrive.live.com/self.aspx/.Public/LinQ%20at%20Montreal%5E4s%20ETS/LinQ.zip"&gt;http://cid-bdf9cf467011e705.skydrive.live.com/self.aspx/.Public/LinQ%20at%20Montreal%5E4s%20ETS/LinQ.zip&lt;/a&gt;&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;I hope all attendees learned more on LinQ than they knew before!&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt; &lt;/p&gt;&lt;img src="http://geekswithblogs.net/vincentgrondin/aggbug/140162.aspx" width="1" height="1" /&gt;</content>
        <wfw:comment>http://geekswithblogs.net/vincentgrondin/comments/140162.aspx</wfw:comment>
        <slash:comments>1</slash:comments>
        <wfw:commentRss>http://geekswithblogs.net/vincentgrondin/comments/commentRss/140162.aspx</wfw:commentRss>
        <trackback:ping>http://geekswithblogs.net/vincentgrondin/services/trackbacks/140162.aspx</trackback:ping>
    </entry>
    <entry>
        <title>Tips on debugging collections</title>
        <link rel="self" type="text/html" href="http://geekswithblogs.net/vincentgrondin/archive/2010/05/02/tips-on-debugging-collections.aspx" />
        <id>http://geekswithblogs.net/vincentgrondin/archive/2010/05/02/tips-on-debugging-collections.aspx</id>
        <published>2010-05-02T20:53:17-04:00:00</published>
        <updated>2010-05-02T20:53:17Z</updated>
        <content type="html">&lt;p&gt; &lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: medium"&gt;The "Quick Watch" feature of Visual Studio is an awesome tool when debugging your stuff...  I use it all the time and quite often I end up exploring hashtables or lists of all sorts...  One thing I hate is when I have to explore Collections...  Good god did I lose time trying to find the inner member that contains my stuff when exploring collections...  Most collections have the inside member that you can search for and find and explore to see the list of things you wanted to look at.  Something in the likes of &lt;/span&gt;&lt;a href="http://9nq3na.bay.livefilestore.com/y1pcZ--gq03CgZHa0TbbkngHl8VSk4jg3lb8h08pcjHg9u3aVrKCWFP7LYEkJ_wFeNO2XUIyWfk77LIQU8WHNweAMi1MFaGmJAG/WatchCollection.jpg"&gt;&lt;span style="font-size: medium"&gt;this&lt;/span&gt;&lt;/a&gt;&lt;span style="font-size: medium"&gt;.  &lt;/span&gt;&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: medium"&gt;I've known a little trick for a while now and I give it to everyone I end up debugging something with so I figured that probably not many people know about this...  Here's the tip...  Send the collection into an ArrayList in the QuickWatch window!  Yes, you heard me right, just type   &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: medium"&gt; new ArrayList(yourcollectionhere)&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: medium"&gt;in my case:    new ArrayList(this.Controls)&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: medium"&gt;in the expresion textbox and &lt;/span&gt;&lt;a href="http://9nq3na.bay.livefilestore.com/y1pGdLAUnsQWwPCDij-GuO-3FhJpmEHoy09DMGlNZE67uMFxBIT75-VG7rsupgWuA5RO94MAp8dxi2iBjsTUzrUtg50FucKxgDu/WatchCollectionArrayList.jpg"&gt;&lt;span style="font-size: medium"&gt;here's&lt;/span&gt;&lt;/a&gt;&lt;span style="font-size: medium"&gt; the result when you hit reevaluate!&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: medium"&gt;Pretty neat trick to make your debugging experience less of a pain when dealing with collections...  &lt;/span&gt;&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: medium"&gt;Happy debugging all !&lt;/span&gt;&lt;/p&gt;&lt;img src="http://geekswithblogs.net/vincentgrondin/aggbug/139627.aspx" width="1" height="1" /&gt;</content>
        <wfw:comment>http://geekswithblogs.net/vincentgrondin/comments/139627.aspx</wfw:comment>
        <slash:comments>0</slash:comments>
        <wfw:commentRss>http://geekswithblogs.net/vincentgrondin/comments/commentRss/139627.aspx</wfw:commentRss>
        <trackback:ping>http://geekswithblogs.net/vincentgrondin/services/trackbacks/139627.aspx</trackback:ping>
    </entry>
    <entry>
        <title>Developing for 2005 using VS2008! </title>
        <link rel="self" type="text/html" href="http://geekswithblogs.net/vincentgrondin/archive/2010/04/24/developing-for-2005-using-vs2008.aspx" />
        <id>http://geekswithblogs.net/vincentgrondin/archive/2010/04/24/developing-for-2005-using-vs2008.aspx</id>
        <published>2010-04-24T18:43:08-04:00:00</published>
        <updated>2010-04-28T11:25:43Z</updated>
        <content type="html">&lt;div style="margin: 0in 0in 10pt"&gt;&lt;span style="font-size: medium"&gt; &lt;/span&gt;&lt;/div&gt;
&lt;div style="margin: 0in 0in 10pt"&gt;&lt;span style="font-size: medium"&gt;I joined a fairly large project recently and it has a particularity… Once finished, everything has to be sent to the client under VS2005 using VB.Net and can target either framework 2.0 or 3.0… A long time ago, the decision to use VS2008 and to target framework 3.0 was taken but people knew they would need to establish a few rules to ensure that each dev would use VS2008 as if it was VS2005… Why is that so? Well simply because the compiler in VS2005 is different from the compiler inside VS2008…  I thought it might be a good idea to note the things that you cannot use in VS2008 if you plan on going back to VS2005. Who knows, this might save someone the headache of going over all their code to fix errors…&lt;/span&gt;&lt;/div&gt;
&lt;div style="margin: 0in 0in 0pt 0.75in; text-indent: -0.25in"&gt;&lt;span style="font-size: medium"&gt;-&lt;span style="font: 7pt 'Times New Roman'"&gt;        &lt;/span&gt;Do not use LinQ keywords (from, in, select, orderby…).&lt;/span&gt;&lt;/div&gt;
&lt;div style="margin: 0in 0in 0pt 0.75in; text-indent: -0.25in"&gt; &lt;/div&gt;
&lt;div style="margin: 0in 0in 0pt 0.75in; text-indent: -0.25in"&gt;&lt;span style="font-size: medium"&gt;-&lt;span style="font: 7pt 'Times New Roman'"&gt;        &lt;/span&gt;Do not use LinQ standard operators under the form of extension methods.&lt;/span&gt;&lt;/div&gt;
&lt;div style="margin: 0in 0in 0pt 0.75in; text-indent: -0.25in"&gt; &lt;/div&gt;
&lt;div style="margin: 0in 0in 0pt 0.75in; text-indent: -0.25in"&gt;&lt;span style="font-size: medium"&gt;-&lt;span style="font: 7pt 'Times New Roman'"&gt;        &lt;/span&gt;Do not use type inference (in VB.Net you can switch it OFF in each project properties).&lt;/span&gt;&lt;/div&gt;
&lt;div style="margin: 0in 0in 0pt 1.25in; text-indent: -0.25in"&gt;&lt;span style="font-size: medium"&gt;o&lt;span style="font: 7pt 'Times New Roman'"&gt;   &lt;/span&gt;This means you cannot use VB.NET XML Literals.&lt;/span&gt;&lt;/div&gt;
&lt;div style="margin: 0in 0in 0pt 0.75in; text-indent: -0.25in"&gt; &lt;/div&gt;
&lt;div style="margin: 0in 0in 0pt 0.75in; text-indent: -0.25in"&gt;&lt;span style="font-size: medium"&gt;-&lt;span style="font: 7pt 'Times New Roman'"&gt;        &lt;/span&gt;Do not use nullable types under the following declarative form:    Dim myInt as Integer? But using:   Dim myInt as Nullable(Of Integer)     is perfectly fine.&lt;/span&gt;&lt;/div&gt;
&lt;div style="margin: 0in 0in 0pt 0.75in; text-indent: -0.25in"&gt; &lt;/div&gt;
&lt;div style="margin: 0in 0in 0pt 0.75in; text-indent: -0.25in"&gt;&lt;span style="font-size: medium"&gt;-&lt;span style="font: 7pt 'Times New Roman'"&gt;        &lt;/span&gt;Do not test nullable types with     Is Nothing    use    myInt.HasValue     instead.&lt;/span&gt;&lt;/div&gt;
&lt;div style="margin: 0in 0in 0pt 0.75in; text-indent: -0.25in"&gt; &lt;/div&gt;
&lt;div style="margin: 0in 0in 0pt 0.75in; text-indent: -0.25in"&gt;&lt;span style="font-size: medium"&gt;-&lt;span style="font: 7pt 'Times New Roman'"&gt;        &lt;/span&gt;Do not use Lambda expressions (there is no Lambda statements in VB9) so you cannot use the keyword “Function”.&lt;/span&gt;&lt;/div&gt;
&lt;div style="margin: 0in 0in 0pt 0.75in; text-indent: -0.25in"&gt; &lt;/div&gt;
&lt;div style="margin: 0in 0in 0pt 0.75in; text-indent: -0.25in"&gt;&lt;span style="font-size: medium"&gt;-&lt;span style="font: 7pt 'Times New Roman'"&gt;        &lt;/span&gt;Pay attention not to use relaxed delegates because this one is easy to miss in VS2008&lt;/span&gt;&lt;/div&gt;
&lt;div style="margin: 0in 0in 0pt 0.75in; text-indent: -0.25in"&gt; &lt;/div&gt;
&lt;div style="margin: 0in 0in 0pt 0.75in; text-indent: -0.25in"&gt;&lt;span style="font-size: medium"&gt;-&lt;span style="font: 7pt 'Times New Roman'"&gt;        &lt;/span&gt;Do not use Object Initializers&lt;/span&gt;&lt;/div&gt;
&lt;div style="margin: 0in 0in 10pt 0.75in; text-indent: -0.25in"&gt; &lt;/div&gt;
&lt;div style="margin: 0in 0in 10pt 0.75in; text-indent: -0.25in"&gt;&lt;span style="font-size: medium"&gt;-&lt;span style="font: 7pt 'Times New Roman'"&gt;        &lt;/span&gt;Do not use the “ternary If operator” … not the IIf method but this one     If(condition, truepart, falsepart).&lt;/span&gt;&lt;/div&gt;
&lt;div style="margin: 0in 0in 10pt 0.75in; text-indent: -0.25in"&gt; &lt;/div&gt;
&lt;div style="margin: 0in 0in 10pt"&gt;&lt;span style="font-size: medium"&gt;As a side note, I talked about not using LinQ keyword nor the extension methods but, this doesn’t mean not to use LinQ in this scenario. LinQ is perfectly accessible from inside VS2005 if your client allows you to target framework 3.5. All you need to do is reference System.Core, use namespace System.Linq and use class “Enumerable” as a helper class… This is one of the many classes containing various methods that VS2008 sees as extensions. The trick is you can use them too! Simply remember that the first parameter of the method is the object you want to query on and then pass in the other parameters needed…&lt;/span&gt;&lt;/div&gt;
&lt;div style="margin: 0in 0in 10pt"&gt;&lt;span style="font-size: medium"&gt;That’s pretty much all I see but I could have missed a few… If you know other things that are specific to the VS2008 compiler and which do not work under VS2005, feel free to leave a comment and I’ll modify my list accordingly (and notify our team here…) !&lt;/span&gt;&lt;/div&gt;
&lt;div style="margin: 0in 0in 10pt"&gt;&lt;span style="font-size: medium"&gt;Happy coding all!&lt;/span&gt;&lt;/div&gt;&lt;img src="http://geekswithblogs.net/vincentgrondin/aggbug/139497.aspx" width="1" height="1" /&gt;</content>
        <wfw:comment>http://geekswithblogs.net/vincentgrondin/comments/139497.aspx</wfw:comment>
        <slash:comments>0</slash:comments>
        <wfw:commentRss>http://geekswithblogs.net/vincentgrondin/comments/commentRss/139497.aspx</wfw:commentRss>
        <trackback:ping>http://geekswithblogs.net/vincentgrondin/services/trackbacks/139497.aspx</trackback:ping>
    </entry>
    <entry>
        <title>Presenting LinQ to Objects in Ottawa</title>
        <link rel="self" type="text/html" href="http://geekswithblogs.net/vincentgrondin/archive/2010/04/17/presenting-linq-to-objects-in-ottawa.aspx" />
        <id>http://geekswithblogs.net/vincentgrondin/archive/2010/04/17/presenting-linq-to-objects-in-ottawa.aspx</id>
        <published>2010-04-17T21:06:03-04:00:00</published>
        <updated>2010-04-17T21:06:03Z</updated>
        <content type="html">&lt;p&gt;Here's the material for my introduction on LinQ to Objects at Ottawa's code camp... &lt;/p&gt;
&lt;p&gt;Happy downloading!&lt;/p&gt;
&lt;p&gt;&lt;a href="http://cid-bdf9cf467011e705.skydrive.live.com/self.aspx/.Public/Blog%20sample%20downloads/Ottawa%20Code%20Camp/Ottawa%20Code%20Camp.zip"&gt;http://cid-bdf9cf467011e705.skydrive.live.com/self.aspx/.Public/Blog%20sample%20downloads/Ottawa%20Code%20Camp/Ottawa%20Code%20Camp.zip&lt;/a&gt;&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt; &lt;/p&gt;&lt;img src="http://geekswithblogs.net/vincentgrondin/aggbug/139329.aspx" width="1" height="1" /&gt;</content>
        <wfw:comment>http://geekswithblogs.net/vincentgrondin/comments/139329.aspx</wfw:comment>
        <slash:comments>2</slash:comments>
        <wfw:commentRss>http://geekswithblogs.net/vincentgrondin/comments/commentRss/139329.aspx</wfw:commentRss>
        <trackback:ping>http://geekswithblogs.net/vincentgrondin/services/trackbacks/139329.aspx</trackback:ping>
    </entry>
    <entry>
        <title>Using the “Settings.settings” functionalities in VB.NET can be tricky…</title>
        <link rel="self" type="text/html" href="http://geekswithblogs.net/vincentgrondin/archive/2010/04/07/using-the-settings.settings-functionalities-in-vb.net-can-be-tricky.aspx" />
        <id>http://geekswithblogs.net/vincentgrondin/archive/2010/04/07/using-the-settings.settings-functionalities-in-vb.net-can-be-tricky.aspx</id>
        <published>2010-04-07T21:22:49-04:00:00</published>
        <updated>2010-04-07T21:22:49Z</updated>
        <content type="html">&lt;p class="MsoNormal" style="margin: 0in 0in 10pt"&gt; &lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 0in 0in 10pt"&gt;&lt;span style="font-size: small"&gt;&lt;font face="Calibri"&gt;Sometime you’re searching for something forever and when you find it, you realize it was right under your nose.&lt;span style="mso-spacerun: yes"&gt;  &lt;/span&gt;Maybe you were distracted by other things around… or maybe that thing right under your nose was so well hidden that it deserves a blog post…&lt;span style="mso-spacerun: yes"&gt;   &lt;/span&gt;That happened to me a few days ago while using the “Settings.settings” functionalities in my VB.NET application…&lt;span style="mso-spacerun: yes"&gt;  &lt;/span&gt;I thought it was a cool feature and I decided to use it…&lt;span style="mso-spacerun: yes"&gt;  &lt;/span&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 0in 0in 10pt"&gt;&lt;span style="font-size: small"&gt;&lt;font face="Calibri"&gt;So there I am adding new settings with “USER” scope and StringCollection as the data type, testing my application and everything works perfectly fine...&lt;span style="mso-spacerun: yes"&gt;  &lt;/span&gt;That was before I decided to modify the “Value” of one of my settings…&lt;span style="mso-spacerun: yes"&gt;  &lt;/span&gt;After changing the value of one of my settings, I start my application again and, to my surprise, my new values aren’t showing!&lt;span style="mso-spacerun: yes"&gt;  &lt;/span&gt;Hmmm… That’s odd…&lt;span style="mso-spacerun: yes"&gt;  &lt;/span&gt;My setting was a pretty long list of strings so I was rather angry at myself for not saving my work after I was done…&lt;span style="mso-spacerun: yes"&gt;  &lt;/span&gt;So I open up the Settings.setting in the designer and click the ellipsis symbol to enter my string collection again, but to my great pleasure (and disbelief) my strings are there!!!&lt;span style="mso-spacerun: yes"&gt;  &lt;/span&gt;Alright, you rock VB.NET!&lt;span style="mso-spacerun: yes"&gt;  &lt;/span&gt;You’ve just save me a bunch of typing time and I’m thinking it’s just a simple Visual Studio glitch…&lt;span style="mso-spacerun: yes"&gt;  &lt;/span&gt;I hit “Save” then “Save All” (just in case) and finally I rebuild everything and fire up my app once again.&lt;span style="mso-spacerun: yes"&gt;  &lt;/span&gt;Huh?&lt;span style="mso-spacerun: yes"&gt;  &lt;/span&gt;Where are my darn strings????????&lt;span style="mso-spacerun: yes"&gt;  &lt;/span&gt;Ok there’s a bug there…&lt;span style="mso-spacerun: yes"&gt;  &lt;/span&gt;I open up the app.config and my new strings are there!!!&lt;span style="mso-spacerun: yes"&gt;  &lt;/span&gt;Alright, let’s recap…&lt;span style="mso-spacerun: yes"&gt;  &lt;/span&gt;My new strings are in the app.config, they show correctly in the Settings.settings designer UI but they aren’t showing at runtime…&lt;span style="mso-spacerun: yes"&gt;  &lt;/span&gt;Hmmmm?&lt;span style="mso-spacerun: yes"&gt;  &lt;/span&gt;Let’s try something else…&lt;span style="mso-spacerun: yes"&gt;  &lt;/span&gt;Let’s start the application but outside Visual Studio this time… I fire up the exe and BAM!&lt;span style="mso-spacerun: yes"&gt;  &lt;/span&gt;My strings where there!&lt;span style="mso-spacerun: yes"&gt;  &lt;/span&gt;I “alt-tab” and hit “F5” and BOOM, no strings!&lt;span style="mso-spacerun: yes"&gt;  &lt;/span&gt;So it’s a bug in the Visual Studio environment… or could it be a FEATURE?&lt;span style="mso-spacerun: yes"&gt;  &lt;/span&gt;I must admit that I’m a little confused over what’s a bug and what’s a feature in Visual Studio… lol!&lt;span style="mso-spacerun: yes"&gt;   &lt;/span&gt;Finally I found out there’s a “cache” for your Visual Studio located here:&lt;span style="mso-spacerun: yes"&gt;  &lt;/span&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 0in 0in 10pt"&gt;&lt;strong&gt;&lt;span style="font-size: small"&gt;&lt;font face="Calibri"&gt;C:\Users\&amp;lt;your username&amp;gt;\AppData\Local\Microsoft\&amp;lt;your app name and a very weird temp ID&amp;gt;\&amp;lt;your app version&amp;gt;\user.config&lt;/font&gt;&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 0in 0in 10pt"&gt;&lt;span style="font-size: small"&gt;&lt;font face="Calibri"&gt;When using the “Settings.settings” with a setting of scope “user”, this file is out of sync with your app.config until you manually decide to update it… The button is right there… under your nose… at the top left corner of your screen in the settings designer…&lt;span style="mso-spacerun: yes"&gt;  &lt;/span&gt;See the big “Synchronize” button there?&lt;span style="mso-spacerun: yes"&gt;  &lt;/span&gt;Yep…&lt;span style="mso-spacerun: yes"&gt;  &lt;/span&gt;Now that’s user friendly isn’t it?&lt;span style="mso-spacerun: yes"&gt;  &lt;/span&gt;Oh, and wait until you see what it does when you click it…&lt;span style="mso-spacerun: yes"&gt;  &lt;/span&gt;It prompts you and basically says:&lt;span style="mso-spacerun: yes"&gt;  &lt;/span&gt;“Would you like your settings to start working inside Visual Studio now that you found out that I exist?” and of course the right answer is yes… or rather “OK”…&lt;span style="mso-spacerun: yes"&gt;  &lt;/span&gt;Unfortunately, you have to do this every time you edit a value… On the other hand, adding and removing settings seem to work flawlessly without having to click this magical button… go figure!&lt;span style="mso-spacerun: yes"&gt;  &lt;/span&gt;Oh and I almost forgot… this great “feature” is only available for VB.NET…&lt;span style="mso-spacerun: yes"&gt;  &lt;/span&gt;A project in C# using Settings.settings will work perfectly EVEN when editing values…&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 0in 0in 10pt"&gt;&lt;span style="font-size: small"&gt;&lt;font face="Calibri"&gt;Here’s a screenshot that shows this important button:&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://9nq3na.bay.livefilestore.com/y1p1L0cZbW4UfTwNhfGrS7raFuDC0zK2PUMw_0l5TA0Tm5EpcP4BZR5FWV3uCwE9acWQ7hTTtaVaz0xE3frMIpxZ6lS8k7-pgqn/screenshot.jpg"&gt;Button&lt;/a&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 0in 0in 10pt"&gt;&lt;span style="font-size: small"&gt;&lt;font face="Calibri"&gt;Using other data types appears to work perfectly well…&lt;span style="mso-spacerun: yes"&gt;   &lt;/span&gt;Maybe it’s simply related to the StringCollection data type?&lt;span style="mso-spacerun: yes"&gt;  &lt;/span&gt;If you are a VB.NET programmer, you should pay attention to this when you plan on using the settings functionalities and your scope is “user” and your data type is StringCollection…&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: small"&gt;&lt;span style="line-height: 115%; font-family: &amp;quot;Calibri&amp;quot;,&amp;quot;sans-serif&amp;quot;; mso-ansi-language: EN-US; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-hansi-theme-font: minor-latin; mso-bidi-font-family: 'Times New Roman'; mso-bidi-theme-font: minor-bidi; mso-fareast-language: EN-US; mso-bidi-language: AR-SA"&gt;Happy coding all!&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;img src="http://geekswithblogs.net/vincentgrondin/aggbug/139147.aspx" width="1" height="1" /&gt;</content>
        <wfw:comment>http://geekswithblogs.net/vincentgrondin/comments/139147.aspx</wfw:comment>
        <slash:comments>0</slash:comments>
        <wfw:commentRss>http://geekswithblogs.net/vincentgrondin/comments/commentRss/139147.aspx</wfw:commentRss>
        <trackback:ping>http://geekswithblogs.net/vincentgrondin/services/trackbacks/139147.aspx</trackback:ping>
    </entry>
    <entry>
        <title>Steps to deploying on Windows Azure</title>
        <link rel="self" type="text/html" href="http://geekswithblogs.net/vincentgrondin/archive/2010/03/15/steps-to-deploying-on-windows-azure.aspx" />
        <id>http://geekswithblogs.net/vincentgrondin/archive/2010/03/15/steps-to-deploying-on-windows-azure.aspx</id>
        <published>2010-03-15T22:44:33-04:00:00</published>
        <updated>2010-03-16T10:39:23Z</updated>
        <content type="html">&lt;p&gt;&lt;span style="font-size: x-small"&gt;Alright, these steps might be a little detailed and of few might not be necessary but still it's a pretty accurate road map to deploying on azure...&lt;/span&gt;&lt;/p&gt;
&lt;p&gt; This procedure assumes that you've created a solution with an Azure project into it.&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;&lt;span lang="FR-CA"&gt;&lt;span&gt;&lt;font size="3" face="Calibri"&gt;1)&lt;/font&gt;&lt;span style="font: 7pt 'Times New Roman'"&gt;     &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span lang="FR-CA"&gt;&lt;font size="3"&gt;&lt;font face="Calibri"&gt;Open your solution&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span lang="FR-CA"&gt;&lt;span&gt;&lt;font size="3" face="Calibri"&gt;2)&lt;/font&gt;&lt;span style="font: 7pt 'Times New Roman'"&gt;      &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span lang="FR-CA"&gt;&lt;font size="3"&gt;&lt;font face="Calibri"&gt;Rebuild ALL&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span lang="FR-CA"&gt;&lt;span&gt;&lt;font size="3" face="Calibri"&gt;3)&lt;/font&gt;&lt;span style="font: 7pt 'Times New Roman'"&gt;      &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span lang="FR-CA"&gt;&lt;font size="3"&gt;&lt;font face="Calibri"&gt;Right click on your Azure project and click "Publish"&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span lang="FR-CA"&gt;&lt;span&gt;&lt;font size="3" face="Calibri"&gt;4)&lt;/font&gt;&lt;span style="font: 7pt 'Times New Roman'"&gt;      &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span lang="FR-CA"&gt;&lt;font size="3"&gt;&lt;font face="Calibri"&gt;It should open a windows explorer window with your package to be uploaded (.cspkg ) and its associated configuration (.cscfg) to be uploaded too.  Keep it open, you'll need that path later on...&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span lang="FR-CA"&gt;&lt;span&gt;&lt;font size="3" face="Calibri"&gt;5)&lt;/font&gt;&lt;span style="font: 7pt 'Times New Roman'"&gt;      &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span lang="FR-CA"&gt;&lt;font size="3"&gt;&lt;font face="Calibri"&gt;It should also open a browser asking you to login to your passport account, please do so.&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span lang="FR-CA"&gt;&lt;span&gt;&lt;font size="3" face="Calibri"&gt;6)&lt;/font&gt;&lt;span style="font: 7pt 'Times New Roman'"&gt;      &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span lang="FR-CA"&gt;&lt;font size="3"&gt;&lt;font face="Calibri"&gt;After this you will be redirected to the Azure Portal where you will see your Azure Project Name below the « Projet Name » section.  Click on it.&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span lang="FR-CA"&gt;&lt;span&gt;&lt;font size="3" face="Calibri"&gt;7)&lt;/font&gt;&lt;span style="font: 7pt 'Times New Roman'"&gt;      &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span lang="FR-CA"&gt;&lt;font size="3"&gt;&lt;font face="Calibri"&gt;Then you should be redirected to a detailed view of your account on Azure where you will create a new service by clicking the hyperlink on the top right corner.&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span lang="FR-CA"&gt;&lt;span&gt;&lt;font size="3" face="Calibri"&gt;8)&lt;/font&gt;&lt;span style="font: 7pt 'Times New Roman'"&gt;      &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span lang="FR-CA"&gt;&lt;font size="3"&gt;&lt;font face="Calibri"&gt;Choose the right service type for you, most likely the "Hosted Service" type&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span lang="FR-CA"&gt;&lt;span&gt;&lt;font size="3" face="Calibri"&gt;9)&lt;/font&gt;&lt;span style="font: 7pt 'Times New Roman'"&gt;      &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span lang="FR-CA"&gt;&lt;font size="3"&gt;&lt;font face="Calibri"&gt;Choose a « Label » name and click « next »&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span lang="FR-CA"&gt;&lt;span&gt;&lt;font size="3" face="Calibri"&gt;10)&lt;/font&gt;&lt;span style="font: 7pt 'Times New Roman'"&gt;   &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span lang="FR-CA"&gt;&lt;font size="3"&gt;&lt;font face="Calibri"&gt;Choose a name for your service and validate that the name is available in the cloud by clicking the "Check Availability" button&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span lang="FR-CA"&gt;&lt;span&gt;&lt;font size="3" face="Calibri"&gt;11)&lt;/font&gt;&lt;span style="font: 7pt 'Times New Roman'"&gt;   &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span lang="FR-CA"&gt;&lt;font size="3"&gt;&lt;font face="Calibri"&gt;At the bottom of this same page, you can choose to create a group for your service, use no group or join an existing group.  Creating a group means that all applications that belong to the same group will see no cost to exchanging data between other applications of the same group.  Most of the time when you create a single application, creating a group is not necessary.  You should choose a region that's close to your own region.&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span lang="FR-CA"&gt;&lt;span&gt;&lt;font size="3" face="Calibri"&gt;12)&lt;/font&gt;&lt;span style="font: 7pt 'Times New Roman'"&gt;   &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span lang="FR-CA"&gt;&lt;font size="3"&gt;&lt;font face="Calibri"&gt;On the next window, you should see a "Production" environment and a "Staging" environment.  Beware because "Staging" and "Production" are two different environments in the cloud and applications in "Staging" even when not runing do continue to rack in charges...  Choose an environment and click "Deploy".&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span lang="FR-CA"&gt;&lt;span&gt;&lt;font size="3" face="Calibri"&gt;13)&lt;/font&gt;&lt;span style="font: 7pt 'Times New Roman'"&gt;   &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span lang="FR-CA"&gt;&lt;font size="3"&gt;&lt;font face="Calibri"&gt;In the following window, browse to the path where your cspkg resides and then do the same thing with your cscfg file.  Choose a name for your Label,  and click "Deploy"...&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span lang="FR-CA"&gt;&lt;span&gt;&lt;font size="3" face="Calibri"&gt;14)&lt;/font&gt;&lt;span style="font: 7pt 'Times New Roman'"&gt;   &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span lang="FR-CA"&gt;&lt;font size="3"&gt;&lt;font face="Calibri"&gt;From now on, the clock is ticking and unless you have free Azure hours, your credit card is being billed…&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span lang="FR-CA"&gt;&lt;span&gt;&lt;font size="3" face="Calibri"&gt;15)&lt;/font&gt;&lt;span style="font: 7pt 'Times New Roman'"&gt;   &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span lang="FR-CA"&gt;&lt;font size="3"&gt;&lt;font face="Calibri"&gt;Click on the « Run » button to start your application&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span lang="FR-CA"&gt;&lt;span&gt;&lt;font size="3" face="Calibri"&gt;16)&lt;/font&gt;&lt;span style="font: 7pt 'Times New Roman'"&gt;   &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span lang="FR-CA"&gt;&lt;font size="3"&gt;&lt;font face="Calibri"&gt;Be patient.... be very patient…&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span lang="FR-CA"&gt;&lt;span&gt;&lt;font size="3" face="Calibri"&gt;17)&lt;/font&gt;&lt;span style="font: 7pt 'Times New Roman'"&gt;   &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span lang="FR-CA"&gt;&lt;font size="3" face="Calibri"&gt;Once your application has finished starting, you should see a GREEN circle on the left side of the screen indicating that your application is READY.  Click the URL to test your application and remember that if your application is a service, you have to hit the "svc" class behind the link you see there.  Something in the likes of &lt;/font&gt;&lt;/span&gt;&lt;span style="font-size: small"&gt;&lt;span lang="FR-CA" style="color: #353535"&gt;&lt;a target="_blank" href="http://testvince2.cloudapp.net/service1.svc"&gt;&lt;span style="font-size: x-small"&gt;&lt;font color="#0068cf"&gt;http://testvince2.cloudapp.net/service1.svc&lt;/font&gt;&lt;/span&gt;&lt;/a&gt;&lt;/span&gt;&lt;/span&gt;&lt;span lang="FR-CA" style="color: #353535; font-size: 7.5pt"&gt;  (this is a fictional link)&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span lang="FR-CA"&gt;&lt;span&gt;&lt;font size="3" face="Calibri"&gt;18)&lt;/font&gt;&lt;span style="font: 7pt 'Times New Roman'"&gt;   &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span lang="FR-CA"&gt;&lt;font size="3"&gt;&lt;font face="Calibri"&gt;Hopefully your application will show up or in the case of a service, you will see your service's wsdl meaning that everything is working fine.&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span lang="FR-CA"&gt;&lt;font size="3"&gt;&lt;font face="Calibri"&gt;Happy cloud computing all!&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt; &lt;/p&gt;&lt;img src="http://geekswithblogs.net/vincentgrondin/aggbug/138544.aspx" width="1" height="1" /&gt;</content>
        <wfw:comment>http://geekswithblogs.net/vincentgrondin/comments/138544.aspx</wfw:comment>
        <slash:comments>0</slash:comments>
        <wfw:commentRss>http://geekswithblogs.net/vincentgrondin/comments/commentRss/138544.aspx</wfw:commentRss>
        <trackback:ping>http://geekswithblogs.net/vincentgrondin/services/trackbacks/138544.aspx</trackback:ping>
    </entry>
    <entry>
        <title>A few things I learned regarding Azure billing policies</title>
        <link rel="self" type="text/html" href="http://geekswithblogs.net/vincentgrondin/archive/2010/03/04/a-few-things-i-learned-regarding-azure-billing-policies.aspx" />
        <id>http://geekswithblogs.net/vincentgrondin/archive/2010/03/04/a-few-things-i-learned-regarding-azure-billing-policies.aspx</id>
        <published>2010-03-04T21:08:29-05:00:00</published>
        <updated>2010-03-15T22:46:18Z</updated>
        <content type="html">&lt;div&gt; &lt;/div&gt;
&lt;div&gt; &lt;/div&gt;
&lt;div&gt;&lt;span style="font-size: larger"&gt;&lt;span style="font-family: Arial"&gt;An hour of small computing time: 0,12$ per hour&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt; &lt;/div&gt;
&lt;div&gt;&lt;span style="font-size: larger"&gt;&lt;span style="font-family: Arial"&gt;A Gig of storage in the cloud: 0,15$ per hour&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt; &lt;/div&gt;
&lt;div&gt;&lt;span style="font-size: larger"&gt;&lt;span style="font-family: Arial"&gt;1 Gig of relational database using Azure SQL: 9,99$  per month&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt; &lt;/div&gt;
&lt;div&gt;&lt;span style="font-size: larger"&gt;&lt;span style="font-family: Arial"&gt;A Visual Studio Professional with MSDN Premium account: 2500$ per year&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt; &lt;/div&gt;
&lt;div&gt;&lt;span style="font-size: larger"&gt;&lt;span style="font-family: Arial"&gt;Winning an MSDN Professional account that comes preloaded with 750 free hours of Azure per month:  &lt;strong&gt;PRICELESS !!!&lt;/strong&gt;   &lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt; &lt;/div&gt;
&lt;div&gt;&lt;span style="font-size: larger"&gt;&lt;span style="font-family: Arial"&gt;&lt;em&gt;&lt;b&gt;But was it really free???? Hmmm… Let’s see.....&lt;/b&gt;&lt;/em&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt; &lt;/div&gt;
&lt;div&gt;&lt;span style="font-size: larger"&gt;&lt;span style="font-family: Arial"&gt;Here's a few things I learned regarding Azure billing policies when I attended a promotional training at Microsoft last week...&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt; &lt;/div&gt;
&lt;div&gt; &lt;/div&gt;
&lt;div&gt; &lt;/div&gt;
&lt;div&gt;&lt;span style="font-size: larger"&gt;&lt;span style="font-family: Arial"&gt;1)  An instance deployed in the cloud really means whatever you upload in there... it doesn't matter if it's in STAGING OR PRODUCTION!!!!   Your MSDN account comes with 750 free hours of small computing time per month which should be enough hours per month for one instance of one application deployed in the cloud...  So we're cool, the application you run in the cloud doesn't cost you a penny....  BUT the one that's in staging is still consuming time!!!   So if you don’t want to end up having to pay 42$ at the end of the month on your credit card like this happened to a friend of mine, DELETE them staging applications once you’ve put them in production! This also applies to the instance count you can modify in the configuration file… So stop and think before you decide you want to spawn 50 of those hello world apps  &lt;img alt="" src="http://geekswithblogs.net/Providers/BlogEntryEditor/FCKeditor/editor/images/smiley/msn/regular_smile.gif" /&gt;. &lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt; &lt;/div&gt;
&lt;div&gt; &lt;/div&gt;
&lt;div&gt;&lt;span style="font-size: larger"&gt;&lt;span style="font-family: Arial"&gt;2) If you have an MSDN account, then you have the promotional 750 hours of Azure credits per month and can use the Azure credits to explore the Cloud! But be aware, this promotion ends in 8 months (maybe more like 7 now) and then you will most likely go back to the standard 250 hours of Azure credits. If you do not delete your applications by then, you’ll get billed for the extra hours, believe me…   There is a switch that you can toggle and which will STOP your automatic enrollment after the promotion and prevent you from renewing the Azure Account automatically. Yes the default setting is to automatically renew your account and remember, you entered your credit card information in the registration process so, yes, you WILL be billed…  Go disable that ASAP &lt;img alt="" src="http://geekswithblogs.net/Providers/BlogEntryEditor/FCKeditor/editor/images/smiley/msn/regular_smile.gif" /&gt;   Log into your account, go to “Windows Azure Platform” then click the “Subscriptions” tab and on the right side, you’ll see a drop down with different “Actions” into it… Choose “Opt out of auto renew” and, NOW you’re safe…&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt; &lt;/div&gt;
&lt;div&gt;&lt;span style="font-size: larger"&gt;&lt;span style="font-family: Arial"&gt;Still, this is a great offer by Microsoft and I think everyone that has a chance should play a bit with Azure to get to know this technology a bit more...&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt; &lt;/div&gt;
&lt;div&gt; &lt;/div&gt;
&lt;div&gt;&lt;span style="font-size: larger"&gt;&lt;span style="font-family: Arial"&gt;Happy Cloud Computing All &lt;img alt="" src="http://geekswithblogs.net/Providers/BlogEntryEditor/FCKeditor/editor/images/smiley/msn/teeth_smile.gif" /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;img src="http://geekswithblogs.net/vincentgrondin/aggbug/138343.aspx" width="1" height="1" /&gt;</content>
        <wfw:comment>http://geekswithblogs.net/vincentgrondin/comments/138343.aspx</wfw:comment>
        <slash:comments>0</slash:comments>
        <wfw:commentRss>http://geekswithblogs.net/vincentgrondin/comments/commentRss/138343.aspx</wfw:commentRss>
        <trackback:ping>http://geekswithblogs.net/vincentgrondin/services/trackbacks/138343.aspx</trackback:ping>
    </entry>
    <entry>
        <title>Coding Dojo at .NET Montreal Community</title>
        <link rel="self" type="text/html" href="http://geekswithblogs.net/vincentgrondin/archive/2010/01/19/coding-dojo-at-.net-montreal-community.aspx" />
        <id>http://geekswithblogs.net/vincentgrondin/archive/2010/01/19/coding-dojo-at-.net-montreal-community.aspx</id>
        <published>2010-01-19T21:51:35-05:00:00</published>
        <updated>2010-01-19T21:51:35Z</updated>
        <content type="html">&lt;p&gt;Yesterday I gave a conference on LinQ to Objects at the .NET Montreal Community.  The format was not your typical conference, it was a coding dojo!&lt;/p&gt;
&lt;p&gt;Everything went well and I think many people enjoyed to event.   I'm posting a link to the solution that contains all the exercices the group did with the the answers included.  Unfortunatly, it's in french :)  If someone would like to have the exercices in english, about 20 of them, please post a reply and I'll put the english version here ASAP...&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;Have fun!&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;&lt;a href="http://cid-bdf9cf467011e705.skydrive.live.com/self.aspx/.Public/Blog%20sample%20downloads/Conf%c3%a9rence%2018%20Janvier%202010%20GUVSM/CodingDojo-LinQ.zip"&gt;cid-bdf9cf467011e705.skydrive.live.com/self.aspx/.Public/Blog%20sample%20downloads/Conf%c3%a9rence%2018%20Janvier%202010%20GUVSM/CodingDojo-LinQ.zip&lt;/a&gt;&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt; &lt;/p&gt;&lt;img src="http://geekswithblogs.net/vincentgrondin/aggbug/137552.aspx" width="1" height="1" /&gt;</content>
        <wfw:comment>http://geekswithblogs.net/vincentgrondin/comments/137552.aspx</wfw:comment>
        <slash:comments>0</slash:comments>
        <wfw:commentRss>http://geekswithblogs.net/vincentgrondin/comments/commentRss/137552.aspx</wfw:commentRss>
        <trackback:ping>http://geekswithblogs.net/vincentgrondin/services/trackbacks/137552.aspx</trackback:ping>
    </entry>
    <entry>
        <title>Behold, the "swiss knife" of delegates...  Action T  !!!</title>
        <link rel="self" type="text/html" href="http://geekswithblogs.net/vincentgrondin/archive/2009/12/07/behold-the-swiss-knife-of-delegates.--actiont.aspx" />
        <id>http://geekswithblogs.net/vincentgrondin/archive/2009/12/07/behold-the-swiss-knife-of-delegates.--actiont.aspx</id>
        <published>2009-12-07T22:06:21-05:00:00</published>
        <updated>2009-12-07T22:07:19Z</updated>
        <content type="html">&lt;div style="margin: 0cm 0cm 10pt"&gt; &lt;/div&gt;
&lt;div style="margin: 0cm 0cm 10pt"&gt;When writing multi tier systems, a common thing that architects or any other person in charge of communications between tiers will do is define the public interfaces for the system. Another thing we often do when designing such systems is define delegates available for use within the code. This is something I always thought was important to do but, honestly, how much time do I end up losing writing a new delegate declaration each time I need one? Way too much in my opinion! Since framework 2.0 and the arrival of Generics, we had the opportunity to start using the Action&amp;lt;T&amp;gt; delegate. This generic delegate works like an all purpose delegate and I call it the “swiss knife” of delegates. &lt;/div&gt;
&lt;div style="margin: 0cm 0cm 10pt"&gt;Basically any method that takes one parameter and returns “void” can be used as the target of this signature! What, you expected Microsoft would create a delegate for each type available in the framework??? Nah think “Generics”!!! Simply specify the type of the parameter when declaring the delegate, like in the following example when I use a method that takes a string as the only parameter:&lt;/div&gt;
&lt;div style="margin: 0cm 0cm 10pt"&gt;public Action&amp;lt;string&amp;gt; myDelegate;&lt;/div&gt;
&lt;div style="margin: 0cm 0cm 10pt"&gt;Also, if the method you want to use as the target of the delegate as no parameter and returns void, you can use the Action class available from within the “System” namespace.&lt;/div&gt;
&lt;div style="margin: 0cm 0cm 10pt"&gt;With framework 3.5, things have evolved and our “swiss knife” has added some extra tools for us to use! The Action&amp;lt;T&amp;gt; delegate has now 3 new flavors namely Action&amp;lt;T1, T2&amp;gt;, Action&amp;lt;T1, T2, T3&amp;gt; and Action&amp;lt;T1, T2, T3, T4&amp;gt;. Now you can use this fantastic time saver on methods that have up to four parameters! Look at the following:&lt;/div&gt;
&lt;div style="margin: 0cm 0cm 10pt"&gt;public Action&amp;lt;string, int, double, Employee&amp;gt; myDelegate;&lt;/div&gt;
&lt;div style="margin: 0cm 0cm 10pt"&gt;In framework 4.0, they literally transformed our “swiss knife” into an über “swiss knife”!!! This one goes out to the brave men and women from the .NET Framework who have decided to add 12 more flavors of Action&amp;lt;T&amp;gt; delegates bringing the total Action flavors to 16… That’s awesome… more goodies for us to use but, why 16?  I think that’s a lot but still, a great asset.&lt;/div&gt;
&lt;div style="margin: 0cm 0cm 10pt"&gt;Alright, now what should you use if the method you want to use with a delegate returns a value? Hmmm… Action&amp;lt;T&amp;gt; clearly states that the target has to return void. The answer is Func&amp;lt;TResult&amp;gt;!!! Using the same pattern, the designers of the 4.0 .Net Framework added 16 flavors of a method that returns a value. The only difference between the two delegates is that Func wasn’t available in the 2.0 .Net Framework…&lt;/div&gt;
&lt;div style="margin: 0cm 0cm 10pt"&gt; &lt;/div&gt;
&lt;div style="margin: 0cm 0cm 10pt"&gt;Predicates are going to be for the next time…. Until then, happy learning!&lt;/div&gt;&lt;img src="http://geekswithblogs.net/vincentgrondin/aggbug/136817.aspx" width="1" height="1" /&gt;</content>
        <wfw:comment>http://geekswithblogs.net/vincentgrondin/comments/136817.aspx</wfw:comment>
        <slash:comments>0</slash:comments>
        <wfw:commentRss>http://geekswithblogs.net/vincentgrondin/comments/commentRss/136817.aspx</wfw:commentRss>
        <trackback:ping>http://geekswithblogs.net/vincentgrondin/services/trackbacks/136817.aspx</trackback:ping>
    </entry>
    <entry>
        <title>Cross-thread operation and UI tips</title>
        <link rel="self" type="text/html" href="http://geekswithblogs.net/vincentgrondin/archive/2009/11/15/cross-thread-operation-and-ui-tips.aspx" />
        <id>http://geekswithblogs.net/vincentgrondin/archive/2009/11/15/cross-thread-operation-and-ui-tips.aspx</id>
        <published>2009-11-15T20:53:32-05:00:00</published>
        <updated>2009-11-15T21:07:09Z</updated>
        <content type="html">&lt;div style="margin: 0cm 0cm 10pt"&gt; &lt;/div&gt;
&lt;div style="margin: 0cm 0cm 10pt"&gt;Sometimes you hook yourself to events in the system that you are building which you know will be fired from another thread than the thread that will handle or consume the event. A good example of that would be to hook yourself to a &lt;em&gt;System.Timers.Timer.Elapsed&lt;/em&gt; event from within a windows form.&lt;span&gt;  In the event handler you need to update some visual controls.... Damn it!  You receive an &lt;strong&gt;“InvalidOperationException”&lt;/strong&gt; saying &lt;em&gt;“Cross-Thread operation not valid...” &lt;/em&gt;!!!  How do you solve that again?  Oh yeah that’s right, in the exception viewer, click the “How to make cross-thread to windows form controls”... After 20 minutes of reading you’ll implement the solution and say &lt;em&gt;“man that is one useless method I just created and I need to create ten or twenty more methods identical to this one just to update my darn UI !”&lt;/em&gt;.  I call this "&lt;strong&gt;code spam&lt;/strong&gt;” !&lt;/span&gt;&lt;/div&gt;
&lt;div style="margin: 0cm 0cm 10pt"&gt;The problem is easy to understand...  You need to run the code that wants to play with UI controls from the same thread as the UI thread by calling “this.Invoke” and passing in a delegate that points to a method which will update the UI...  Now that’s exactly what you did previously...&lt;u&gt; and it sucked because you polluted your code with a useless method an potentially many of those&lt;/u&gt;.... No need to say that there are another ways of doing this.  Why not simply use the handler itself as the target of the invocation?  You’re already inside the right method, aren’t you???  It simply wasn’t invoked from the right thread... Look at &lt;a href="/images/geekswithblogs_net/vincentgrondin/November/Multi-Threading/Invoke.jpg"&gt;this&lt;/a&gt; code which handles a &lt;em&gt;System.Timers.Timer.Elapsed&lt;/em&gt; event and then successfully updates the UI.&lt;/div&gt;
&lt;div style="margin: 0cm 0cm 10pt"&gt; &lt;/div&gt;
&lt;div style="margin: 0cm 0cm 10pt"&gt;The magic occurs at line 31 where I test whether or not the current executing code runs from the same thread as the window or “Form” containing the visual controls. If it’s not, then an “invoke” from the “Form” is required. This part is the “True” part of the “If”. In there I call the method I’m already in (call it recursion if you want) using a delegate that should match most if not all events in the .NET Framework being &lt;em&gt;EventHandler&amp;lt;TEventArgs&amp;gt;&lt;/em&gt;. This is a generic signature that specifies a method that accepts a first parameter of type &lt;em&gt;“object”&lt;/em&gt; and a second parameter that must inherit from &lt;em&gt;“EventArgs”&lt;/em&gt;. Look at the following to better understand this delegate:&lt;/div&gt;
&lt;div style="margin: 0cm 0cm 10pt"&gt;&lt;img alt="" width="422" height="60" src="/images/geekswithblogs_net/vincentgrondin/November/Multi-Threading/EventHandler_TEventArgs.jpg" /&gt;&lt;/div&gt;
&lt;div style="margin: 0cm 0cm 10pt"&gt; &lt;/div&gt;
&lt;div style="margin: 0cm 0cm 10pt"&gt;As soon as line 33 executes, the code will jump to line 27 and re-enter the event handler a second time. Then it will hit the magic spot once again but this time, the code has been fired from the same thread as the UI!  Remember the “this.Invoke”?  Then it will go to the “False” part of the handler and will update my UI without a problem.  Then if you continue to trace, the second call to “timer_Elapsed” will end and the original call to the “timer_Elapsed” handler will continue on line 35. &lt;strong&gt;Now, how cool is that? &lt;/strong&gt; I find it quite neat and easy to understand.&lt;/div&gt;
&lt;div style="margin: 0cm 0cm 10pt"&gt;There is one more variant of this technique I’d like to show you and which will lead me to introduce the subject of my next entry (sometimes next week) and it uses the &lt;strong&gt;“Action”&lt;/strong&gt; generic delegate.  Even tho I personnaly prefer using &lt;em&gt;"EventHandler&amp;lt;TEventArgs&amp;gt;"&lt;/em&gt; when I'm inside an handler, and &lt;strong&gt;"Action"&lt;/strong&gt; when I'm not, nothing forces you to.  There's got to be a generic signature for the &lt;strong&gt;“Action”&lt;/strong&gt; delegate that matches your method and if not then you can always refactor it so it fits one of the five generic &lt;strong&gt;“Action”&lt;/strong&gt; flavours offered with framework 3.5. Look at &lt;a href="/images/geekswithblogs_net/vincentgrondin/November/Multi-Threading/Invoke%20-%20Action.jpg"&gt;this&lt;/a&gt; code for an example.&lt;/div&gt;
&lt;p&gt;Alright so that's it for now and if you want to learn more about 2 interesting delegates being "Action" and "Predicate" stay tuned and give me a week to work on that &lt;img alt="" src="http://geekswithblogs.net/Providers/BlogEntryEditor/FCKeditor/editor/images/smiley/msn/shades_smile.gif" /&gt;.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://cid-bdf9cf467011e705.skydrive.live.com/self.aspx/.Public/Blog%20sample%20downloads/Multi-Threading%20and%20UI%20tips/TestsMultiThreading.zip"&gt;Here's&lt;/a&gt; the code if you want to take a look at it and happy Multi-Threading all.&lt;/p&gt;&lt;img src="http://geekswithblogs.net/vincentgrondin/aggbug/136321.aspx" width="1" height="1" /&gt;</content>
        <wfw:comment>http://geekswithblogs.net/vincentgrondin/comments/136321.aspx</wfw:comment>
        <slash:comments>0</slash:comments>
        <wfw:commentRss>http://geekswithblogs.net/vincentgrondin/comments/commentRss/136321.aspx</wfw:commentRss>
        <trackback:ping>http://geekswithblogs.net/vincentgrondin/services/trackbacks/136321.aspx</trackback:ping>
    </entry>
    <entry>
        <title>Less plumbing and more productivity thanks to nVentive and their Umbrella project! </title>
        <link rel="self" type="text/html" href="http://geekswithblogs.net/vincentgrondin/archive/2009/10/28/less-plumbing-and-more-productivity-thanks-to-nventive-and-their.aspx" />
        <id>http://geekswithblogs.net/vincentgrondin/archive/2009/10/28/less-plumbing-and-more-productivity-thanks-to-nventive-and-their.aspx</id>
        <published>2009-10-28T19:57:30-04:00:00</published>
        <updated>2009-10-28T20:05:07Z</updated>
        <content type="html">&lt;div style="MARGIN: 0cm 0cm 10pt"&gt;&lt;font size="2"&gt;&lt;/font&gt;&lt;/div&gt;
&lt;div style="MARGIN: 0cm 0cm 10pt"&gt;&lt;font size="2"&gt;&lt;/font&gt;&lt;/div&gt;
&lt;div style="MARGIN: 0cm 0cm 10pt"&gt;&lt;font size="2"&gt;Who here uses IDictionary classes in their projects? Raise your hand. Keep your hand up if you cannot bear the sight of having to call another ContainsKey method. Keep it up if you cry at the idea of having to use the “out” keyword in conjunction with the TryGetValue method... Keep the hand up if you consider that removing items should be allowed from inside a foreach loop. Is your hand still up? Yeah, mine too &lt;img alt="" src="/Providers/BlogEntryEditor/FCKeditor/editor/images/smiley/msn/regular_smile.gif" /&gt;.  Alright let’s all take a break. This is just one of the numerous annoying little things that all of us still have to do on a daily basis instead of focusing on business needs and real functionalities in our programs. After more than 8 years, one would have thought the many programmers behind our beloved framework would have acted and fixed those annoyances already. Guess again, I’m afraid we’re still in for many years of plumbing... Unless comes &lt;/font&gt;&lt;a href="http://umbrella.codeplex.com/"&gt;&lt;font size="2"&gt;Umbrella&lt;/font&gt;&lt;/a&gt;&lt;font size="2"&gt;!&lt;/font&gt;&lt;/div&gt;
&lt;div style="MARGIN: 0cm 0cm 10pt"&gt;&lt;font size="2"&gt;It took the ingenuity of a few persons from &lt;/font&gt;&lt;a href="http://www.nventive.net/dnn/Home/tabid/36/language/en-US/Default.aspx"&gt;&lt;font size="2"&gt;nVentive&lt;/font&gt;&lt;/a&gt;&lt;font size="2"&gt;, a Montreal based company, to fix those holes in the framework and polish some of those rough corners. Well they didn’t really fix the framework itself, but they provided us with a non intrusive set of extension methods to use everywhere in our code. This thing is awesome... Did I mention it’s non intrusive? Oh sorry. Then did I mention its open source? Ah Ah!!! I knew I had forgotten something important. Another thing worth mentioning is since this set of tools is based on extension methods, you can call the extension methods on &lt;strong&gt;null &lt;/strong&gt;objects... That’s very practical for your defensive programming validations. One more thing about extension methods is that you can also chain your calls! Here are a few examples to show you just how many useful things this set of extension methods can do for you. Some of these examples are extension methods we often build for our projects but this time they’ve pushed the concept to the extreme and rendered them generically usable in all projects and applicable to all business domains.&lt;/font&gt;&lt;/div&gt;
&lt;div style="MARGIN: 0cm 0cm 10pt"&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;/div&gt;
&lt;div style="TEXT-INDENT: -18pt; MARGIN: 0cm 0cm 10pt 36pt"&gt;&lt;font size="2"&gt;&lt;span&gt;1)&lt;span style="FONT: 7pt &amp;quot;Times New Roman&amp;quot;"&gt;      &lt;/span&gt;&lt;/span&gt;Here’s the extension to remove items from a collection based on a condition&lt;/font&gt;&lt;/div&gt;
&lt;div style="TEXT-INDENT: 35.4pt; MARGIN: 0cm 0cm 10pt"&gt;&lt;span style="LINE-HEIGHT: 115%; FONT-SIZE: 10pt"&gt;Remove&amp;lt;T&amp;gt;(&lt;span style="COLOR: blue"&gt;this&lt;/span&gt; &lt;span style="COLOR: #2b91af"&gt;ICollection&lt;/span&gt;&amp;lt;T&amp;gt; collection, &lt;span style="COLOR: #2b91af"&gt;Func&lt;/span&gt;&amp;lt;T, &lt;span style="COLOR: blue"&gt;bool&lt;/span&gt;&amp;gt; predicate)&lt;/span&gt;&lt;/div&gt;
&lt;div style="MARGIN: 0cm 0cm 10pt 35.4pt"&gt;&lt;font size="2"&gt;...and this is how to use it with a Lambda so there is no need to loop backward in the collection or loop once to put items to remove in a secondary list and then loop a second time to remove the items contained in the second list from the first list:&lt;/font&gt;&lt;/div&gt;
&lt;div style="LINE-HEIGHT: normal; TEXT-INDENT: 35.4pt"&gt;&lt;span style="COLOR: #2b91af; FONT-SIZE: 10pt"&gt;List&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt"&gt;&amp;lt;&lt;span style="COLOR: blue"&gt;int&lt;/span&gt;&amp;gt; listOfIntegers = &lt;span style="COLOR: blue"&gt;new&lt;/span&gt; &lt;span style="COLOR: #2b91af"&gt;List&lt;/span&gt;&amp;lt;&lt;span style="COLOR: blue"&gt;int&lt;/span&gt;&amp;gt; { 1, 2, 9, 9, 9, 9, 8 };&lt;/span&gt;&lt;/div&gt;
&lt;div style="LINE-HEIGHT: normal"&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;/div&gt;
&lt;div style="TEXT-INDENT: 35.4pt; MARGIN: 0cm 0cm 10pt"&gt;&lt;span style="LINE-HEIGHT: 115%; FONT-SIZE: 10pt"&gt;listOfIntegers.Remove(item =&amp;gt; item == 9);&lt;/span&gt;&lt;/div&gt;
&lt;div style="TEXT-INDENT: 35.4pt; MARGIN: 0cm 0cm 10pt"&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;/div&gt;
&lt;div style="TEXT-INDENT: -18pt; MARGIN: 0cm 0cm 0pt 36pt"&gt;&lt;font size="2"&gt;&lt;span&gt;2)&lt;span style="FONT: 7pt &amp;quot;Times New Roman&amp;quot;"&gt;      &lt;/span&gt;&lt;/span&gt;Have you ever wondered why the .NET framework had a &lt;em&gt;ForEach&lt;/em&gt; method on List&amp;lt;T&amp;gt; instead of an extension on IEnumerable&amp;lt;T&amp;gt;?  Umbrella to the rescue...&lt;/font&gt;&lt;/div&gt;
&lt;div style="MARGIN: 0cm 0cm 0pt 36pt"&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;/div&gt;
&lt;div style="MARGIN: 0cm 0cm 0pt 36pt"&gt;&lt;span style="LINE-HEIGHT: 115%; COLOR: #2b91af; FONT-SIZE: 10pt"&gt;IEnumerable&lt;/span&gt;&lt;span style="LINE-HEIGHT: 115%; FONT-SIZE: 10pt"&gt;&amp;lt;T&amp;gt; ForEach&amp;lt;T&amp;gt;(&lt;span style="COLOR: blue"&gt;this&lt;/span&gt; &lt;span style="COLOR: #2b91af"&gt;IEnumerable&lt;/span&gt;&amp;lt;T&amp;gt; items, &lt;span style="COLOR: #2b91af"&gt;Action&lt;/span&gt;&amp;lt;T&amp;gt; action)&lt;/span&gt;&lt;/div&gt;
&lt;div style="MARGIN: 0cm 0cm 0pt 36pt"&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;/div&gt;
&lt;div style="MARGIN: 0cm 0cm 0pt 36pt"&gt;&lt;font size="2"&gt;Now anything that’s enumerable will have the &lt;em&gt;ForEach&lt;/em&gt; extension method available &lt;img alt="" src="/Providers/BlogEntryEditor/FCKeditor/editor/images/smiley/msn/regular_smile.gif" /&gt;&lt;/font&gt;&lt;/div&gt;
&lt;div style="MARGIN: 0cm 0cm 0pt 36pt"&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;/div&gt;
&lt;div style="MARGIN: 0cm 0cm 0pt 36pt"&gt;&lt;font size="2"&gt;&lt;/font&gt;&lt;/div&gt;
&lt;div style="MARGIN: 0cm 0cm 0pt 36pt"&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;/div&gt;
&lt;div style="TEXT-INDENT: -18pt; MARGIN: 0cm 0cm 0pt 36pt"&gt;&lt;font size="2"&gt;&lt;span&gt;3)&lt;span style="FONT: 7pt &amp;quot;Times New Roman&amp;quot;"&gt;      &lt;/span&gt;&lt;/span&gt;There’s the extension to get a value from an IDictionary without having to write a few lines of code all the time.&lt;span&gt;   If it cannot find the desired key, it will automatically add an object from the factory you supplied as a parameter to the dictionary and set the dictionary entry key to the searched key passed as the first parameter.&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;
&lt;div style="MARGIN: 0cm 0cm 0pt 36pt"&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;/div&gt;
&lt;div style="MARGIN: 0cm 0cm 0pt 36pt"&gt;&lt;span style="LINE-HEIGHT: 115%; FONT-SIZE: 10pt"&gt;TValue GetValueOrDefault&amp;lt;TKey, TValue&amp;gt;(&lt;span style="COLOR: blue"&gt;this&lt;/span&gt; &lt;span style="COLOR: #2b91af"&gt;IDictionary&lt;/span&gt;&amp;lt;TKey, TValue&amp;gt; dictionary, TKey key)&lt;/span&gt;&lt;/div&gt;
&lt;div style="MARGIN: 0cm 0cm 0pt 36pt"&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;/div&gt;
&lt;div style="MARGIN: 0cm 0cm 10pt 36pt"&gt;&lt;font size="2"&gt;This is how to use the method:&lt;/font&gt;&lt;/div&gt;
&lt;div style="MARGIN: 0cm 0cm 10pt 36pt"&gt;&lt;span style="COLOR: #2b91af; FONT-SIZE: 10pt"&gt;Dictionary&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt"&gt;&amp;lt;&lt;span style="COLOR: blue"&gt;int&lt;/span&gt;, &lt;span style="COLOR: blue"&gt;string&lt;/span&gt;&amp;gt; dictionary = &lt;span style="COLOR: blue"&gt;new&lt;/span&gt; &lt;span style="COLOR: #2b91af"&gt;Dictionary&lt;/span&gt;&amp;lt;&lt;span style="COLOR: blue"&gt;int&lt;/span&gt;, &lt;span style="COLOR: blue"&gt;string&lt;/span&gt;&amp;gt;();&lt;/span&gt;&lt;/div&gt;
&lt;div style="MARGIN: 0cm 0cm 10pt 36pt"&gt;&lt;span style="FONT-SIZE: 10pt"&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt"&gt;dictionary.Add(0, &lt;span style="COLOR: #a31515"&gt;"hello 0"&lt;/span&gt;);&lt;/span&gt;&lt;/div&gt;
&lt;div style="MARGIN: 0cm 0cm 10pt 36pt"&gt;&lt;span style="FONT-SIZE: 10pt"&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt"&gt;dictionary.Add(1, &lt;span style="COLOR: #a31515"&gt;"hello 1"&lt;/span&gt;);&lt;/span&gt;&lt;/div&gt;
&lt;div style="MARGIN: 0cm 0cm 10pt 36pt"&gt;&lt;span style="FONT-SIZE: 10pt"&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt"&gt;dictionary.Add(2, &lt;span style="COLOR: #a31515"&gt;"hello 2"&lt;/span&gt;);&lt;/span&gt;&lt;/div&gt;
&lt;div style="MARGIN: 0cm 0cm 10pt 36pt"&gt;&lt;span style="FONT-SIZE: 10pt"&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt"&gt;dictionary.Add(3, &lt;span style="COLOR: #a31515"&gt;"hello 3"&lt;/span&gt;);&lt;/span&gt;&lt;/div&gt;
&lt;div style="MARGIN: 0cm 0cm 10pt 36pt"&gt;&lt;span style="FONT-SIZE: 10pt"&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt"&gt;dictionary.Add(4, &lt;span style="COLOR: #a31515"&gt;"hello 4"&lt;/span&gt;);&lt;/span&gt;&lt;/div&gt;
&lt;div style="MARGIN: 0cm 0cm 10pt 36pt"&gt;&lt;span style="FONT-SIZE: 10pt"&gt;&lt;/span&gt;&lt;span style="LINE-HEIGHT: 115%; COLOR: blue; FONT-SIZE: 10pt"&gt;string&lt;/span&gt;&lt;span style="LINE-HEIGHT: 115%; FONT-SIZE: 10pt"&gt; found = dictionary.FindOrCreate(10, GenerateNextStringFactory);&lt;/span&gt;&lt;/div&gt;
&lt;div style="MARGIN: 0cm 0cm 0pt 36pt"&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;/div&gt;
&lt;div style="TEXT-INDENT: -18pt; MARGIN: 0cm 0cm 0pt 36pt"&gt;&lt;font size="2"&gt;&lt;span&gt;4)&lt;span style="FONT: 7pt &amp;quot;Times New Roman&amp;quot;"&gt;      &lt;/span&gt;&lt;/span&gt;Do you know what &lt;strong&gt;Code Contracts&lt;/strong&gt; are? I know you can download it for 3.5 and VS2008 and that it comes standard with VS2010 and .NET 4.0, but let’s say we don’t know. Tired of that “2 liner” you use all the time while doing your defensive programming when testing all your method parameters for null values? And what about those string parameters where you have to do a bunch of “if” to know whether the value was null or empty? Here’s the solution, have each variable call the following which will throw the &lt;span style="LINE-HEIGHT: 115%; COLOR: #2b91af; FONT-SIZE: 10pt"&gt;ArgumentNullException&lt;/span&gt;:&lt;/font&gt;&lt;/div&gt;
&lt;div style="MARGIN: 0cm 0cm 0pt 36pt"&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;/div&gt;
&lt;div style="MARGIN: 0cm 0cm 0pt 36pt"&gt;&lt;span style="LINE-HEIGHT: 115%; FONT-SIZE: 10pt"&gt;methodVariable.Validation().NotNull(&lt;span style="COLOR: #a31515"&gt;"methodVariable"&lt;/span&gt;)&lt;/span&gt;&lt;/div&gt;
&lt;div style="MARGIN: 0cm 0cm 0pt 36pt"&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;/div&gt;
&lt;div style="MARGIN: 0cm 0cm 0pt 36pt"&gt;&lt;em&gt;&lt;font size="2"&gt;I wonder if they could not have made it even easier for us and reflected the parameter name instead of forcing us to pass it as an argument?&lt;/font&gt;&lt;/em&gt;&lt;/div&gt;
&lt;div style="MARGIN: 0cm 0cm 0pt 36pt"&gt;&lt;font size="2"&gt;  &lt;/font&gt;&lt;/div&gt;
&lt;div style="MARGIN: 0cm 0cm 0pt 36pt"&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;/div&gt;
&lt;div style="MARGIN: 0cm 0cm 0pt 36pt"&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;/div&gt;
&lt;div style="TEXT-INDENT: -18pt; MARGIN: 0cm 0cm 10pt 36pt"&gt;&lt;font size="2"&gt;&lt;span&gt;5)&lt;span style="FONT: 7pt &amp;quot;Times New Roman&amp;quot;"&gt;      &lt;/span&gt;&lt;/span&gt;If you want to dive into serialisation and don’t want to mess with Formatters and Streams then Umbrella is for you.&lt;span&gt;   Here’s an example of how simple it is to serialize stuff with these extensions. Also, a few weeks ago I blogged about &lt;a href="http://geekswithblogs.net/vincentgrondin/archive/2009/10/11/iserialize-do-you.aspx"&gt;custom serialization&lt;/a&gt; and gave you my personal helper class to help you serialize stuff. I also said there was no way to create extension methods based on [Serializable] attribute... I still believe it’s the case but when I saw Umbrella’s implementation using extension methods, I wondered, why simply try to serialize classes that are tagged as serializable? Now I see there’s nothing wrong in having every possible class in the framework being able to serialize itself. Worst case scenario, you get an exception when you call the method on something that’s not tagged as [Serializable]. Isn’t that exactly the desired behaviour?  &lt;img alt="" src="/Providers/BlogEntryEditor/FCKeditor/editor/images/smiley/msn/regular_smile.gif" /&gt; &lt;/span&gt; There’s the code...&lt;/font&gt;&lt;/div&gt;
&lt;div style="MARGIN: 0cm 0cm 10pt 35.4pt"&gt;&lt;span style="LINE-HEIGHT: 115%; FONT-SIZE: 10pt"&gt;variableName.Serialization().Xml(&lt;span style="COLOR: #a31515"&gt;"c:\\myclass"&lt;/span&gt;);&lt;/span&gt;&lt;/div&gt;
&lt;div style="MARGIN: 0cm 0cm 10pt 35.4pt"&gt;&lt;span style="LINE-HEIGHT: 115%; FONT-SIZE: 10pt"&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="MARGIN: 0cm 0cm 10pt 35.4pt"&gt;&lt;span style="LINE-HEIGHT: 115%; FONT-SIZE: 10pt"&gt;&lt;/span&gt;&lt;font size="2"&gt;All these goodies come from a single namespace. So all you have to do in your code is add a reference to the Umbrella DLL (or add the project straight to your solution, remember it's open source) and add the following namespace to your code:&lt;/font&gt;&lt;/div&gt;
&lt;div style="MARGIN: 0cm 0cm 10pt 35.4pt"&gt;&lt;span style="LINE-HEIGHT: 115%; FONT-SIZE: 10pt"&gt;&lt;strong&gt;nVentive.Umbrella.Extensions&lt;/strong&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="MARGIN: 0cm 0cm 10pt 35.4pt"&gt;&lt;span style="LINE-HEIGHT: 115%; FONT-SIZE: 10pt"&gt;&lt;/span&gt;&lt;font size="2"&gt;If you download the code and check out how it’s made, you’ll learn a great deal and won’t get lost in exploring the solution. They’ve put everything in the same namespace for us, the programmers, so we don’t have to bother searching for the right namespace to use but they didn’t put all the code at the root of their solution. Everything is well organized even if the directory structure doesn’t match the namespace. Just remember it’s intentional and better that way. &lt;/font&gt;&lt;/div&gt;
&lt;div style="MARGIN: 0cm 0cm 10pt 35.4pt"&gt;&lt;font size="2"&gt;I hope I gave you enough information to have you download the code and explore it inside your current projects.  I’m just starting to play with this set of tool but from what I can see there’s great benefits in having your programmers code more of your business needs and less of the traditional plumbing. I would also suggest reading a little bit on &lt;em&gt;Extension Points&lt;/em&gt; therefore I’m referring you to a post from &lt;/font&gt;&lt;a href="http://blog.decarufel.net/2009/02/extension-methods-series-extension.html"&gt;&lt;font size="2"&gt;Éric De Carufel&lt;/font&gt;&lt;/a&gt;&lt;font size="2"&gt;, one of the contributors on the Umbrella Project in &lt;/font&gt;&lt;a href="http://www.codeplex.com/"&gt;&lt;font size="2"&gt;CodePlex&lt;/font&gt;&lt;/a&gt;&lt;font size="2"&gt;.&lt;/font&gt;&lt;/div&gt;
&lt;div style="MARGIN: 0cm 0cm 10pt 35.4pt"&gt;&lt;/div&gt;
&lt;div style="MARGIN: 0cm 0cm 10pt 35.4pt"&gt;&lt;font size="2"&gt;Happy coding and exploring!&lt;/font&gt;&lt;/div&gt;&lt;img src="http://geekswithblogs.net/vincentgrondin/aggbug/135782.aspx" width="1" height="1" /&gt;</content>
        <wfw:comment>http://geekswithblogs.net/vincentgrondin/comments/135782.aspx</wfw:comment>
        <slash:comments>0</slash:comments>
        <wfw:commentRss>http://geekswithblogs.net/vincentgrondin/comments/commentRss/135782.aspx</wfw:commentRss>
        <trackback:ping>http://geekswithblogs.net/vincentgrondin/services/trackbacks/135782.aspx</trackback:ping>
    </entry>
    <entry>
        <title>How ISerializable are you?</title>
        <link rel="self" type="text/html" href="http://geekswithblogs.net/vincentgrondin/archive/2009/10/11/iserialize-do-you.aspx" />
        <id>http://geekswithblogs.net/vincentgrondin/archive/2009/10/11/iserialize-do-you.aspx</id>
        <published>2009-10-11T15:56:38-04:00:00</published>
        <updated>2009-10-11T16:06:03Z</updated>
        <content type="html">&lt;div style="MARGIN: 0cm 0cm 10pt"&gt;&lt;/div&gt;
&lt;div style="MARGIN: 0cm 0cm 10pt"&gt;&lt;/div&gt;
&lt;div style="MARGIN: 0cm 0cm 10pt"&gt;Serialization is a beautiful thing. Now that was a geeky comment.... Jokes aside, it is. Standard .NET serialization is quite simple. Tag your class with the [Serializable()] attribute, make sure all your state variables are serializable and voila. But what if some of these variables aren’t serializable? Then you simply need to tag those variables as [NonSerializable()] and then you are really done. Of course I could get into the details of all this but this post isn’t about standard .NET serialization.&lt;/div&gt;
&lt;div style="MARGIN: 0cm 0cm 10pt"&gt;Custom serialization on the other hand is a little bit trickier. Not only do you have to go through all the same process as standard .NET serialization but,  since your class or a class in your class hierarchy implemented ISerializable, now you got to do even more stuff just to get your states to travel from point A to point B....  So here’s the procedure to get it to work:&lt;/div&gt;
&lt;div style="TEXT-INDENT: -18pt; MARGIN: 0cm 0cm 0pt 53.25pt"&gt;&lt;span&gt;1)&lt;span style="FONT: 7pt &amp;quot;Times New Roman&amp;quot;"&gt;      &lt;/span&gt;&lt;/span&gt;Do you have states (variables) in &lt;strong&gt;your&lt;/strong&gt; class? If not, then go to step 4 and you’re almost done... Lucky you! Each class in the class hierarchy is responsible for managing its states and you should not take care of the state variables of your base classes. Mind your own business :)&lt;/div&gt;
&lt;div style="TEXT-INDENT: -18pt; MARGIN: 0cm 0cm 0pt 53.25pt"&gt;&lt;br /&gt;
 &lt;/div&gt;
&lt;div style="TEXT-INDENT: -18pt; MARGIN: 0cm 0cm 0pt 53.25pt"&gt;&lt;span&gt;2)&lt;span style="FONT: 7pt &amp;quot;Times New Roman&amp;quot;"&gt;      &lt;/span&gt;&lt;/span&gt;Override &lt;strong&gt;GetObjectData&lt;/strong&gt; and call the base method inside there... I personally prefer calling it on entering the method.&lt;/div&gt;
&lt;div style="MARGIN: 0cm 0cm 0pt 53.25pt"&gt; &lt;/div&gt;
&lt;div style="MARGIN: 0cm 0cm 0pt 53.25pt"&gt; &lt;/div&gt;
&lt;div style="TEXT-INDENT: -18pt; MARGIN: 0cm 0cm 10pt 53.25pt"&gt;&lt;span&gt;3)&lt;span style="FONT: 7pt &amp;quot;Times New Roman&amp;quot;"&gt;      &lt;/span&gt;&lt;/span&gt;Inside the &lt;strong&gt;GetObjectData&lt;/strong&gt; method, you need to “store” the states that you want to transfer from point A to point B. You do this by adding entries to the variable named “info”. This variable is passed to &lt;strong&gt;GetObjectData&lt;/strong&gt; by the CLR. Parameter “info” is of type “SerializationInfo” and resembles a “NameValueCollection” in its usage. Simply call “info.AddValue” with the overload of your choice to add each state variable of the class you want to serialize and it will be added to the serialization process. You can imagine this operation was like telling the CLR which states of your class needed to be serialized. Your code should look like the following:&lt;/div&gt;
&lt;div style="LINE-HEIGHT: normal; MARGIN: 0cm 0cm 0pt 70.65pt"&gt;&lt;span style="COLOR: blue; FONT-SIZE: 10pt"&gt;&lt;/span&gt; &lt;/div&gt;
&lt;div style="LINE-HEIGHT: normal; MARGIN: 0cm 0cm 0pt 70.65pt"&gt;&lt;span style="COLOR: blue; FONT-SIZE: 10pt"&gt;public&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt"&gt; &lt;span style="COLOR: blue"&gt;override&lt;/span&gt; &lt;span style="COLOR: blue"&gt;void&lt;/span&gt; GetObjectData(&lt;span style="COLOR: #2b91af"&gt;SerializationInfo&lt;/span&gt; info, &lt;span style="COLOR: #2b91af"&gt;StreamingContext&lt;/span&gt; context)&lt;/span&gt;&lt;/div&gt;
&lt;div style="LINE-HEIGHT: normal"&gt;&lt;span style="FONT-SIZE: 10pt"&gt;                       {&lt;/span&gt;&lt;/div&gt;
&lt;div style="LINE-HEIGHT: normal"&gt;&lt;span style="FONT-SIZE: 10pt"&gt;                             &lt;span style="COLOR: blue"&gt;base&lt;/span&gt;.GetObjectData(info, context);&lt;/span&gt;&lt;/div&gt;
&lt;div style="LINE-HEIGHT: normal"&gt; &lt;/div&gt;
&lt;div style="LINE-HEIGHT: normal"&gt;&lt;span style="FONT-SIZE: 10pt"&gt;                             info.AddValue(&lt;span style="COLOR: #a31515"&gt;"currentUser"&lt;/span&gt;, &lt;span style="COLOR: blue"&gt;this&lt;/span&gt;.currentUser);&lt;/span&gt;&lt;/div&gt;
&lt;div style="LINE-HEIGHT: normal"&gt;&lt;span style="FONT-SIZE: 10pt"&gt;                             info.AddValue(&lt;span style="COLOR: #a31515"&gt;"runningAs"&lt;/span&gt;, &lt;span style="COLOR: blue"&gt;this&lt;/span&gt;.runningAs);&lt;/span&gt;&lt;/div&gt;
&lt;div style="MARGIN: 0cm 0cm 0pt 53.25pt"&gt;&lt;span style="LINE-HEIGHT: 115%; FONT-SIZE: 10pt"&gt;     &lt;/span&gt;&lt;span style="LINE-HEIGHT: 115%; FONT-SIZE: 10pt"&gt;}&lt;/span&gt;&lt;/div&gt;
&lt;div style="MARGIN: 0cm 0cm 0pt 53.25pt"&gt;  &lt;/div&gt;
&lt;div style="MARGIN: 0cm 0cm 0pt 53.25pt"&gt; &lt;/div&gt;
&lt;div style="TEXT-INDENT: -18pt; MARGIN: 0cm 0cm 0pt 53.25pt"&gt;&lt;span&gt;4)&lt;span style="FONT: 7pt &amp;quot;Times New Roman&amp;quot;"&gt;      &lt;/span&gt;&lt;/span&gt;Now that the CLR knows what to serialize, it needs to know what to do on the other end of the process, once it reaches point B...&lt;span&gt;   We have to tell him how to reconstruct your class’s states. Remember it’s not the class itself that was sent on the wire, it was only its states. On the other side of the wire, the CLR will create a NEW class of the same type as yours and you need to tell him which states goes to which variable. In .NET we do not inherit constructors from our base classes, we need to redefine them. In our case, one very important constructor needs to be redefined and also needs to call his matching constructor (chaining) in the base class. Its signature is the following:&lt;/span&gt;&lt;/div&gt;
&lt;div style="MARGIN: 0cm 0cm 0pt 53.25pt"&gt; &lt;/div&gt;
&lt;div style="MARGIN: 0cm 0cm 10pt 70.8pt"&gt;&lt;span style="LINE-HEIGHT: 115%; COLOR: blue; FONT-SIZE: 10pt"&gt;protected&lt;/span&gt;&lt;span style="LINE-HEIGHT: 115%; FONT-SIZE: 10pt"&gt; MyClass(&lt;span style="COLOR: #2b91af"&gt;SerializationInfo&lt;/span&gt; info, &lt;span style="COLOR: #2b91af"&gt;StreamingContext&lt;/span&gt; context) : &lt;span style="COLOR: blue"&gt;base&lt;/span&gt;(info, context)&lt;/span&gt;&lt;/div&gt;
&lt;div style="MARGIN: 0cm 0cm 10pt 53.25pt"&gt;You should definitely keep the “protected” modifier in place. Why? Well, because this constructor is not meant to be called by you except when you call it from a base class. This constructor is reserved for the CLR to use and only it has all the information needed to inject the right thing at the right place once we’re at point B.&lt;/div&gt;
&lt;div style="MARGIN: 0cm 0cm 10pt 53.25pt"&gt;&lt;/div&gt;
&lt;div style="TEXT-INDENT: -18pt; MARGIN: 0cm 0cm 0pt 53.25pt"&gt;&lt;span&gt;5)&lt;span style="FONT: 7pt &amp;quot;Times New Roman&amp;quot;"&gt;      &lt;/span&gt;&lt;/span&gt;Once the constructor redefined and its matching base class constructor called, take a closer look at the first parameter of the constructor...&lt;span&gt;   The CLR will inject the “info” variable into the constructor. This variable contains all the states you and your base classes added to it a few moments earlier on the original instance when the CLR called &lt;strong&gt;GetObjectData&lt;/strong&gt; prior to serializing the class at point A. Then you can simply transfer each value from the “info” variable back to the state variable that holds it in the new instance of the class.  It should look something like this:&lt;/span&gt;&lt;/div&gt;
&lt;div style="LINE-HEIGHT: normal; MARGIN: 0cm 0cm 0pt 53.25pt"&gt;&lt;/div&gt;
&lt;div style="LINE-HEIGHT: normal; MARGIN: 0cm 0cm 0pt 53.25pt"&gt; &lt;/div&gt;
&lt;div style="LINE-HEIGHT: normal; MARGIN: 0cm 0cm 0pt 53.25pt"&gt;&lt;span style="COLOR: blue; FONT-SIZE: 10pt"&gt;protected&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt"&gt; MyClass(&lt;span style="COLOR: #2b91af"&gt;SerializationInfo&lt;/span&gt; info, &lt;span style="COLOR: #2b91af"&gt;StreamingContext&lt;/span&gt; context) : &lt;span style="COLOR: blue"&gt;base&lt;/span&gt;(info, context)&lt;/span&gt;&lt;/div&gt;
&lt;div style="LINE-HEIGHT: normal; MARGIN: 0cm 0cm 0pt 53.25pt"&gt;&lt;span style="FONT-SIZE: 10pt"&gt;{&lt;/span&gt;&lt;/div&gt;
&lt;div style="LINE-HEIGHT: normal"&gt;&lt;span style="FONT-SIZE: 10pt"&gt;                          &lt;span style="COLOR: blue"&gt;this&lt;/span&gt;.currentUser = info.GetString(&lt;span style="COLOR: #a31515"&gt;"currentUser"&lt;/span&gt;);&lt;/span&gt;&lt;/div&gt;
&lt;div style="LINE-HEIGHT: normal; MARGIN: 0cm 0cm 0pt 53.25pt"&gt;&lt;span style="FONT-SIZE: 10pt"&gt;        &lt;span style="COLOR: blue"&gt;this&lt;/span&gt;.runningAs = info.GetString(&lt;span style="COLOR: #a31515"&gt;"runningAs"&lt;/span&gt;);&lt;/span&gt;&lt;/div&gt;
&lt;div style="MARGIN: 0cm 0cm 0pt 53.25pt"&gt;&lt;span style="LINE-HEIGHT: 115%; FONT-SIZE: 10pt"&gt;}&lt;/span&gt;&lt;/div&gt;
&lt;div style="MARGIN: 0cm 0cm 0pt 53.25pt"&gt;&lt;/div&gt;
&lt;div style="MARGIN: 0cm 0cm 0pt 53.25pt"&gt; &lt;/div&gt;
&lt;div style="TEXT-INDENT: -18pt; MARGIN: 0cm 0cm 0pt 53.25pt"&gt;&lt;span&gt;6)&lt;span style="FONT: 7pt &amp;quot;Times New Roman&amp;quot;"&gt;      &lt;/span&gt;&lt;/span&gt;This step is the most important step of all. Test your serialization!!!! I’ve build a nice little helper class for this and I’ll give it to you all so that you have no more excuses not to test your serialization prior to going live. Those of you who know me are already thinking “whaaaat? Normally this guy hates helper classes so why not use an extension method instead?”. Alright but to extend which type? ISerializable? Sure, then you can use it on some classes but not all classes because you cannot define an extension method based on metadata like the [Serializable()] attribute. It would have been nice tho &lt;span&gt;J&lt;/span&gt;. So use the helper to serialize and deserialize a class instance and compare ALL states one by one. This is best done in a unit test by the way. You would be sure to test all your class serializations in every build of your product. In the helper, call “TestObjectSerialisation” and catch the returned object. This method serializes the instance of the class you give it and then deserializes it in memory prior to returning it to you, ready to be compared to the original instance. &lt;/div&gt;
&lt;div style="MARGIN: 0cm 0cm 0pt 53.25pt"&gt;&lt;/div&gt;
&lt;div style="MARGIN: 0cm 0cm 0pt 53.25pt"&gt;&lt;br /&gt;
 &lt;a href="http://cid-bdf9cf467011e705.skydrive.live.com/self.aspx/.Public/SerializationHelper.cs"&gt;cid-bdf9cf467011e705.skydrive.live.com/self.aspx/.Public/SerializationHelper.cs&lt;/a&gt;&lt;/div&gt;
&lt;div style="MARGIN: 0cm 0cm 0pt 53.25pt"&gt;  &lt;/div&gt;
&lt;div style="MARGIN: 0cm 0cm 0pt 53.25pt"&gt;&lt;/div&gt;
&lt;div style="MARGIN: 0cm 0cm 0pt 53.25pt"&gt;&lt;/div&gt;
&lt;div style="MARGIN: 0cm 0cm 10pt 53.25pt"&gt;I hope this post helped you understand the basics of how implementing ISerializable works and what needs to be done when you do so. For your information, one very common place where you need to do this is when you create your custom exceptions.  The type "Exception" implements ISerializable...  Happy coding !&lt;/div&gt;
&lt;div style="MARGIN: 0cm 0cm 10pt"&gt; &lt;/div&gt;&lt;img src="http://geekswithblogs.net/vincentgrondin/aggbug/135401.aspx" width="1" height="1" /&gt;</content>
        <wfw:comment>http://geekswithblogs.net/vincentgrondin/comments/135401.aspx</wfw:comment>
        <slash:comments>4</slash:comments>
        <wfw:commentRss>http://geekswithblogs.net/vincentgrondin/comments/commentRss/135401.aspx</wfw:commentRss>
        <trackback:ping>http://geekswithblogs.net/vincentgrondin/services/trackbacks/135401.aspx</trackback:ping>
    </entry>
    <entry>
        <title>Presentation at Montreal's .NET Community</title>
        <link rel="self" type="text/html" href="http://geekswithblogs.net/vincentgrondin/archive/2009/10/10/presentation-at-montreals-.net-community.aspx" />
        <id>http://geekswithblogs.net/vincentgrondin/archive/2009/10/10/presentation-at-montreals-.net-community.aspx</id>
        <published>2009-10-10T19:27:52-04:00:00</published>
        <updated>2009-10-11T10:19:04Z</updated>
        <content type="html">&lt;p&gt;Last monday (oct 5th) I gave a presentation for the Montreal .NET Community.  There where two subjects, the first one was called "watch your stack traces!!" and the second was  "Can you speak modern .NET?".&lt;/p&gt;
&lt;p&gt;In case someone from the presentation wants the code I prensented, (sorry all comments are in french) I'm seriously searching a way to get this zip file up here somewhere...   Until then you can reach  me at     vgrondin    @    hotmail    dot   com      and I'll be glad to sent it to you.&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;Thanks for the how to D'Arcy Lussier !!!&lt;/p&gt;
&lt;p&gt;Here's the link to the download !&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;&lt;font face=""&gt;&lt;a href="http://cid-bdf9cf467011e705.skydrive.live.com/self.aspx/.Public/GUVSM%20-%205%20Oct%202009.zip"&gt;http://cid-bdf9cf467011e705.skydrive.live.com/self.aspx/.Public/GUVSM%20-%205%20Oct%202009.zip&lt;/a&gt;&lt;/font&gt;&lt;/p&gt;&lt;img src="http://geekswithblogs.net/vincentgrondin/aggbug/135396.aspx" width="1" height="1" /&gt;</content>
        <wfw:comment>http://geekswithblogs.net/vincentgrondin/comments/135396.aspx</wfw:comment>
        <slash:comments>0</slash:comments>
        <wfw:commentRss>http://geekswithblogs.net/vincentgrondin/comments/commentRss/135396.aspx</wfw:commentRss>
        <trackback:ping>http://geekswithblogs.net/vincentgrondin/services/trackbacks/135396.aspx</trackback:ping>
    </entry>
    <entry>
        <title>Team Build 2008 and Satellite Assemblies</title>
        <link rel="self" type="text/html" href="http://geekswithblogs.net/vincentgrondin/archive/2009/09/05/team-build-2008-and-satellite-assemblies.aspx" />
        <id>http://geekswithblogs.net/vincentgrondin/archive/2009/09/05/team-build-2008-and-satellite-assemblies.aspx</id>
        <published>2009-09-05T21:21:12-04:00:00</published>
        <updated>2009-09-05T21:21:59Z</updated>
        <content type="html">&lt;p&gt;&lt;span style="mso-ansi-language: EN-CA" lang="EN-CA"&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="mso-ansi-language: EN-CA" lang="EN-CA"&gt;Running unit tests after a successful build with Team Build 2008 can be a tricky thing....&lt;span style="mso-spacerun: yes"&gt;  &lt;/span&gt;especially when you test your localization using satellite assemblies.&lt;span style="mso-spacerun: yes"&gt;  &lt;/span&gt;Out of the box this cannot be done in Team Build 2008, you need to tweak some files to get it to work properly, but which ones??!!&lt;span style="mso-spacerun: yes"&gt;  &lt;/span&gt;This article should help you solve similar problems in your build environment.&lt;span style="mso-spacerun: yes"&gt;  &lt;/span&gt;I had this problem where all localization tests would work on my developer’s workstations but would systematically fail on the build server...&lt;span style="mso-spacerun: yes"&gt;  &lt;/span&gt;and I could see why!&lt;span style="mso-spacerun: yes"&gt;  &lt;/span&gt;The localization folder (like “en-CA” for instance) was not copied to the “Out” directory structure of Team Build 2008!!&lt;span style="mso-spacerun: yes"&gt;  &lt;/span&gt;Here’s the work around...&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt; &lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span style="mso-ansi-language: EN-CA" lang="EN-CA"&gt;The first thing I was confronted to when trying to run my unit tests with Team Build 2008 is that it would not use my “.testrunconfig” file that Visual Studio 2008 uses when running my unit tests locally.&lt;span style="mso-spacerun: yes"&gt;  &lt;/span&gt;How awkward?&lt;span style="mso-spacerun: yes"&gt;  &lt;/span&gt;My teammate and I started looking for answers on the web and he found out we needed to “tell” Team Build 2008 we wanted to use a different test configuration file than the default one.&lt;span style="mso-spacerun: yes"&gt;  &lt;/span&gt;I’m glad you found that one Robert.&lt;span style="mso-spacerun: yes"&gt;  &lt;/span&gt;This can be done by editing the “.proj” file of your solution under source control.&lt;span style="mso-spacerun: yes"&gt;  &lt;/span&gt;In your Visual Studio 2008, in the team explorer tree, double click on the “Source Control” item.&lt;span style="mso-spacerun: yes"&gt;  &lt;/span&gt;This should send you to the root of your solution in TFS 2008.&lt;span style="mso-spacerun: yes"&gt;  &lt;/span&gt;Then you need to locate the “.proj” file that you probably created a while back when creating the build definition for your project.&lt;span style="mso-spacerun: yes"&gt;  &lt;/span&gt;By default, this file resides in :&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span style="mso-ansi-language: EN-CA" lang="EN-CA"&gt;&lt;span style="mso-spacerun: yes"&gt; &lt;/span&gt;“YourTFSTeamProjectName\TeamBuildTypes\YourBuildDefinitonName”&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span style="mso-ansi-language: EN-CA" lang="EN-CA"&gt;and is called “TFSBuild.proj”.&lt;span style="mso-spacerun: yes"&gt;  &lt;/span&gt;This is an XML file (MSBuild) used by Team Build 2008 to perform your build.&lt;span style="mso-spacerun: yes"&gt;  &lt;/span&gt;Open the file in your XML editor and locate the “PropertyGroup” node.&lt;span style="mso-spacerun: yes"&gt;  &lt;/span&gt;Inside this node, add the following node “&lt;/span&gt;&lt;span style="LINE-HEIGHT: 115%; FONT-FAMILY: &amp;quot;Courier New&amp;quot;; COLOR: blue; FONT-SIZE: 10pt; mso-ansi-language: EN-CA; mso-no-proof: yes" lang="EN-CA"&gt;&amp;lt;&lt;/span&gt;&lt;span style="LINE-HEIGHT: 115%; FONT-FAMILY: &amp;quot;Courier New&amp;quot;; COLOR: #a31515; FONT-SIZE: 10pt; mso-ansi-language: EN-CA; mso-no-proof: yes" lang="EN-CA"&gt;RunConfigFile&lt;/span&gt;&lt;span style="LINE-HEIGHT: 115%; FONT-FAMILY: &amp;quot;Courier New&amp;quot;; COLOR: blue; FONT-SIZE: 10pt; mso-ansi-language: EN-CA; mso-no-proof: yes" lang="EN-CA"&gt;&amp;gt; &amp;lt;/&lt;/span&gt;&lt;span style="LINE-HEIGHT: 115%; FONT-FAMILY: &amp;quot;Courier New&amp;quot;; COLOR: #a31515; FONT-SIZE: 10pt; mso-ansi-language: EN-CA; mso-no-proof: yes" lang="EN-CA"&gt;RunConfigFile&lt;/span&gt;&lt;span style="LINE-HEIGHT: 115%; FONT-FAMILY: &amp;quot;Courier New&amp;quot;; COLOR: blue; FONT-SIZE: 10pt; mso-ansi-language: EN-CA; mso-no-proof: yes" lang="EN-CA"&gt;&amp;gt;”.&lt;/span&gt;&lt;span style="mso-ansi-language: EN-CA" lang="EN-CA"&gt;&lt;span style="mso-spacerun: yes"&gt;  &lt;/span&gt;Inside this node you need to point to the location in your source control where the “.testrunconfig” file can be found.&lt;span style="mso-spacerun: yes"&gt;  &lt;/span&gt;Use the &lt;/span&gt;&lt;span style="LINE-HEIGHT: 115%; FONT-FAMILY: &amp;quot;Courier New&amp;quot;; FONT-SIZE: 10pt; mso-ansi-language: EN-CA; mso-no-proof: yes" lang="EN-CA"&gt;$(SolutionRoot) &lt;/span&gt;&lt;span style="mso-ansi-language: EN-CA" lang="EN-CA"&gt;tag and then add your folder like this:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span style="mso-ansi-language: EN-CA" lang="EN-CA"&gt;&lt;span style="mso-spacerun: yes"&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style="LINE-HEIGHT: 115%; FONT-FAMILY: &amp;quot;Courier New&amp;quot;; FONT-SIZE: 10pt; mso-ansi-language: EN-CA; mso-no-proof: yes" lang="EN-CA"&gt;$(SolutionRoot)\YourFolder\YourTestConfigFileName.testrunconfig&lt;/span&gt;&lt;span style="mso-ansi-language: EN-CA" lang="EN-CA"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span style="mso-ansi-language: EN-CA" lang="EN-CA"&gt;Alright, but we’re not done yet.&lt;span style="mso-spacerun: yes"&gt;  &lt;/span&gt;What you just did is tell Team Build 2008 what file to use for the build on the server but you still need to tell him to copy your satellite assemblies, remember?&lt;span style="mso-spacerun: yes"&gt;  &lt;/span&gt;Open your “.testrunconfig” file in an XML editor.&lt;span style="mso-spacerun: yes"&gt;  &lt;/span&gt;Inside the “TestRunConfiguration” node, locate the “Deployment” node or add one if there is none.&lt;span style="mso-spacerun: yes"&gt;  &lt;/span&gt;Inside this node, add the “DeploymentItem” node and fill the “filename” and “outputDirectory” parameters of the node.&lt;span style="mso-spacerun: yes"&gt;  &lt;/span&gt;Here’s what my “Deployment” node looks like for deploying resources in the “English – Canada” locale:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="LINE-HEIGHT: normal; MARGIN-BOTTOM: 0pt; mso-layout-grid-align: none" class="MsoNormal"&gt;&lt;span style="FONT-FAMILY: &amp;quot;Courier New&amp;quot;; COLOR: blue; FONT-SIZE: 10pt; mso-ansi-language: EN-CA; mso-no-proof: yes" lang="EN-CA"&gt;&amp;lt;&lt;/span&gt;&lt;span style="FONT-FAMILY: &amp;quot;Courier New&amp;quot;; COLOR: #a31515; FONT-SIZE: 10pt; mso-ansi-language: EN-CA; mso-no-proof: yes" lang="EN-CA"&gt;Deployment&lt;/span&gt;&lt;span style="FONT-FAMILY: &amp;quot;Courier New&amp;quot;; COLOR: blue; FONT-SIZE: 10pt; mso-ansi-language: EN-CA; mso-no-proof: yes" lang="EN-CA"&gt;&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="LINE-HEIGHT: normal; MARGIN-BOTTOM: 0pt; mso-layout-grid-align: none" class="MsoNormal"&gt;&lt;span style="FONT-FAMILY: &amp;quot;Courier New&amp;quot;; COLOR: blue; FONT-SIZE: 10pt; mso-ansi-language: EN-CA; mso-no-proof: yes" lang="EN-CA"&gt;&lt;span style="mso-spacerun: yes"&gt;    &lt;/span&gt;&amp;lt;&lt;/span&gt;&lt;span style="FONT-FAMILY: &amp;quot;Courier New&amp;quot;; COLOR: #a31515; FONT-SIZE: 10pt; mso-ansi-language: EN-CA; mso-no-proof: yes" lang="EN-CA"&gt;DeploymentItem&lt;/span&gt;&lt;span style="FONT-FAMILY: &amp;quot;Courier New&amp;quot;; COLOR: blue; FONT-SIZE: 10pt; mso-ansi-language: EN-CA; mso-no-proof: yes" lang="EN-CA"&gt; &lt;/span&gt;&lt;span style="FONT-FAMILY: &amp;quot;Courier New&amp;quot;; COLOR: red; FONT-SIZE: 10pt; mso-ansi-language: EN-CA; mso-no-proof: yes" lang="EN-CA"&gt;filename&lt;/span&gt;&lt;span style="FONT-FAMILY: &amp;quot;Courier New&amp;quot;; COLOR: blue; FONT-SIZE: 10pt; mso-ansi-language: EN-CA; mso-no-proof: yes" lang="EN-CA"&gt;=&lt;/span&gt;&lt;span style="FONT-FAMILY: &amp;quot;Courier New&amp;quot;; FONT-SIZE: 10pt; mso-ansi-language: EN-CA; mso-no-proof: yes" lang="EN-CA"&gt;"&lt;span style="COLOR: blue"&gt;en-CA&lt;/span&gt;"&lt;span style="COLOR: blue"&gt; &lt;/span&gt;&lt;span style="COLOR: red"&gt;outputDirectory&lt;/span&gt;&lt;span style="COLOR: blue"&gt;=&lt;/span&gt;"&lt;span style="COLOR: blue"&gt;en-CA&lt;/span&gt;"&lt;span style="COLOR: blue"&gt; /&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span style="LINE-HEIGHT: 115%; FONT-FAMILY: &amp;quot;Courier New&amp;quot;; COLOR: blue; FONT-SIZE: 10pt; mso-ansi-language: EN-CA; mso-no-proof: yes" lang="EN-CA"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="LINE-HEIGHT: 115%; FONT-FAMILY: &amp;quot;Courier New&amp;quot;; COLOR: #a31515; FONT-SIZE: 10pt; mso-ansi-language: EN-CA; mso-no-proof: yes" lang="EN-CA"&gt;Deployment&lt;/span&gt;&lt;span style="LINE-HEIGHT: 115%; FONT-FAMILY: &amp;quot;Courier New&amp;quot;; COLOR: blue; FONT-SIZE: 10pt; mso-ansi-language: EN-CA; mso-no-proof: yes" lang="EN-CA"&gt;&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span style="mso-ansi-language: EN-CA" lang="EN-CA"&gt;Save the file and you’re done.&lt;span style="mso-spacerun: yes"&gt;  &lt;/span&gt;If you have trouble running this procedure, do not hesitate to reply or contact me I’ll be glad to help you out!&lt;span style="mso-spacerun: yes"&gt;  &lt;/span&gt;Happy TFS-ing all!&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;img src="http://geekswithblogs.net/vincentgrondin/aggbug/134523.aspx" width="1" height="1" /&gt;</content>
        <wfw:comment>http://geekswithblogs.net/vincentgrondin/comments/134523.aspx</wfw:comment>
        <slash:comments>0</slash:comments>
        <wfw:commentRss>http://geekswithblogs.net/vincentgrondin/comments/commentRss/134523.aspx</wfw:commentRss>
        <trackback:ping>http://geekswithblogs.net/vincentgrondin/services/trackbacks/134523.aspx</trackback:ping>
    </entry>
</feed>
