Deployment Tools Foundation joins the WiX toolset.

Back in early 2003, I was learning C# by rewriting WiX v1, which was tens of thousands of lines of VBScript, to create WiX v2. At the same time, Jason Ginchereau was experimenting with C# to create a managed library to interface with the Windows Installer API. I didn't know about Jason's work at the time so we created a very limited interop layer in WiX to communicate with the Windows Installer APIs. Jason, on the other hand, worked until he had covered every aspect of managed code interop with the Windows Installer API plus support for reading/writing Cabinet and Zip files. He named the result the Deployment Tools Foundation (DTF):

Deployment Tools Foundation is a rich set of .NET class libraries and related resources that together bring the Windows deployment platform technologies into the .NET world. It is designed to greatly simplify deployment-related development tasks while still exposing the complete functionality of the underlying technology.

Over the last six months or so Jason and I have been working together more. You see, Jason is the dev lead on the Visual Studio team responsible for integrating the WiX toolset into the next release of Visual Studio. Among the various things Jason and I have been discussing is what to do with DTF.

The biggest hurdle was that there were not enough test cycles available to ship DTF as part of the next version of Visual Studio. Even though DTF was used by many teams inside Microsoft, all code that becomes part of a shipping product must have a certain level of verification by official test resources. Since there weren't enough resources available to ship DTF as part of the product, Jason was looking for alternatives. Joining the WiX toolset community was an interesting option.

The next hurdle was managed code Custom Actions. As noted above, the Deployment Tools Foundation has full support for the Windows Installer API. That means it is possible to create all types of Custom Action (immediate, deferred, impersonated, rollback, commit, you name it) using managed code.

However, a year ago I posted the outcome of the managed code Custom Action discussion I had with Carolyn (MSI Dev Manager) and a couple Windows architects. To sum up that blog entry they had two issues. First, the technical issue was that managed code Custom Actions needed to be run in a separate process. Second, the Windows platform has a strategic goal to reduce the number of Custom Actions.

When I posted that blog entry, DTF suffered from both issues. A month or so after the blog entry, Jason had addressed the technical issue by implementing the necessary interprocess communication mechanisms to move the managed code Custom Actions into a separate process but still be able to communicate with the Windows Installer. He did a very nice job keeping the overhead very, very low (a simple named pipe) and as a result his solution is very robust.

That left the strategic concerns. I struggled with one for a long time. On one hand, I could understand why they don't want to have a proliferation of Custom Actions. But, at the same time, I saw fewer and fewer native APIs being developed for fewer and fewer native code developers.

I think it was sometime over the week I took off for my birthday that I subconsciously decided what to do. The next blog entry I wrote was titled Obsolete skills where the subconscious decision finally bubbled to the surface. After that, I sat down with Jason and we discussed what it would take to integrate DTF into WiX.

Last night Jason finished the integration work and today you can find the Deployment Tools Foundation in the sdk directory of the latest Windows Installer XML toolset release.

Jason, thank you for all of your hard work and I look forward to watching DTF grow.

 

9 Comments

Comment by Kevin Dente on Friday, May 16, 2008 10:17 AM

This is fantastic news. I look forward to exploring the new functionality.

Comment by Christopher Painter on Friday, May 16, 2008 11:25 AM

I find it very interesting that this entire time the party line has been to dismiss MC CA's while at the same time be working on an internal solution since 2003. Eitherway, I'm not going to look a gift horse in the mouth and I'd like to know what kind of beer Jason likes to drink.

But I do have a few questions....

Where is MakeSfxCA.exe? I couldn't find it in the MSI or the Binaries zip for the latest release.

Will there be support for MSI 4.5 embedded UI handlers and other features? ( Is it there now, I don't see it. )


Comment by Wouter Demuynck on Friday, May 16, 2008 1:25 PM

Sounds really slick, I'm sure I'm gonna be testing DTF pretty soon. No doubt it'll be every bit as exciting as it sounds.

One question though, does this mean that the opinion towards managed custom actions has changed, which means they would are no longer considered to be evil (of course, you'll introduce a dependency on the .NET Framework by using them) or is this just a 'workaround' for those who really, really, really want managed CA's?

Comment by dB. on Saturday, May 17, 2008 2:13 PM

This makes me very happy and very upset :)

Happy because I've used what has become DTF from http://toolbox years ago and wrote managed custom actions back then. This has always been really awesome stuff and I bit many nails hating the world for not being able to use this outside of MSFT.

Upset because in the past months I wrote so many C++ custom actions and infrastructure to support them under the impression that there's no way I am going to be able to write a managed CA any time soon in my lifetime.

Anyway, DTF is going to improve developer lives significantly. So thank you.

-dB.

PS: build 3.0.4116.0 (binaries) is missing MakeSfxCA.exe

Comment by Christopher Painter on Sunday, May 18, 2008 1:15 PM

Yes, the MakeSfxCA is missing. I had to pull through the MSI, Binaries and Sources to piece everything together as the solution was missing some files and in some cases seemed to have been compiled against the wrong snk file. Once the stars were aligned, DTF rocks.

I share the mixed emotions and I've blogged about it in a two part article for anyone open minded enough to read:

http://blog.deploymentengineering.com/2008/05/price-of-ideology-and-great-new-hope.html

http://blog.deploymentengineering.com/2008/05/deployment-tools-foundation-dtf-custom.html

Comment by Mike on Monday, May 19, 2008 3:33 PM

So, does this mean that all new custom action work for WiX will be in managed code?

Comment by Darwin on Monday, May 19, 2008 6:21 PM

Trackback: http://desktopengineer.com/home/all_articles/free_finally_.net_custom_actions_for_windows_installer

Comment by Christopher Painter on Thursday, May 22, 2008 11:50 AM

Mike-

No, Rob has rightfully indicated that he'll continue to do C++ code for WiX built-in CA's. After all, not installs have a dependency on .NET.

DTF is more for project specific and/or generic patterns where it is very unlikely that .NET is not already a dependency of the application.

Comment by Ramesh T on Monday, June 8, 2009 3:32 PM

Currently I am using the following assemblies to extract CAB files in our application. Can we deploy these files along with our app?
Microsoft.Deployment.Compression.Cab.dll
Microsoft.Deployment.Compression.dll

Leave a comment
optional