Thoughts about setup and deployment issues, WiX, XNA, the .NET Framework and Visual Studio
All postings are provided AS IS
with no warranties, and confer no rights. Additionally, views expressed
herein are my own and not those of my employer, Microsoft.
Rob Mensching posted an item on his blog last night that I wanted to bring to your attention. Recently, he implemented a feature in WiX v3.0 to potentially reduce the size of the cab files produced during the WiX build process. With this feature, if your MSI contains multiple copies of the same file, WiX will optimize the cab so that it only includes one physical copy of the file, but the MSI can still install multiple copies of it (even if they have different file names).
Normally, an MSI can be authored to use the DuplicateFile table to avoid needing to carry multiple copies of the same file. However, as Rob alluded to in his blog post and as I previously described in this blog post, it is not possible in Windows Installer to use the DuplicateFile table when the file being duplicated is installed to the global assembly cache (GAC).
This is the scenario that we have run into when building setups for the .NET Framework and Visual Studio because both of these products install assemblies into the GAC for runtime scenarios and to the local file system for design time scenarios. An earlier version of the smart cabbing feature allowed us to reduce the size of cabs included in some of the versions of Visual Studio and the .NET Framework using similar logic, but that logic was hard-coded into the Visual Studio build process. Fortunately, it is now able to be used more widely as a part of WiX v3.0.
If you are using WiX v3.0, you do not need to do anything special to enable the smart cabbing feature - just download and install the most recent build of WiX v3.0 from the releases page. If you are not yet using WiX v3.0 and have scenarios where you need to install the same file to multiple locations but you cannot use the DuplicateFile table, then I encourage you to check out the WiX v3.0 smart cabbing feature as a possible solution to reduce your package size.
<update date="6/2/2007"> Fixed link to the WiX v3.0 releases page </update>
Actually, right now, I think you'll need to grab the latest build from the weekly releases: <a href="http://wix.sourceforge.net/releases">http://wix.sourceforge.net/releases</a>. It'll be a little bit until a weekly release is promoted to "Released" status and availble on the main download page.
Hi Rob - Thanks for the correction. I've updated the main text of this post to include that link.