In a lot of my examples I am going to assume that you are using an IDE like Visual Studio. As of version 3, WiX would automatically install the WiX project template for use in Visual Studio. This enables us to leverage the capabilities of WiX with our solutions as well as use features such as Intellisense when creating WiX projects. The Visual Studio package is known as Voltive, an is available to Visual Studio 2005 and later. WiX appears to be perfectly capable when being scaled up to deploy enterprise-level solutions. If you are deploying many dlls with WiX you may want to to unload the project whilst running a large number of local F5 builds as it will re-compile the dlls all over again, meaning that you waste time compiling, then compiling again!

To create a WiX Project is very simple though you need to make sure you have WiX 3.0 or later downloaded and installed and using Visual Studio 2005 or later. It really is as simple as creating any other project in Visual Studio 2012:

start-page-microsoft-visual-studio_2013-04-28_19-45-40_png

Once created there is a single product.wxs file and nothing else. The name of this file is nothing significant, though I admit I’ve never renamed it as everyone knows it is going to be the start-up file and so for “the next guy” it’s probably a good idea to leave it as is. You can add other .wxs files (you can see why you would want to do this in later posts.)

If you open up the references and go to add references, scroll down to the bottom you will see quite a few prefixed “Wix”.

wixaddreference_png

If you are planning on creating a UI you do need to include a reference to the WiXUI dll in your project. WiXUI provides the user interface of a typical installer package, so it provides all typical wizard pages: licence agreement, customer information, different types of setup (typical/custom/complete), customisation of the target deployment folder, disk usage requirements etc.

WiXUtilExtension is a dll which will be leveraged in a later example, and if you are deploying an IIS based MSI then you will probably add references to the WixIIS and WiXFirewall extensions also. Obviously only add what you need!

Summary

Microsoft have made it straightforward to leverage the use of WiX within larger solutions in Visual Studio. There are also considerable references that we can utilise within our WiX projects so that they can be used to create a UI for our installers or if we are deploying different types of solutions.

Sources