<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://imason.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Jim @ imason</title><link>http://imason.com/imason_Blogs/b/jim_schwartz/default.aspx</link><description>Internet Architect by day, environmentalist by night: Jim Schwartz @ imason.</description><dc:language>en</dc:language><generator>Telligent Evolution 5.0 (Build: 40623.6204)</generator><item><title>imason Stair Climb Challenge</title><link>http://imason.com/imason_Blogs/b/jim_schwartz/archive/2009/03/31/imason-stair-climb-challenge.aspx</link><pubDate>Tue, 31 Mar 2009 00:52:00 GMT</pubDate><guid isPermaLink="false">ba1d72eb-a51c-4157-8cec-718d26de3334:1137</guid><dc:creator>James Schwartz</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://imason.com/imason_Blogs/b/jim_schwartz/rsscomments.aspx?WeblogPostID=1137</wfw:commentRss><comments>http://imason.com/imason_Blogs/b/jim_schwartz/archive/2009/03/31/imason-stair-climb-challenge.aspx#comments</comments><description>&lt;p&gt;&lt;a href="http://www.imason.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/jim_5F00_schwartz/jordivayredaprojectteamstair_5F00_04D2AA2C.jpg"&gt;&lt;img title="jordivayreda-projectteam-stair" style="border:0pt none;display:inline;" alt="jordivayreda-projectteam-stair" src="http://www.imason.com/img/blogs/jordivayredaprojectteamstair_5F00_04D2AA2C.jpg" height="478" width="473" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;i&gt;Photo courtesy of &lt;/i&gt;&lt;a href="http://www.neatorama.com/2008/05/11/beautifully-dangerous-dangerously-beautiful-staircase-by-jordi-vayreda/"&gt;&lt;i&gt;Neatorama&lt;/i&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;2 weeks ago I had a seemingly crazy idea. I challenged my colleagues at imason in a contest to see who could last the longest without taking the elevator. Considering we&amp;rsquo;re on the 8th floor of our building, I figured there wouldn&amp;rsquo;t be a myriad of people lined up to enter the contest. &lt;/p&gt;
&lt;p&gt;Boy was I wrong.&lt;/p&gt;
&lt;p&gt;15 people entered the contest, and in the last 2 weeks, imason employees have walked up and down approximately 47,250 stairs. &lt;/p&gt;
&lt;p&gt;imason&amp;rsquo;s employees are so dedicated that some are even riding their bikes to work and carrying their bikes up 8 floors.&lt;/p&gt;
&lt;p&gt;Not only is this challenge good for the environment, but it&amp;rsquo;s also great for everybody&amp;rsquo;s health. I&amp;rsquo;ve long been an advocate for active, healthy living and I believe strongly in treating the earth well. This is one simple thing that we can do to help make a small difference.&lt;/p&gt;
&lt;p&gt;One thing I don&amp;rsquo;t know is how long this contest will last. But I can honestly say that I hope it continues for many months to come. &lt;/p&gt;
&lt;p&gt;I&amp;rsquo;m in it for the long haul.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://imason.com/aggbug.aspx?PostID=1137" width="1" height="1"&gt;</description><category domain="http://imason.com/imason_Blogs/b/jim_schwartz/archive/tags/atimason/default.aspx">atimason</category></item><item><title>Vista Service Pack?</title><link>http://imason.com/imason_Blogs/b/jim_schwartz/archive/2009/03/20/vista-service-pack.aspx</link><pubDate>Fri, 20 Mar 2009 21:17:00 GMT</pubDate><guid isPermaLink="false">ba1d72eb-a51c-4157-8cec-718d26de3334:1094</guid><dc:creator>James Schwartz</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://imason.com/imason_Blogs/b/jim_schwartz/rsscomments.aspx?WeblogPostID=1094</wfw:commentRss><comments>http://imason.com/imason_Blogs/b/jim_schwartz/archive/2009/03/20/vista-service-pack.aspx#comments</comments><description>&lt;p&gt;Could this be the latest Service Pack for Vista??&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.imason.com/img/blogs/IMG_5F00_0750_5F00_thumb_5F00_70C984F2.jpg"&gt;&lt;img title="IMG_0750" style="border:0pt none;display:inline;" alt="IMG_0750" src="http://www.imason.com/img/blogs/IMG_5F00_0750_5F00_thumb_5F00_70C984F2.jpg" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://imason.com/aggbug.aspx?PostID=1094" width="1" height="1"&gt;</description><category domain="http://imason.com/imason_Blogs/b/jim_schwartz/archive/tags/Humour/default.aspx">Humour</category></item><item><title>Rehydrating a State Machine Workflow</title><link>http://imason.com/imason_Blogs/b/jim_schwartz/archive/2009/03/06/rehydrating-a-state-machine-workflow.aspx</link><pubDate>Fri, 06 Mar 2009 21:30:00 GMT</pubDate><guid isPermaLink="false">ba1d72eb-a51c-4157-8cec-718d26de3334:427</guid><dc:creator>James Schwartz</dc:creator><slash:comments>3</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://imason.com/imason_Blogs/b/jim_schwartz/rsscomments.aspx?WeblogPostID=427</wfw:commentRss><comments>http://imason.com/imason_Blogs/b/jim_schwartz/archive/2009/03/06/rehydrating-a-state-machine-workflow.aspx#comments</comments><description>&lt;p&gt;At first glance, Windows Workflow does a good job of persisting workflows to the database for long-running State Machine Workflows.&lt;/p&gt;
&lt;p&gt;However, what happens when you update your workflow assembly? Windows Workflow will try to retrieve the workflow from the SQL Persistence store and de-serialize the object, but it will throw an exception (You&amp;rsquo;ll see a &lt;a href="http://msdn.microsoft.com/en-us/library/system.runtime.serialization.serializationexception.aspx"&gt;SerializationException&lt;/a&gt; or &lt;a href="http://msdn.microsoft.com/en-us/library/system.indexoutofrangeexception.aspx"&gt;IndexOutOfRangeException&lt;/a&gt;).&lt;/p&gt;
&lt;p&gt;There are different ways to handle this situation. The first (and most obvious way) is to set versions on your DLLs so that the workflow will de-serialize into a previous version of a workflow and continue running in the older version. But what if the change you made to the workflow fixes an important bug in the previous version? In this case, you may want&amp;nbsp; your previously persisted workflows to use the new version of the code.&lt;/p&gt;
&lt;p&gt;A few quick Google searches will lead you to a few different options in handling this situation:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Using an assembly resolver or using the &amp;ldquo;AppliesTo&amp;rdquo; attribute [1] &lt;/li&gt;
&lt;li&gt;Dynamic Workflows [2] &lt;/li&gt;
&lt;li&gt;Breaking up into smaller workflows [3] &lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;None of these options are particularly appealing to me, so I had to find a better way to handle updates to the workflow code but still allow my long-running workflows to operate.&lt;/p&gt;
&lt;p&gt;&lt;b&gt;&lt;span style="font-size:medium;"&gt;My &amp;ldquo;outside the box&amp;rdquo; solution: &lt;span style="text-decoration:underline;"&gt;Workflow Rehydration&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;To achieve Workflow Rehydration, I&amp;rsquo;m keeping track of the current state in a SQL database and if the current workflow can&amp;rsquo;t be de-serialized (because the workflow has been updated), I instantiate a new workflow and I set the state to the state it was previously in.&lt;/p&gt;
&lt;p&gt;The obvious concern that comes up using this approach is &amp;ldquo;&lt;i&gt;how do I avoid executing the code inside my StateInitializationActivity?&lt;/i&gt;&amp;rdquo;&lt;/p&gt;
&lt;p&gt;To get around this issue, I&amp;rsquo;m passing in a boolean parameter into my State Machine workflow that indicates whether or not the workflow is being rehydrated. I then use an &lt;b&gt;IfElseActivity&lt;/b&gt; to execute my State Initialization code only if the workflow is not being rehydrated.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.imason.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/jim_5F00_schwartz/image_5F00_469DA6F4.png"&gt;&lt;img title="image" style="border:0pt none;display:inline;" alt="image" src="http://www.imason.com/img/blogs/image_469DA6F4.png" height="398" width="285" /&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;The end result is that the workflow goes back into its previous state, but it&amp;rsquo;s now running inside the new updated workflow code. You might call this a &amp;ldquo;Utopia State&amp;rdquo; (Apologies for the lame pun).&lt;/p&gt;
&lt;p&gt;The end user has no idea that the workflow has gone through this transformation from an old version of the workflow code to the new version; and it only took a little bit of code along with some IF conditions.&lt;/p&gt;
&lt;p&gt;&lt;b&gt;References:&lt;/b&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;[1] &lt;a href="http://msdn.microsoft.com/en-us/library/aa349375(VS.85).aspx"&gt;http://msdn.microsoft.com/en-us/library/aa349375(VS.85).aspx&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;[2] &lt;a href="http://community.bartdesmet.net/blogs/bart/archive/2006/08/28/4322.aspx"&gt;http://community.bartdesmet.net/blogs/bart/archive/2006/08/28/4322.aspx&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;[3] &lt;a href="http://www.sitechno.com/Blog/WorkflowVersioningOfLongRunningProcessesSucksHereIsMyTakeOnIt.aspx"&gt;http://www.sitechno.com/Blog/WorkflowVersioningOfLongRunningProcessesSucksHereIsMyTakeOnIt.aspx&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://imason.com/aggbug.aspx?PostID=427" width="1" height="1"&gt;</description><category domain="http://imason.com/imason_Blogs/b/jim_schwartz/archive/tags/Windows+Workflow+Foundation/default.aspx">Windows Workflow Foundation</category><category domain="http://imason.com/imason_Blogs/b/jim_schwartz/archive/tags/State+Machine+Workflow/default.aspx">State Machine Workflow</category><category domain="http://imason.com/imason_Blogs/b/jim_schwartz/archive/tags/.NET/default.aspx">.NET</category><category domain="http://imason.com/imason_Blogs/b/jim_schwartz/archive/tags/technical/default.aspx">technical</category></item><item><title>Life Integrated with Google</title><link>http://imason.com/imason_Blogs/b/jim_schwartz/archive/2009/02/07/life-integrated-with-google.aspx</link><pubDate>Sat, 07 Feb 2009 19:21:00 GMT</pubDate><guid isPermaLink="false">ba1d72eb-a51c-4157-8cec-718d26de3334:340</guid><dc:creator>James Schwartz</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://imason.com/imason_Blogs/b/jim_schwartz/rsscomments.aspx?WeblogPostID=340</wfw:commentRss><comments>http://imason.com/imason_Blogs/b/jim_schwartz/archive/2009/02/07/life-integrated-with-google.aspx#comments</comments><description>&lt;p&gt;Seeing my Google Account dashboard made me realize how much I depend on Google:&lt;/p&gt;
&lt;p&gt;&lt;img title="image" style="border:0pt none;display:inline;" alt="image" src="http://www.imason.com/img/blogs/image_5F00_1676E48C.png" height="161" width="640" /&gt; &lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;A few thoughts came to mind:&lt;/b&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Google sets the bar very high. They provide high quality products (mostly for free), amazing feature-sets (Google Analytics amazes me), and they always provide a great user experience. It&amp;rsquo;s very rare that I&amp;rsquo;ve seen errors in a Google application&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Many Google products are a product of acquisitions. It&amp;rsquo;s amazing how so many acquired products can be re-factored, seamlessly integrated, and branded to become part of the Google product-line.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;I consider the successes of Google a lesson for me and others in Consulting. If we strive to set the bar as high as Google, we can have a dramatic impact on our clients and build great solutions. &lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I&amp;rsquo;m only using a small subset of Google applications. Look &lt;a href="http://www.google.ca/intl/en/options/"&gt;some of the other applications&lt;/a&gt; that are available:&lt;/p&gt;
&lt;p&gt;&lt;img title="image" style="border:0pt none;display:inline;" alt="image" src="http://www.imason.com/img/blogs/image_5F00_thumb_5F00_11648110.png" height="809" width="689" /&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Not to mention the new applications that are always being developed in &lt;a href="http://labs.google.com/"&gt;Google Labs&lt;/a&gt;:&lt;/p&gt;
&lt;p&gt;&lt;img title="image" style="border:0pt none;display:inline;" alt="image" src="http://www.imason.com/img/blogs/image_5F00_thumb_5F00_529F5DDC.png" height="696" width="335" /&gt; &lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Google&amp;rsquo;s contribution to the explosion of the Internet is as important as Microsoft&amp;rsquo;s contribution to the explosion of Personal Computing. Google will continue to build great applications and constantly raise the bar to provide end users with amazing options.&lt;/p&gt;
&lt;p&gt;My first memory of Google applications raising the bar (Aside from Google Search) was on June 30th, 2004 &lt;a href="http://www.theurbancountry.com/2004/06/thank-you-gmail.html"&gt;when I observed&lt;/a&gt; Microsoft raise the Hotmail mailbox limit from 2MB, YES, 2 MB!! to 250MB!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://imason.com/aggbug.aspx?PostID=340" width="1" height="1"&gt;</description><category domain="http://imason.com/imason_Blogs/b/jim_schwartz/archive/tags/Technology/default.aspx">Technology</category><category domain="http://imason.com/imason_Blogs/b/jim_schwartz/archive/tags/Google/default.aspx">Google</category></item><item><title>NAnt, SharePoint and Production Deployments</title><link>http://imason.com/imason_Blogs/b/jim_schwartz/archive/2009/02/03/nant-sharepoint-and-production-deployments.aspx</link><pubDate>Tue, 03 Feb 2009 21:58:38 GMT</pubDate><guid isPermaLink="false">ba1d72eb-a51c-4157-8cec-718d26de3334:315</guid><dc:creator>James Schwartz</dc:creator><slash:comments>3</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://imason.com/imason_Blogs/b/jim_schwartz/rsscomments.aspx?WeblogPostID=315</wfw:commentRss><comments>http://imason.com/imason_Blogs/b/jim_schwartz/archive/2009/02/03/nant-sharepoint-and-production-deployments.aspx#comments</comments><description>&lt;p&gt;On my current SharePoint/InfoPath project, we’re using NAnt to deploy absolutely everything. NAnt creates SharePoint pages, imports web parts to pages, activates SharePoint features, deploys assemblies, creates SharePoint lists, creates/updates SQL databases (via &lt;a href="http://dbdeploy.com/"&gt;DBDeploy&lt;/a&gt;), &lt;a href="http://www.imason.com/blogs/jim_schwartz/archive/2008/08/19/automated-publishing-of-infopath-forms-part-2-of-2.aspx"&gt;packages and deploys InfoPath forms&lt;/a&gt;, copies XSLT/XML/ASPX files, and much much more.&lt;/p&gt;  &lt;p&gt;I always boast about how when a new developer comes on the project, he/she can have a fully operational SharePoint development environment within minutes. This is an important achievement, as most SharePoint Developers know it can be painful to automate deployments to SharePoint sites.&lt;/p&gt;  &lt;p&gt;This works great for a Development environment, but what happens when you need to deploy to Production? Some companies don’t allow NAnt to be executed directly in Production, so you’ll need to setup your NAnt build files to execute on a build server to prepare for a Production deployment.&lt;/p&gt;  &lt;p&gt;To achieve this, I went back into my NAnt build file and updated my NAnt targets to allow for the “preparation” of a deployment rather than actually performing the deployment. This provides us the ability to run NAnt on a build server in order to package everything for an easy automated deployment in Production (without NAnt).&lt;/p&gt;  &lt;p&gt;I’m leveraging &lt;a href="http://wix.sourceforge.net/"&gt;Windows Installer XML&lt;/a&gt; (WiX) in order to package the deployment files into MSI packages (In a future post I’ll get into more detail about using WiX MSI’s for SharePoint deployments). For SharePoint feature installation/activations and InfoPath form deployments I’m generating a batch file from NAnt that gets packaged into the MSI and executed when the MSI is installed on the server.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;First we prepare the batch files&lt;/strong&gt; – this will create 3 new empty batch files with a line “ECHO OFF” inside them:&lt;/p&gt;   &lt;div style="border-right:gray 1px solid;padding-right:4px;border-top:gray 1px solid;padding-left:4px;font-size:8pt;padding-bottom:4px;margin:20px 0px 10px;overflow:auto;border-left:gray 1px solid;width:97.5%;cursor:text;max-height:200px;line-height:12pt;padding-top:4px;border-bottom:gray 1px solid;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;"&gt;   &lt;div style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none;"&gt;     &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;border-right-style:none;border-left-style:none;background-color:white;border-bottom-style:none;"&gt;&lt;span style="color:#606060;"&gt;   1:&lt;/span&gt; &amp;lt;target name=&lt;span style="color:#006080;"&gt;&amp;quot;PrepareBatchFiles&amp;quot;&lt;/span&gt;&amp;gt; &lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none;"&gt;&lt;span style="color:#606060;"&gt;   2:&lt;/span&gt;     &amp;lt;echo file =&lt;span style="color:#006080;"&gt;&amp;quot;${featuresDeployment.cmd}&amp;quot;&lt;/span&gt; append=&lt;span style="color:#006080;"&gt;&amp;quot;true&amp;quot;&lt;/span&gt; message=&lt;span style="color:#006080;"&gt;&amp;quot;ECHO OFF&amp;quot;&lt;/span&gt; /&amp;gt; &lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;border-right-style:none;border-left-style:none;background-color:white;border-bottom-style:none;"&gt;&lt;span style="color:#606060;"&gt;   3:&lt;/span&gt;     &amp;lt;echo file =&lt;span style="color:#006080;"&gt;&amp;quot;${formsDeployment.cmd}&amp;quot;&lt;/span&gt; append=&lt;span style="color:#006080;"&gt;&amp;quot;true&amp;quot;&lt;/span&gt; message=&lt;span style="color:#006080;"&gt;&amp;quot;ECHO OFF&amp;quot;&lt;/span&gt; /&amp;gt; &lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none;"&gt;&lt;span style="color:#606060;"&gt;   4:&lt;/span&gt;     &amp;lt;echo file =&lt;span style="color:#006080;"&gt;&amp;quot;${dataConnectionsDeployment.cmd}&amp;quot;&lt;/span&gt; append=&lt;span style="color:#006080;"&gt;&amp;quot;true&amp;quot;&lt;/span&gt; message=&lt;span style="color:#006080;"&gt;&amp;quot;ECHO OFF&amp;quot;&lt;/span&gt; /&amp;gt; &lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;border-right-style:none;border-left-style:none;background-color:white;border-bottom-style:none;"&gt;&lt;span style="color:#606060;"&gt;   5:&lt;/span&gt; &amp;lt;/target&amp;gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;

