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

<channel>
	<title>Joy of Setup &#187; WiX</title>
	<atom:link href="http://www.joyofsetup.com/category/wix/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.joyofsetup.com</link>
	<description>Bob Arnson's blog about setup and servicing</description>
	<lastBuildDate>Tue, 29 Jun 2010 02:41:43 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>WiX source code using Mercurial and TortoiseHg, Part 1</title>
		<link>http://www.joyofsetup.com/2010/06/28/wix-source-code-using-mercurial-and-tortoisehg-part-1/</link>
		<comments>http://www.joyofsetup.com/2010/06/28/wix-source-code-using-mercurial-and-tortoisehg-part-1/#comments</comments>
		<pubDate>Tue, 29 Jun 2010 02:18:28 +0000</pubDate>
		<dc:creator>Bob Arnson</dc:creator>
				<category><![CDATA[WiX]]></category>

		<guid isPermaLink="false">http://www.joyofsetup.com/2010/06/28/wix-source-code-using-mercurial-and-tortoisehg-part-1/</guid>
		<description><![CDATA[Now that Rob moved the WiX source repository and releases to Codeplex, how you interact with the WiX source code changes. Before the move to Codeplex, we published a .zip file that contains most—but not all—of the files needed to rebuild WiX. (Some large binary files were omitted because of space limitations at SourceForge.) For [...]]]></description>
			<content:encoded><![CDATA[<p>Now that <a href="http://robmensching.com/blog/posts/2010/6/6/WiX-toolset-source-and-releases-move-to-CodePlex">Rob moved the WiX source repository and releases to Codeplex</a>, how you interact with the WiX source code changes. Before the move to Codeplex, we published a .zip file that contains most—but not all—of the files needed to rebuild WiX. (Some large binary files were omitted because of space limitations at SourceForge.) For example, <a title="http://wix.sourceforge.net/releases/3.5.1811.0/wix35-sources.zip" href="http://wix.sourceforge.net/releases/3.5.1811.0/wix35-sources.zip">http://wix.sourceforge.net/releases/3.5.1811.0/wix35-sources.zip</a> contains the source code as of the 11-June-2010 release of WiX v3.5. For now, we’re continuing to publish those files but the move to Codeplex makes them pretty much obsolete.</p>
<p>I’m writing a couple of posts that talk about how to use the WiX source repository to view, modify, and patch the WiX source code.</p>
<h1>Getting WiX source code</h1>
<p>Getting WiX source code out of Mercurial is straightforward using <a href="http://tortoisehg.bitbucket.org/download/index.html">TortoiseHg</a>:</p>
<ol>
<li>Install <a href="http://tortoisehg.bitbucket.org/download/index.html">TortoiseHg</a>. </li>
<li>Use Explorer to create a directory where you want to store the source code. I used “wix” in the root of my X: drive. </li>
<li>Right-click the directory you created in step 2 and choose <strong>TortoiseHg|Clone</strong>. </li>
<li>In <strong>Source path</strong>, enter <strong>https://hg01.codeplex.com/wix</strong>. That’s the Mercurial clone URL, provided by Codeplex. You can see it for your self by going to <a title="https://wix.codeplex.com/" href="https://wix.codeplex.com/">https://wix.codeplex.com/</a> then clicking the <strong>Source Code</strong> tab and clicking <strong>Mercurial </strong>in the Source Control Setup box in the right bar.
<p><a href="http://www.joyofsetup.com/wp-content/uploads/2010/06/TortoiseHgClone.png"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="TortoiseHg Clone" border="0" alt="TortoiseHg Clone" src="http://www.joyofsetup.com/wp-content/uploads/2010/06/TortoiseHgClone_thumb.png" width="476" height="148" /></a> </li>
<li>Click <strong>Clone</strong>. TortoiseHg will fetch many “chunks” from Codeplex. It’ll take a while, depending on your Internet connection speed. </li>
</ol>
<p>Your patience is rewarded with a directory that contains one subdirectory and two files (at least as of today). Huh? All you’ve done so far is cloned the WiX Mercurial repository. Next up is updating your working directory with a particular revision of that repository. (The default branch in the WiX repository contains no interesting files; all past and active development is happening on the named branches wix20, wix30, and wix35, shown below in green.)</p>
<ol>
<li>Right-click the directory you created in step 2 and choose <strong>Hg Repository Explorer. </strong>You’ll get a window that contains the changes that have been committed to the Mercurial repository.       </p>
<p><a href="http://www.joyofsetup.com/wp-content/uploads/2010/06/wixRepositoryExplorer.png"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="wix - Repository Explorer" border="0" alt="wix - Repository Explorer" src="http://www.joyofsetup.com/wp-content/uploads/2010/06/wixRepositoryExplorer_thumb.png" width="564" height="427" /></a> </li>
<li>Right-click the line representing the version you’re interested in and choose <strong>Update</strong>. To get the latest version, look toward the top for the version with the yellow “tip” box. </li>
<li>Click <strong>Update</strong> to get the version you selected.
<p><a href="http://www.joyofsetup.com/wp-content/uploads/2010/06/Updatewix.png"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="Update - wix" border="0" alt="Update - wix" src="http://www.joyofsetup.com/wp-content/uploads/2010/06/Updatewix_thumb.png" width="408" height="417" /></a> </li>
</ol>
<p>The directory now contains a WiX source enlistment. Up next: creating patches against a clone of the official repository.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.joyofsetup.com/2010/06/28/wix-source-code-using-mercurial-and-tortoisehg-part-1/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Experimental results part I</title>
		<link>http://www.joyofsetup.com/2010/05/28/experimental-results-part-i/</link>
		<comments>http://www.joyofsetup.com/2010/05/28/experimental-results-part-i/#comments</comments>
		<pubDate>Fri, 28 May 2010 13:22:01 +0000</pubDate>
		<dc:creator>Bob Arnson</dc:creator>
				<category><![CDATA[WiX]]></category>
		<category><![CDATA[bugs]]></category>

		<guid isPermaLink="false">http://www.joyofsetup.com/2010/05/28/experimental-results-part-i/</guid>
		<description><![CDATA[So far the results of The Experiment have been minimal—I’ve received one public report and one private report—but 100 percent successful. So we need more data but so far it’s looking good. One issue has come up, however: Build failures with customized dialog sets. Fragments that define dialog sets need to include all the UI [...]]]></description>
			<content:encoded><![CDATA[<p>So far the results of <a href="http://www.joyofsetup.com/2010/05/20/its-time-to-experiment/">The Experiment</a> have been minimal—I’ve received one public report and one private report—but 100 percent successful. So we need more data but so far it’s looking good.</p>
<p>One issue has come up, however: Build failures with customized dialog sets. Fragments that define dialog sets need to include all the UI elements, properties, and WiX bind-time variables used by the dialogs in that set. By referring to the WixUICostingPopupOptOut WiX variable from the individual dialogs, custom dialog sets must also provide a value. You can provide a value for WixUICostingPopupOptOut anywhere in your project but the easiest is to do so in the same fragment with your dialog set. Just add this line:</p>
<blockquote><p>&lt;WixVariable Id=&quot;WixUICostingPopupOptOut&quot; Value=&quot;1&quot; Overridable=&quot;yes&quot; /&gt; </p>
</blockquote>
]]></content:encoded>
			<wfw:commentRss>http://www.joyofsetup.com/2010/05/28/experimental-results-part-i/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>It&#8217;s time to experiment</title>
		<link>http://www.joyofsetup.com/2010/05/20/its-time-to-experiment/</link>
		<comments>http://www.joyofsetup.com/2010/05/20/its-time-to-experiment/#comments</comments>
		<pubDate>Fri, 21 May 2010 03:20:50 +0000</pubDate>
		<dc:creator>Bob Arnson</dc:creator>
				<category><![CDATA[WiX]]></category>
		<category><![CDATA[bugs]]></category>

		<guid isPermaLink="false">http://www.joyofsetup.com/2010/05/20/its-time-to-experiment/</guid>
		<description><![CDATA[Last month, I posted a plea for help to try to figure out why sometimes (or rarely) (or frequently), Windows Installer fails to set an internal property that causes a never-ending “please wait” dialog. I got lots of feedback—thanks!—but unfortunately, nothing that helped me pinpoint a cause or a solution. So it’s time to make [...]]]></description>
			<content:encoded><![CDATA[<p>Last month, I posted a <a href="http://www.joyofsetup.com/2010/04/04/bug-hunting/">plea for help</a> to try to figure out why sometimes (or rarely) (or frequently), Windows Installer fails to set an internal property that causes a never-ending “please wait” dialog. I got lots of feedback—thanks!—but unfortunately, nothing that helped me pinpoint a cause or a solution.</p>
<p>So it’s time to make an guess. Let’s call it an educated guess but as I can’t reproduce the problem, I’m not sure it’s <em>entirely</em> educated.</p>
<p>Coming in the next weekly release of WiX is a mechanism to opt out of the costing popup dialog. And although it’s an opt-out mechanism, for now it’s opted-in by default. The idea is to see quickly if the change fixes the problem. If it does, we’ll keep the opt-in default for WiX v3.5. If not, we can either back out the change or just change the default to opt-out.</p>
<p>So what’s the change? Before, all the dialogs that initiated an install transaction used a SpawnWaitDialog control event with a condition of CostingComplete=1. The dialog would pop up until the condition was met. Now, the condition includes the bind-time WiX variable WixUICostingPopupOptOut. WixUICostingPopupOptOut defaults to 1, so the condition is always true and the popup never appears.</p>
<p>You can override WixUICostingPopupOptOut in your project with a value of 0 to return to the previous behavior:</p>
<blockquote><p>&lt;WixVariable Id=&quot;WixUICostingPopupOptOut&quot; Value=&quot;0&quot; /&gt;</p>
</blockquote>
<p>So, please grab the next release of WiX and try out your previously problematic installers. We want to fix this problem before we start locking down WiX v3.5 for RTM.</p>
<p><strong>Update</strong>: You can get the weekly release <a href="http://wix.sourceforge.net/releases/3.5.1721.0/">here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.joyofsetup.com/2010/05/20/its-time-to-experiment/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Working hard or hardly working?</title>
		<link>http://www.joyofsetup.com/2010/05/14/working-hard-or-hardly-working/</link>
		<comments>http://www.joyofsetup.com/2010/05/14/working-hard-or-hardly-working/#comments</comments>
		<pubDate>Fri, 14 May 2010 18:28:40 +0000</pubDate>
		<dc:creator>Bob Arnson</dc:creator>
				<category><![CDATA[WiX]]></category>

		<guid isPermaLink="false">http://www.joyofsetup.com/2010/05/14/working-hard-or-hardly-working/</guid>
		<description><![CDATA[Don’t complicate your setups by doing more than you have to. Here are a few things I’ve run into lately of people doing more than they have to and opening themselves up to potential bugs or increased risk of getting something wrong. Some attributes are optional, really. Rob and I have blogged before about the [...]]]></description>
			<content:encoded><![CDATA[<p>Don’t complicate your setups by doing more than you have to. Here are a few things I’ve run into lately of people doing more than they have to and opening themselves up to potential bugs or increased risk of getting something wrong.</p>
<ul>
<li><strong>Some attributes are optional, really.</strong> Rob and I have <a href="http://robmensching.com/blog/posts/2010/1/16/Glimpses-of-life-with-WiX-v4.0">blogged before</a> about the language enhancements sneaking into WiX v3.5. Those enhancements focus on simplifying authoring, by collapsing elements (<a href="http://www.joyofsetup.com/2010/01/16/major-upgrades-now-easier-than-ever/">MajorUpgrade</a>) or providing smart attributes (<a href="http://www.joyofsetup.com/2009/12/31/simplifying-wix-component-authoring/">Component</a>). I suspect many people rely on IntelliSense in Visual Studio when authoring their WiX source files. IntelliSense is pretty close to sliced bread on the greatness scale of inventions, but it has a significant downside in the current implementation in Votive: It lists all possible elements and attributes in the WiX schema, with no “intelligence” behind which are most important. So you get the positive IntelliSense feedback of providing values for every attribute. It’s addicting but you can fight it. (To be fair to IntelliSense, it’s just using the default XSD schema support in the XML language service; if someone were to add a WiX language service to Votive, IntelliSense could be much better.) </li>
<li><strong>Manually marking package and component bitness. </strong>MSI doesn’t support platform-neutral packages or components: They’re either 32-bit (x86) or 64-bit (x64 or IA64). In your authoring, you can specify a package’s platform using the <a href="http://wix.sourceforge.net/manual-wix3/wix_xsd_package.htm">Package/@Platform</a> attribute. Components are 32-bit by default; you can specify that they’re 64-bit by specifying “yes” as the <a href="http://wix.sourceforge.net/manual-wix3/wix_xsd_component.htm">Component/@Win64</a> attribute value. In a package full of 64-bit components, you have to specify @Win64=”yes” for <em>every</em> component. It’s typical to want to produce both 32-bit and 64-bit packages from the same WiX source, so a common approach is to make the @Win64 attribute value a preprocessor variable. Or, just let WiX handle it for you: Specify the –arch switch at the candle.exe command line or the &lt;InstallerPlatform&gt; property in a .wixproj MSBuild project. When you specify x64 or intel64, Candle automatically sets the package and components in the file being compiled as 64-bit. It’s still useful to be able to say “Win64=’no’” for those components that are 32-bit even in 64-bit packages. Of course, that’s also legal in 32-bit packages, so it’s safe to hard-code.</li>
<li><strong>Unnecessarily nuking registry keys. </strong>The <a href="http://wix.sourceforge.net/manual-wix3/wix_xsd_registrykey.htm">RegistryKey/@Action</a> attribute lets you specify some of the “special” <a href="http://msdn.microsoft.com/library/aa371168.aspx">Registry table</a> functionality that MSI supports. Specifying <em>create</em> lets you create an empty registry key; <em>createAndRemoveOnUninstall </em>tells MSI to delete the key and all values during uninstall. That’s useful functionality if your application creates additional values at runtime—but for per-machine registry keys (under HKEY_LOCAL_MACHINE) most apps don’t create additional values because it would require elevation. (The not-quite invisible hand of UAC gently guides developers toward good app behavior.) If you omit the @Action attribute or specify <em>none</em>, MSI will still delete the registry key if it deletes all the values in it (and so on, recursively down the registry key hierarchy). That’s the default; you don’t have to ask MSI to remove the registry entries it writes. So if you need to nuke your keys, go ahead, but otherwise, don’t bother. </li>
</ul>
<p>By the way, all of these things work in WiX v3.0 rtm.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.joyofsetup.com/2010/05/14/working-hard-or-hardly-working/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Bug hunting</title>
		<link>http://www.joyofsetup.com/2010/04/04/bug-hunting/</link>
		<comments>http://www.joyofsetup.com/2010/04/04/bug-hunting/#comments</comments>
		<pubDate>Sun, 04 Apr 2010 18:47:29 +0000</pubDate>
		<dc:creator>Bob Arnson</dc:creator>
				<category><![CDATA[WiX]]></category>
		<category><![CDATA[bugs]]></category>

		<guid isPermaLink="false">http://www.joyofsetup.com/2010/04/04/bug-hunting/</guid>
		<description><![CDATA[There’s a bug that the WixUI “Please wait while the installer finishes determining your disk space requirements” dialog is intermittently shown forever, never finishing the costing process to continue installation. I’ve seen that bug before have never been able to reproduce it reliably. The disk costing process is something Windows Installer does in the background [...]]]></description>
			<content:encoded><![CDATA[<p>There’s a <a href="https://sourceforge.net/tracker/?func=detail&amp;aid=2951181&amp;group_id=105970&amp;atid=642714">bug</a> that the WixUI “Please wait while the installer finishes determining your disk space requirements” dialog is intermittently shown forever, never finishing the costing process to continue installation. I’ve seen that bug before have never been able to reproduce it reliably. The disk costing process is something Windows Installer does in the background while the wizard UI is running; .msi packages have no real control over the process, other than which <a href="http://www.joyofsetup.com/2007/05/30/feature-conditions-and-ui/">features are enabled at the start of the UI sequence</a>.</p>
<p>Here’s the problem: I don’t think it’s a bug in WiX or WixUI. MSI owns the costing process and as costing works almost all the time, there isn’t a simple answer like “oh yeah, a rich-edit control on the first dialog breaks costing.” I suspect that there’s a bug in MSI but before I go to the MSI team, bug in hand, I need more data. Here’s where you come in: Help us gather more data to narrow down the bug.</p>
<ol>
<li><strong>Logs.</strong> It’s a reflexive request that verbose MSI logs are a vital part of figuring out any setup bug. In this case, they might not be <em>that</em> helpful, as the logs I’ve seen, including those attached to the bug, just show a lot of time passing between log entries. </li>
<li><strong>OS version. </strong>Which version of the OS? Which edition? x86 or x64? Which service pack? </li>
<li><strong>Virtuality. </strong>Does the bug occur in virtual machines or on “real” machines? Which virtual machine technology (e.g., Virtual PC, Hyper-V, VMware, VirtualBox)?</li>
<li><strong>MSI version.</strong> If it is a bug in MSI, narrowing down which versions are afflicted the worst would be key. (For example, I’ve never seen the bug occur on MSI 5.0 in Windows 7.) </li>
<li><strong>Frequency.</strong> How often does the bug occur? </li>
<li><strong>.msi package data.</strong> How big? How many files? How many components? </li>
<li><strong>WiX and WixUI data.</strong> Which version of WiX are you using? Which WixUI dialog set? How have you customized it? </li>
<li><strong>Packages. </strong>If you can provide packages that demonstrate the problem, please do so. Obviously, you might not be able to share your actual package content but does the bug still reproduce if you replace your actual files with zero-byte replacements? </li>
</ol>
<p>If you’ve seen this problem, please help: <a href="https://sourceforge.net/tracker/?func=detail&amp;aid=2951181&amp;group_id=105970&amp;atid=642714">Add your comments to the bug on SourceForge and attach your logs and packages.</a></p>
<p>Help us WiX community, you’re our only hope.</p>
<p><strong>Update, 5 April 2010: </strong>Added <strong>Virtuality</strong> – I got a report that the bug occurs most often on Virtual PC virtual machines and it seems to be a common issue on various blogs.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.joyofsetup.com/2010/04/04/bug-hunting/feed/</wfw:commentRss>
		<slash:comments>14</slash:comments>
		</item>
		<item>
		<title>Lux unit testing, now with extra mutations</title>
		<link>http://www.joyofsetup.com/2010/03/30/lux-unit-testing-now-with-extra-mutations/</link>
		<comments>http://www.joyofsetup.com/2010/03/30/lux-unit-testing-now-with-extra-mutations/#comments</comments>
		<pubDate>Wed, 31 Mar 2010 03:19:50 +0000</pubDate>
		<dc:creator>Bob Arnson</dc:creator>
				<category><![CDATA[WiX]]></category>
		<category><![CDATA[custom actions]]></category>

		<guid isPermaLink="false">http://www.joyofsetup.com/2010/03/30/lux-unit-testing-now-with-extra-mutations/</guid>
		<description><![CDATA[I’m currently spending a lot of time working with custom actions, removing them where I can and improving them where they’re still necessary. The biggest change I’m making is to make the custom actions data driven using the immediate/deferred/rollback custom action triad. One of the advantages in doing so is that I can use Lux [...]]]></description>
			<content:encoded><![CDATA[<p>I’m currently spending a lot of time working with custom actions, removing them where I can and improving them where they’re still necessary. The biggest change I’m making is to make the custom actions <a href="http://robmensching.com/blog/posts/2007/9/13/Zataoca-Custom-actions-should-be-data-driven">data driven</a> using the immediate/deferred/rollback custom action triad. One of the advantages in doing so is that I can use <a href="http://www.joyofsetup.com/2010/02/08/introducing-lux-declarative-unit-testing-for-custom-actions/">Lux</a> to help test my work. One of the advantages of <em>that</em> is that real-world experience is the best way to improve tools.</p>
<p>One of the challenges of developing data-driven custom actions is testing all the combinations of state that affect the custom action data immediate custom actions pass to deferred and rollback custom actions. Because Lux test packages don’t modify the machine, testing the full set of possible states is difficult. Providing known state is a strength of traditional unit-testing techniques, however; if your custom action code is well factored, it should be a simple task to provide a test double that <a href="http://c2.com/cgi-bin/wiki?ArrangeActAssert">arranges</a> hard-coded state information that you can then test against.</p>
<p>Naturally, I wanted to figure out how I could provide the best of both worlds in Lux. Here’s what I came up with: test mutations. From the doc:</p>
<blockquote><p>Test mutations let you author unit tests with different expected results. The mutation id is passed as the value of the WIXLUX_RUNNING_MUTATION property. Your custom action, typically in an &#8216;#ifdef DEBUG&#8217; block, retrieves the WIXLUX_RUNNING_MUTATION property and mock different behavior based on the mutation. To author test mutations, use the Mutation element with UnitTest elements as children. For example: </p>
<p>&lt;lux:Mutation Id=&quot;SimulateDiskFull&quot;&gt;     <br />&#160; &lt;lux:UnitTest &#8230; /&gt;      <br />&lt;/lux:Mutation&gt;</p>
<p>Nit runs the test package once for each mutation, setting the WIXLUX_RUNNING_MUTATION property to one mutation id at a time. Tests that aren&#8217;t children of a mutation are run every time.</p>
</blockquote>
<p>Test mutations are a fairly simple change but one I hope simplifies combining traditional unit-testing techniques with declarative assertions.</p>
<p>Lux’s test mutations will ship in the next weekly release of WiX.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.joyofsetup.com/2010/03/30/lux-unit-testing-now-with-extra-mutations/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WiX, MSBuild v2.0, and x64 systems</title>
		<link>http://www.joyofsetup.com/2010/03/27/wix-msbuild-v2-0-and-x64-systems/</link>
		<comments>http://www.joyofsetup.com/2010/03/27/wix-msbuild-v2-0-and-x64-systems/#comments</comments>
		<pubDate>Sat, 27 Mar 2010 19:06:32 +0000</pubDate>
		<dc:creator>Bob Arnson</dc:creator>
				<category><![CDATA[WiX]]></category>

		<guid isPermaLink="false">http://www.joyofsetup.com/2010/03/27/wix-msbuild-v2-0-and-x64-systems/</guid>
		<description><![CDATA[WiX v3.0 and v3.5 executables are available in .zip form and x86 and x64 .msi packages. The x64 .msi package was originally created because we need to install the WiX targets and tasks for 64-bit MSBuild into a 64-bit directory, something that’s not supported for x86 packages. Late in the WiX v3.0 development cycle, Jason [...]]]></description>
			<content:encoded><![CDATA[<p>WiX v3.0 and v3.5 executables are available in .zip form and x86 and x64 .msi packages. The x64 .msi package was originally created because we need to install the WiX targets and tasks for 64-bit MSBuild into a 64-bit directory, something that’s not supported for x86 packages. Late in the WiX v3.0 development cycle, <a href="http://blogs.msdn.com/jasongin/">Jason</a> made a change that lets 64-bit MSBuild use the targets and tasks in the 32-bit directory tree. Unfortunately, the special property used to allow that is present only in MSBuild v3.5, not MSBuild v2.0, so we still create the x64 .msi package.</p>
<p>Creating the x64 .msi package isn’t a huge burden on us but it’s led to some confusion, so we’d like to get rid of it. If you use 64-bit MSBuild 2.0 and the x64 WiX .msi package, please respond in the comments. If you use MSBuild 3.5 or the .zip WiX package or by checking WiX in to your source-control system, you’re not affected and can use the x86 WiX .msi package.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.joyofsetup.com/2010/03/27/wix-msbuild-v2-0-and-x64-systems/feed/</wfw:commentRss>
		<slash:comments>14</slash:comments>
		</item>
		<item>
		<title>Serial monogamy with your development tools</title>
		<link>http://www.joyofsetup.com/2010/03/20/serial-monogamy-with-your-development-tools/</link>
		<comments>http://www.joyofsetup.com/2010/03/20/serial-monogamy-with-your-development-tools/#comments</comments>
		<pubDate>Sat, 20 Mar 2010 19:58:14 +0000</pubDate>
		<dc:creator>Bob Arnson</dc:creator>
				<category><![CDATA[WiX]]></category>
		<category><![CDATA[bugs]]></category>

		<guid isPermaLink="false">http://www.joyofsetup.com/2010/03/20/serial-monogamy-with-your-development-tools/</guid>
		<description><![CDATA[When WiX v3.0 was in early, active development, the guidance we gave folks who wanted to start using its features was: “Sure, start using WiX v3.0! But pick up new builds at least once a month or so.” There were three Reasons for Taking Frequent WiX Drops (RTFWD, for short): The v3.0 schema was changing [...]]]></description>
			<content:encoded><![CDATA[<p>When WiX v3.0 was in early, active development, the guidance we gave folks who wanted to start using its features was: “Sure, start using WiX v3.0! But pick up new builds at least once a month or so.” There were three Reasons for Taking Frequent WiX Drops (RTFWD, for short):</p>
<ol>
<li><strong>The v3.0 schema was changing routinely. </strong>Going months between picking up new builds would expose bigger, possibly backward-incompatible changes. New builds once a month limited a team’s exposure to whatever we could do in four weeks.</li>
<li><strong>When you need a bug fix, you want as small a fix as possible. </strong>Bug fixes came frequently throughout the toolset so the longer between builds, the more churn a team would pick up. That complicates validating the packages produced by a new WiX build.</li>
<li><strong>Output changes could complicate (or break) patching.</strong> Changes in the things WiX writes to MSI tables affect your ability to create patches. The rules governing patches are a superset of the <a href="http://www.joyofsetup.com/2008/12/30/paying-for-upgrades/">dread component rules</a>, adding rules about changes that make patches <a href="http://msdn.microsoft.com/en-us/library/aa372102%28VS.85%29.aspx">not uninstallable</a>.</li>
</ol>
<p>In effect, you increase stability by taking smaller changes at any one time.</p>
<p>For WiX v3.5, reason #1 doesn’t apply: We aren’t making any backward-incompatible schema changes though we’re making <a href="http://www.joyofsetup.com/2009/12/31/simplifying-wix-component-authoring/">additive</a> <a href="http://www.joyofsetup.com/2010/01/16/major-upgrades-now-easier-than-ever/">changes</a> to simplify authoring. Reasons #2 and #3 still apply—and keep applying.</p>
<h2>Long-term relationships</h2>
<p>Eventually there comes a time in every project’s life to settle down in a committed relationship. For WiX users, that time is when you’re nearing a release that you intend to service. It might be a public beta, it might be RTM, it might be a weekly release of your Web app. If you intend to service it, especially with patches, you want the stability of a known build of WiX—Reason #3 applies in earnest when you start servicing.</p>
<p>New product releases can pick up new versions of WiX, but on the source-control branch you’re using to service old releases, stick with one version of WiX. We encourage teams to ship products using the released, RTM builds of WiX. So far, we haven’t released a service pack for WiX, but it’s safe to assume we wouldn’t include any changes in one that broke patching. </p>
<h2>Youthful indiscretions</h2>
<p>I was reminded of reason #3 today: Bug <a href="https://sourceforge.net/tracker/?func=detail&amp;atid=642714&amp;aid=2965405&amp;group_id=105970">2965405</a> demonstrated a hole in the logic that generates default component ids. The fix is simple: give a better default id used in constructing the stable short filename. Unfortunately, it changes <em>every</em> short filename that’s generated when you omit the Component/@Id attribute and the filename doesn’t fit within the 8.3 short filename syntax. Fixing the bug would complicate patching from prior builds of WiX v3.5.</p>
<p>As WiX v3.5 hasn’t even gone to beta yet, I believe we should fix the bug even with the patching problem it introduces. Other folks on the WiX Virtual Team will get to weigh in, as can you by commenting below.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.joyofsetup.com/2010/03/20/serial-monogamy-with-your-development-tools/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Mercurial/TortoiseHg installer now built with WiX</title>
		<link>http://www.joyofsetup.com/2010/03/06/mercurialtortoisehg-installer-now-built-with-wix/</link>
		<comments>http://www.joyofsetup.com/2010/03/06/mercurialtortoisehg-installer-now-built-with-wix/#comments</comments>
		<pubDate>Sat, 06 Mar 2010 19:24:21 +0000</pubDate>
		<dc:creator>Bob Arnson</dc:creator>
				<category><![CDATA[Etc]]></category>
		<category><![CDATA[WiX]]></category>

		<guid isPermaLink="false">http://www.joyofsetup.com/2010/03/06/mercurialtortoisehg-installer-now-built-with-wix/</guid>
		<description><![CDATA[I’ve been using Mercurial, a distributed version-control system, for a while now at home. Even without using a DVCS’s distributed nature, they make a great choice for a personal version control system: They all share the common trait that they keep all version history on the local system; most centralized VCSes keep only the latest [...]]]></description>
			<content:encoded><![CDATA[<p>I’ve been using <a href="http://mercurial.selenic.com/">Mercurial</a>, a <a href="http://en.wikipedia.org/wiki/Distributed_revision_control">distributed version-control system</a>, for a while now at home. Even without using a DVCS’s distributed nature, they make a great choice for a personal version control system: They all share the common trait that they keep all version history on the local system; most centralized VCSes keep only the latest versions locally with the historical versions kept only on the central server.</p>
<p>The latest release of Mercurial and TortoiseHg, a set of Windows shell extensions and GUI tools for Mercurial, was just released. This latest version (v1.5 and v1.0, respectively) includes both tools integrated into an MSI installer built with WiX. Previous versions were built with (the excellent but non-MSI-based) Inno Setup toolset. The WiX-based installer has the advantage of using a merge module for <a href="http://tortoisesvn.tigris.org/svn/tortoisesvn/TortoiseOverlays/version-1.0.13/Documentation.txt">TortoiseOverlays</a> (login as <strong>guest </strong>with an empty password), an icon overlay handler shared by shell extensions for several different version control systems: TortoiseHg for Mercurial, <a href="http://tortoisesvn.tigris.org/">TortoiseSVN</a> for <a href="http://subversion.apache.org/">Subversion</a>, <a href="http://www.tortoisecvs.org/">TortoiseCVS</a> for <a href="http://www.nongnu.org/cvs/">CVS</a>, <a href="http://wiki.bazaar.canonical.com/TortoiseBzr">TortoiseBZR</a> for <a href="http://bazaar.canonical.com/en/">Bazaar</a>, <a href="http://code.google.com/p/tortoisegit/">TortoiseGit</a> for <a href="http://git-scm.com/">Git</a>, and probably others.</p>
<p>As usual, I opened the TortoiseHg .msi in Orca before installing it on my workstation. I was pleasantly surprised by the low number of custom actions. I ran it through WiX v3.0’s Smoke.exe to run ICE validation; there were lots of errors and warnings but all but a few were from TortoiseHg’s use of the Visual C++ runtime libraries merge modules. (Is it ironic or just plain sad that they have so many ICE errors? Maybe both.)</p>
<p>Though we don’t use Mercurial for <a href="http://wix.sourceforge.net/">WiX</a> version control—yet, anyway—both <a href="https://sourceforge.net/apps/trac/sourceforge/wiki/Mercurial">SourceForge.net</a> and <a href="http://blogs.msdn.com/codeplex/archive/2010/01/22/codeplex-now-supporting-native-mercurial.aspx">Codeplex</a> support Mercurial for a project’s VCS.</p>
<ul>
<li><a href="http://mercurial.selenic.com/wiki/WhatsNew">Read the Mercurial v1.5 release notes.</a> </li>
<li><a href="http://bitbucket.org/tortoisehg/stable/wiki/ReleaseNotes">Read the TortoiseHg v1.0 release notes.</a> </li>
<li><a href="http://tortoisehg.bitbucket.org/download/index.html">Download the combined Mercurial and TortoiseHg installer.</a> </li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.joyofsetup.com/2010/03/06/mercurialtortoisehg-installer-now-built-with-wix/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Introducing Lux: Declarative unit testing for custom actions</title>
		<link>http://www.joyofsetup.com/2010/02/08/introducing-lux-declarative-unit-testing-for-custom-actions/</link>
		<comments>http://www.joyofsetup.com/2010/02/08/introducing-lux-declarative-unit-testing-for-custom-actions/#comments</comments>
		<pubDate>Tue, 09 Feb 2010 02:18:49 +0000</pubDate>
		<dc:creator>Bob Arnson</dc:creator>
				<category><![CDATA[WiX]]></category>
		<category><![CDATA[custom actions]]></category>

		<guid isPermaLink="false">http://www.joyofsetup.com/2010/02/08/introducing-lux-declarative-unit-testing-for-custom-actions/</guid>
		<description><![CDATA[The Cambridge-based WiX East Virtual Team have is pleased to announce its first major contribution to WiX: The Lux unit-testing framework. Lux will be available in the next weekly release of WiX v3.5. Unit-testing custom actions with Lux Custom actions are a frequent cause of installation failures so it&#8217;s important to test them thoroughly. Custom [...]]]></description>
			<content:encoded><![CDATA[<p>The <a href="http://microsoftcambridge.com/Default.aspx">Cambridge</a>-based WiX East Virtual Team have is pleased to announce its first major contribution to WiX: The Lux unit-testing framework. Lux will be available in the next <a href="http://wix.sourceforge.net/releases/">weekly release</a> of WiX v3.5.</p>
<h3>Unit-testing custom actions with Lux</h3>
<p>Custom actions are a frequent cause of installation failures so it&#8217;s important to test them thoroughly. Custom actions themselves usually aren&#8217;t tested. The traditional testing approach is to run functional tests on an entire installer and to cover as many scenarios and platform combinations as possible. </p>
<h4>Custom action patterns</h4>
<p>WiX compiler extensions provide one way of improving custom action quality: Because compiler extensions run at build time instead of install time, they can perform all sorts of data validation and conversion on strongly-typed authoring before converting it to rows and columns of custom tables in the MSI package. </p>
<p>Immediate custom actions then read those custom tables, check current state (for example, component action state, the state of the machine itself), and serialize the resulting data into a custom action data property. Immediate custom actions are the place to do the logic that needs live state and cannot be determined at build time by a compiler extension. Because immediate custom actions run in the security context of the installing user and outside an installation transaction, they generally do not have permissions to modify the machine and if they fail, the installation simply ends without the need to do any cleanup or rollback. </p>
<p>Deferred custom actions read the custom action data property set by immediate custom actions to know what to do. One way to improve custom action reliability is to make as few decisions as possible in deferred custom actions; instead, implement all the logic in compiler extensions and immediate custom actions and have deferred custom actions simply read the custom action data property in a loop to modify the machine. </p>
<p>The WiX custom actions that modify the machine use this pattern. For example, XmlConfig authoring is validated by the WixUtilExtension compiler extension and translated to rows and columns in the XmlConfig table. The SchedXmlConfig immediate custom action reads the XmlConfig table, constructs a custom action data property based on the XmlConfig table and machine&#8217;s state (including checking component state and storing existing file data to support rollback), then schedules the ExecXmlConfig deferred custom action to execute the XML changes and the ExecXmlConfigRollback rollback custom action to roll back the changes. </p>
<h4>Testing with Lux</h4>
<p>Lux is a WiX extension (and associated tools) that let you write data-driven unit tests for your custom actions. The executive summary: Lux runs your immediate custom actions then validates they set properties to the values you expect. </p>
<p>While it&#8217;s a simple approach, if your custom actions are factored as discussed above, validating the properties set by immediate custom actions can validate all the interaction between your custom actions, the MSI package, and MSI itself. </p>
<p>If your custom actions aren&#8217;t factored as discussed&#8211;for example, if your deferred custom actions expect only an installation directory and have logic to construct file paths from it&#8211;then it&#8217;s likely that your immediate custom actions don&#8217;t have a lot of logic that&#8217;s useful to test. </p>
<p>Lux does not help you test the custom action code that actually modifies the machine; for that, continue to use other unit-test frameworks and automated tests. By working only with immediate custom actions, Lux can let MSI run the custom actions as-is, eliminating the need to write custom <a href="http://xunitpatterns.com/Test%20Double.html">test doubles</a> for the MSI API. Lux runs from a per-user package so unless you run the tests from an elevated command prompt, none of the custom actions get elevated privileges and therefore cannot modify the machine. </p>
<p>Here&#8217;s how Lux works: </p>
<ol>
<li>You write your unit tests using XML in WiX source files. </li>
<li>The Lux extension converts the XML to a table in a test .msi package. </li>
<li>The Lux custom action runs after all other immediate custom actions and evaluates your unit tests. </li>
</ol>
<h3>Authoring unit tests</h3>
<p>Lux supports the following unit tests:</p>
<ul>
<li>Property values </li>
<li>Expressions </li>
<li>Multi-value properties </li>
<li>Name/value-pair properties </li>
</ul>
<p>Note that you should always author unit tests in fragments separate from your custom action authoring or any other product authoring. If you mix unit tests with other authoring, WiX includes the unit-test data in your &quot;real&quot; installers.</p>
<h4>Property value tests</h4>
<p>A simple test lets you specify a property to test, a value to test against, and the operator to compare with (which defaults to &quot;equal&quot;).</p>
<pre>&lt;Fragment&gt;
  &lt;lux:UnitTest CustomAction=&quot;TestCustomActionSimple&quot; Property=&quot;SIMPLE&quot; Value=&quot;[INSTALLLOCATION]&quot; Operator=&quot;equal&quot; /&gt;
&lt;/Fragment&gt;</pre>
<p>When the test runs, Lux compares the value of the SIMPLE property against the (formatted) value [INSTALLLOCATION]. If the two match (because the operator is &quot;equal&quot;), the test passes. Legal values of the Operator attribute are:</p>
<dl>
<dt><dfn>equal</dfn></dt>
<dd>(Default) Compares Property to Value and succeeds if they are equal. </dd>
<dt><dfn>notEqual</dfn></dt>
<dd>Compares Property to Value and succeeds if they are NOT equal. </dd>
<dt><dfn>caseInsensitiveEqual</dfn></dt>
<dd>Compares Property to Value and succeeds if they are equal (ignoring case). </dd>
<dt><dfn>caseInsensitiveNotEqual</dfn></dt>
<dd>Compares Property to Value and succeeds if they are NOT equal (ignoring case). </dd>
</dl>
<h4>Test conditions</h4>
<p>Conditions let you validate code paths in your custom action. For example, if your custom action behaves differently on Windows XP than it does on Windows Vista and later, you can create two tests with mutually exclusive conditions:</p>
<pre>&lt;Fragment&gt;
  &lt;lux:UnitTest CustomAction=&quot;TestCustomActionSimple&quot; Property=&quot;SIMPLE&quot; Value=&quot;[INSTALLLOCATION]&quot;&gt;
    &lt;lux:Condition&gt;&lt;![CDATA[VersionNT &lt; 600]]&gt;&lt;/lux:Condition&gt;
  &lt;/lux:UnitTest&gt;
  &lt;lux:UnitTest CustomAction=&quot;TestCustomActionSimple&quot; Property=&quot;SIMPLE&quot; Value=&quot;[INSTALLLOCATION]&quot;&gt;
    &lt;lux:Condition&gt;&lt;![CDATA[VersionNT &gt;= 600]]&gt;&lt;/lux:Condition&gt;
  &lt;/lux:UnitTest&gt;
&lt;/Fragment&gt;</pre>
<p>If a test has a condition, the test runs only if its condition is true.</p>
<h4>Expression tests</h4>
<p>Expression tests let you test any valid MSI expression. If the expression is true, the test passes. If the expression is false or invalid, the test fails.</p>
<pre>&lt;Fragment&gt;
  &lt;lux:UnitTest CustomAction=&quot;TestCustomActionSimple&quot;&gt;
    &lt;lux:Expression&gt;NOT MsiSystemRebootPending AND SIMPLE&lt;/lux:Expression&gt;
  &lt;/lux:UnitTest&gt;
&lt;/Fragment&gt;</pre>
<h4>Multi-value property tests</h4>
<p>Because deferred custom actions can access only a single custom-action data property, custom actions that need more than one piece of data encode it in a single string. One way is to have the immediate custom action separate multiple elements with a known separator character, then have the deferred custom action split the string at those separate characters. Lux supports such separators using the ValueSeparator and Index attributes.</p>
<pre>&lt;Fragment&gt;
  &lt;lux:UnitTest CustomAction=&quot;TestCustomActionMultiValue&quot; Property=&quot;MULTIVALUE&quot; ValueSeparator=&quot;*&quot;&gt;
    &lt;lux:Condition&gt;VersionNT&lt;/lux:Condition&gt;
    &lt;lux:UnitTest Index=&quot;0&quot; Value=&quot;1&quot; /&gt;
    &lt;lux:UnitTest Index=&quot;1&quot; Value=&quot;[INSTALLLOCATION]&quot;&gt;
      &lt;lux:Condition&gt;NOT Installed&lt;/lux:Condition&gt;
    &lt;/lux:UnitTest&gt;
    &lt;lux:UnitTest Index=&quot;2&quot; Value=&quot;WIXEAST&quot; /&gt;
  &lt;/lux:UnitTest&gt;
&lt;/Fragment&gt;</pre>
<p>A condition under the parent UnitTest element applies to all individual unit tests. Override it with a Condition child element.</p>
<h4>Name/value-pair property tests</h4>
<p>Another way of providing multiple values to a deferred custom action is to combine name/value pairs into a single string. Lux supports name/value-pair properties using the NameValueSeparator and Index attributes.</p>
<pre>&lt;Fragment&gt;
  &lt;lux:UnitTest CustomAction=&quot;TestCustomActionNameValuePairs&quot; Property=&quot;NAMEVALUEPAIRS&quot; NameValueSeparator=&quot;#&quot;&gt;
    &lt;lux:UnitTest Index=&quot;InstallationRoot&quot; Value=&quot;[INSTALLLOCATION]&quot; /&gt;
    &lt;lux:UnitTest Index=&quot;Developers&quot; Operator=&quot;caseInsensitiveNotEqual&quot; Value=&quot;WIXEAST&quot; /&gt;
  &lt;/lux:UnitTest&gt;
&lt;/Fragment&gt;</pre>
<h3>Building test packages</h3>
<p>Lux unit tests run from a minimal package that includes just your unit tests and the resources they need to run. Because Lux runs only immediate custom actions, it doesn&#8217;t need a full, per-machine package that includes all the files and other resources to be installed. Such a minimal package saves build time but does require that your WiX source code be well modularized with fragments. For example, you should always author unit tests in fragments separate from any other authoring. If you mix unit tests with other authoring, WiX includes the unit-test data in your &quot;real&quot; installers. Likewise, any other WiX authoring included in unit-test fragments is included in test packages.</p>
<p>Lux comes with a tool that simplifies the creation of test packages. Its name is lux.exe. To use lux.exe: </p>
<ol>
<li>Compile the source file containing your unit tests. </li>
<li>Run lux.exe on the .wixobj file and specify a source file for the test package. </li>
<li>Compile the test package source. </li>
<li>Link the test package .wixobj with the unit tests .wixobj. </li>
</ol>
<p>For example:</p>
<pre>candle -ext WixLuxExtension CustomActions.wxs
lux CustomActions.wixobj -out LuxSample1_test.wxs
candle -ext WixLuxExtension LuxSample1_test.wxs
light -ext WixLuxExtension LuxSample1_test.wixobj CustomActions.wixobj -out LuxSample1_test.msi</pre>
<p>Lux also includes an MSBuild task and .targets file to let you build test packages from the same .wixproj you use to build your installers. To build a test package, build the BuildTestPackage target using MSBuild 3.5:</p>
<pre>%WINDIR%\Microsoft.NET\Framework\v3.5\MSBuild.exe /t:BuildTestPackage</pre>
<h3>Running unit tests</h3>
<p>After building the test package, you can run it with logging enabled to capture test results:</p>
<pre>msiexec /l test1.log /i bin\Debug\LuxSample1_test.msi</pre>
<p>Search the log for <b>WixRunImmediateUnitTests</b> to see test results and other logging from the Lux custom action.</p>
<h4>Nit: The Lux test runner</h4>
<p>Lux also includes Nit, a console program that monitors the logging messages emitted by unit tests and reports success or failure. To use Nit on your test packages, just specify their filenames as arguments to nit.exe. For example:</p>
<pre>nit LuxSample1_test.msi</pre>
<p>Lux also lets you run Nit on your test packages from the same .wixproj you use to build your installers. To run a test package under Nit, build the Test target using MSBuild 3.5:</p>
<pre>%WINDIR%\Microsoft.NET\Framework\v3.5\MSBuild.exe /t:Test</pre>
<p>The test package will be built before the tests are run, if necessary. The output looks like the following, with failing tests highlighted in red as build errors:</p>
<pre>Test:
  Microsoft (R) Windows Installer Xml Unit Test Runner version 3.5.1204.0
  Copyright (C) Microsoft Corporation. All rights reserved.

  Test luxB21F0D12E0701DBA30FFB92A532A5390 passed: Property 'SIMPLE' matched expected value '[INSTALLLOCATION]'.
  Test TestConditionBeforeVista passed: Property 'SIMPLE' matched expected value '[INSTALLLOCATION]'.
  Test TestConditionVistaOrLater passed: Property 'SIMPLE' matched expected value '[INSTALLLOCATION]'.
  Test TestExpressionTruth passed: Expression 'NOT MsiSystemRebootPending AND SIMPLE' evaluated to true.
nit.exe : error NIT8103: Test luxA6D27EC5903612D7F3786FF71952E314 failed: Property 'MULTIVALUE' expected value '2' but actual value was '1'.
  Test lux210257649C16AFA33793F1CDDF575505 passed: Property 'MULTIVALUE' matched expected value '[INSTALLLOCATION]'.
nit.exe : error NIT8103: Test lux402940A90D3ADAD181D599AB8C260FA0 failed: Property 'MULTIVALUE' expected value 'xxxWIXEAST' but actual value was 'WIXEAST'.
  Test lux453EC8DB458A8F66F0D22970CFF2AE99 passed: Property 'NAMEVALUEPAIRS' matched expected value '[INSTALLLOCATION]'.
  Test lux20CB4F88795F22D15631FD60BA03AFEB passed: Property 'NAMEVALUEPAIRS' matched expected value 'WIXWEST'.
nit.exe : error NIT8102: 2 tests failed. 7 tests passed.
Done Building Project &quot;C:\Delivery\Dev\wix35\src\lux\samples\LuxSample1\LuxSample1.wixproj&quot; (Test target(s)) -- FAILED.

Build FAILED.

&quot;C:\Delivery\Dev\wix35\src\lux\samples\LuxSample1\LuxSample1.wixproj&quot; (Test target) (1) -&gt;
(Test target) -&gt;
  nit.exe : error NIT8103: Test luxA6D27EC5903612D7F3786FF71952E314 failed: Property 'MULTIVALUE' expected value '2' but actual value was '1'.
  nit.exe : error NIT8103: Test lux402940A90D3ADAD181D599AB8C260FA0 failed: Property 'MULTIVALUE' expected value 'xxxWIXEAST' but actual value was 'WIXEAST'.
  nit.exe : error NIT8102: 2 tests failed. 7 tests passed.

    0 Warning(s)
    3 Error(s)

Time Elapsed 00:00:07.87</pre>
<h3>FAQ</h3>
<dl>
<dt>Are these really unit tests? They look a lot like <a href="http://fit.c2.com/">Fit tests</a>. </dt>
<dd>Fit tests are tabular and data-driven, so they have a lot in common with Lux&#8217;s unit tests. But fit tests are focused on high-level outputs, whereas unit tests are low-level developer tests. </dd>
<dt>Using the custom action code as-is sounds good, but are there any limitations with that approach? </dt>
<dd>Yes. Because you are running the actual custom action, any code paths that rely on machine state reflect the state of the machine you run the tests on. For example, code that has different behavior on different versions of Windows runs only one way, just like it does in a normal installer. You can add debug code that looks for the presence of the WIXLUXTESTPACKAGE property; it&#8217;s set to 1 in a test package. </dd>
<dt>I have unit tests that fail because directory properties are being returned as empty strings. Why? </dt>
<dd>The most likely cause is that your directories are defined as children of your installer&#8217;s Product element. Lux.exe builds its own Product element to product a minimal test package, so none of the resources defined in your Product are available to the unit tests. The simplest solution is to move those resources to their own Fragment. </dd>
<dt>Do I have to write my custom actions in C++? </dt>
<dd>No, Lux works with any immediate custom actions, regardless of the language they&#8217;re written in, including MSI type 51 property-setting custom actions. </dd>
</dl>
]]></content:encoded>
			<wfw:commentRss>http://www.joyofsetup.com/2010/02/08/introducing-lux-declarative-unit-testing-for-custom-actions/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