&lt;p class="MsoNormal"&gt;&lt;span style="font-size:10pt;color:#a31515;line-height:115%;font-family:&amp;#39;Courier New&amp;#39;;mso-no-proof:yes;"&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Next, we append STSADM calls to the batch files – &lt;/strong&gt;anytime we call STSADM from NAnt, we will add a row into the batch file. Here’s an example when we’re calling the “UploadForm” NAnt target:&lt;/p&gt;

&lt;p class="MsoNormal" style="margin-bottom:0pt;line-height:normal;mso-layout-grid-align:none;"&gt;&lt;span style="font-size:10pt;font-family:&amp;#39;Courier New&amp;#39;;mso-no-proof:yes;"&gt;&lt;/span&gt;&lt;/p&gt;

&lt;div style="border-right:gray 1px solid;padding-right:4px;border-top:gray 1px solid;padding-left:4px;font-size:8pt;padding-bottom:4px;margin:20px 0px 10px;overflow:auto;border-left:gray 1px solid;width:97.5%;cursor:text;max-height:200px;line-height:12pt;padding-top:4px;border-bottom:gray 1px solid;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;"&gt;
  &lt;div style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none;"&gt;
    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;border-right-style:none;border-left-style:none;background-color:white;border-bottom-style:none;"&gt;&lt;span style="color:#606060;"&gt;   1:&lt;/span&gt; &amp;lt;target name=&lt;span style="color:#006080;"&gt;&amp;quot;UploadFormTemplate&amp;quot;&lt;/span&gt; description=&lt;span style="color:#006080;"&gt;&amp;quot;Uploads an InfoPath Form&amp;quot;&lt;/span&gt;&amp;gt;&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none;"&gt;&lt;span style="color:#606060;"&gt;   2:&lt;/span&gt;     &amp;lt;choose&amp;gt;&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;border-right-style:none;border-left-style:none;background-color:white;border-bottom-style:none;"&gt;&lt;span style="color:#606060;"&gt;   3:&lt;/span&gt;         &amp;lt;when test=&lt;span style="color:#006080;"&gt;&amp;quot;${prepareDeployment==&amp;#39;true&amp;#39;}&amp;quot;&lt;/span&gt;&amp;gt;&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none;"&gt;&lt;span style="color:#606060;"&gt;   4:&lt;/span&gt;             &amp;lt;echo file=&lt;span style="color:#006080;"&gt;&amp;quot;${formDeploymentBatchFile}&amp;quot;&lt;/span&gt; append=&lt;span style="color:#006080;"&gt;&amp;quot;true&amp;quot;&lt;/span&gt; message=&lt;span style="color:#006080;"&gt;&amp;quot;echo Attempting to upload form template &amp;#39;${formName}.xsn&amp;#39;&amp;quot;&lt;/span&gt; /&amp;gt;&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;border-right-style:none;border-left-style:none;background-color:white;border-bottom-style:none;"&gt;&lt;span style="color:#606060;"&gt;   5:&lt;/span&gt;             &amp;lt;echo file=&lt;span style="color:#006080;"&gt;&amp;quot;${formDeploymentBatchFile}&amp;quot;&lt;/span&gt; append=&lt;span style="color:#006080;"&gt;&amp;quot;true&amp;quot;&lt;/span&gt; message=&lt;span style="color:#006080;"&gt;&amp;quot;${stsadm.exe} -o uploadformtemplate -filename &amp;amp;quot;${deploymentFolder}\Forms\${formName}.xsn&amp;amp;quot;&amp;quot;&lt;/span&gt; /&amp;gt;&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none;"&gt;&lt;span style="color:#606060;"&gt;   6:&lt;/span&gt;         &amp;lt;/when&amp;gt;&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;border-right-style:none;border-left-style:none;background-color:white;border-bottom-style:none;"&gt;&lt;span style="color:#606060;"&gt;   7:&lt;/span&gt;         &amp;lt;otherwise&amp;gt;&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none;"&gt;&lt;span style="color:#606060;"&gt;   8:&lt;/span&gt;             &amp;lt;exec program=&lt;span style="color:#006080;"&gt;&amp;quot;${stsadm.exe}&amp;quot;&lt;/span&gt;&amp;gt;&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;border-right-style:none;border-left-style:none;background-color:white;border-bottom-style:none;"&gt;&lt;span style="color:#606060;"&gt;   9:&lt;/span&gt;                 &amp;lt;arg line=&lt;span style="color:#006080;"&gt;&amp;quot;-o uploadformtemplate&amp;quot;&lt;/span&gt; /&amp;gt;&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none;"&gt;&lt;span style="color:#606060;"&gt;  10:&lt;/span&gt;                 &amp;lt;arg line=&lt;span style="color:#006080;"&gt;&amp;quot;-filename &amp;amp;quot;${publishedFormsFolder}${formName}.xsn&amp;amp;quot;&amp;quot;&lt;/span&gt; /&amp;gt;&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;border-right-style:none;border-left-style:none;background-color:white;border-bottom-style:none;"&gt;&lt;span style="color:#606060;"&gt;  11:&lt;/span&gt;             &amp;lt;/exec&amp;gt;&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none;"&gt;&lt;span style="color:#606060;"&gt;  12:&lt;/span&gt;         &amp;lt;/otherwise&amp;gt;&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;border-right-style:none;border-left-style:none;background-color:white;border-bottom-style:none;"&gt;&lt;span style="color:#606060;"&gt;  13:&lt;/span&gt;     &amp;lt;/choose&amp;gt;&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none;"&gt;&lt;span style="color:#606060;"&gt;  14:&lt;/span&gt; &amp;lt;/target&amp;gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;

&lt;p&gt;You can see from the NAnt target above that&amp;#160; it checks whether we’re “Preparing” a deployment or if we’re actually deploying. If we’re preparing the deployment, it will generate batch files and copy files to a deployment folder. I’ve added the &lt;strong&gt;“choose –&amp;gt; while”&lt;/strong&gt; condition into each NAnt target so that I can prepare my deployment files for the MSI.&lt;/p&gt;

&lt;p&gt;The generated batch file will look something like this:&lt;/p&gt;

&lt;div style="border-right:gray 1px solid;padding-right:4px;border-top:gray 1px solid;padding-left:4px;font-size:8pt;padding-bottom:4px;margin:20px 0px 10px;overflow:auto;border-left:gray 1px solid;width:97.5%;cursor:text;max-height:200px;line-height:12pt;padding-top:4px;border-bottom:gray 1px solid;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;"&gt;
  &lt;div style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none;"&gt;
    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;border-right-style:none;border-left-style:none;background-color:white;border-bottom-style:none;"&gt;&lt;span style="color:#606060;"&gt;   1:&lt;/span&gt; SET STSADM=C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN\STSADM.exe&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none;"&gt;&lt;span style="color:#606060;"&gt;   2:&lt;/span&gt; ECHO OFF&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;border-right-style:none;border-left-style:none;background-color:white;border-bottom-style:none;"&gt;&lt;span style="color:#606060;"&gt;   3:&lt;/span&gt; &amp;quot;%STSADM%&amp;quot; -o deactivateformtemplate -url http://sharepoint-serv -filename &amp;quot;C:\MyForms\MyInfoPathForm.xsn&amp;quot;&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none;"&gt;&lt;span style="color:#606060;"&gt;   4:&lt;/span&gt; &amp;quot;%STSADM%&amp;quot; -o removeformtemplate -filename &amp;quot;C:\MyForms\MyInfoPathForm.xsn&amp;quot;&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;border-right-style:none;border-left-style:none;background-color:white;border-bottom-style:none;"&gt;&lt;span style="color:#606060;"&gt;   5:&lt;/span&gt; &amp;quot;%STSADM%&amp;quot; -o execadmsvcjobs&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none;"&gt;&lt;span style="color:#606060;"&gt;   6:&lt;/span&gt; ECHO Attempting to upload form template &amp;#39;MyInfoPathForm.xsn&amp;#39;&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;border-right-style:none;border-left-style:none;background-color:white;border-bottom-style:none;"&gt;&lt;span style="color:#606060;"&gt;   7:&lt;/span&gt; &amp;quot;%STSADM%&amp;quot; -o uploadformtemplate -filename &amp;quot;C:\MyForms\MyInfoPathForm.xsn&amp;quot;&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none;"&gt;&lt;span style="color:#606060;"&gt;   8:&lt;/span&gt; &amp;quot;%STSADM%&amp;quot; -o execadmsvcjobs&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;border-right-style:none;border-left-style:none;background-color:white;border-bottom-style:none;"&gt;&lt;span style="color:#606060;"&gt;   9:&lt;/span&gt; &amp;quot;%STSADM%&amp;quot; -o activateformtemplate -url http://sharepoint-serv -filename &amp;quot;C:\MyForms\MyInfoPathForm.xsn&amp;quot;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;

&lt;p&gt;Now when I add a new form to be deployed, it will be automatically added to the batch file for the Production deployment. The end result is that I can run my NAnt scripts on a development environment to actually deploy my SharePoint components, or I can run the same batch scripts on a Production server via an MSI package. &lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://imason.com/aggbug.aspx?PostID=315" width="1" height="1"&gt;</description><category domain="http://imason.com/imason_Blogs/b/jim_schwartz/archive/tags/NAnt/default.aspx">NAnt</category><category domain="http://imason.com/imason_Blogs/b/jim_schwartz/archive/tags/SharePoint/default.aspx">SharePoint</category><category domain="http://imason.com/imason_Blogs/b/jim_schwartz/archive/tags/InfoPath+2007/default.aspx">InfoPath 2007</category><category domain="http://imason.com/imason_Blogs/b/jim_schwartz/archive/tags/Deployment/default.aspx">Deployment</category><category domain="http://imason.com/imason_Blogs/b/jim_schwartz/archive/tags/technical/default.aspx">technical</category><category domain="http://imason.com/imason_Blogs/b/jim_schwartz/archive/tags/Automation/default.aspx">Automation</category></item></channel></rss>