Pieter van der Westhuizen

Converting a .vdproj to WiX in Visual Studio 2012, 2010, 2008

I’m sure you’re all aware of the fact that, from Visual Studio 2012, that Visual Studio Setup projects (.vdproj) is a thing of the past. This news has been met with shock, horror and disappointment, but luckily all is not lost.

As I’ve mentioned in a previous article Creating a WiX setup project on Visual Studio 2012, Microsoft is touting WiX (Windows Installer XML) as the heir apparent to the traditional VS Setup projects and all things considered it is a very good and free alternative.

The problem, however, is when you’ve already invested a great deal of time and energy in creating a .vdproj installer for you application, the prospect of having to re-create it using WiX is not a welcome one.

VDProj to WiX Converter is available

It’s not often that a product comes along that does exactly what you need, but somehow Add-in Express keeps delivering just that. It is with great pleasure that I can introduce our VDProj to WiX Converter add-in for Visual Studio 2012, VS 2010, VS 2008 and VS 2005.

With this add-in it literally takes two mouse clicks to convert your existing Visual Studio setup project to a WiX Setup project.

The original Visual Studio setup project

Let’s take a look at how to convert your VDProj to WiX in VS 2012. I have a setup program that installs a Microsoft Excel add-in, and its user interface layout looks like the following:

Visual Studio setup project's user interface options

The Checkboxes UI prompts the user to choose different options:

Visual Studio setup project's optional settings

The user’s selection is saved in the registry by associating the checkbox name with the registry setting.

Conditions and Registry settings of the Visual Studio setup project

I also have a “Register User” UI, which will launch a custom Executable called UserRegistrator.exe. This is a separate .Net application which is used to save the registered users’ information.

A custom executable to save the registered users' information

Since this is a Visual Studio Installer project I created using the “Create Setup Project” option, with Add-in Express, it has three Custom Actions, each calls adxregistrator.exe with different arguments.

Three custom actiona that call adxregistrator.exe with different arguments

Migrate your VDProj to WiX – just click “Convert to WiX project”

It will take a considerable amount of time even when using Dark.exe to decompile the msi, to manually create all the above-mentioned functionality with a WiX Setup project, as this can lead to a massive .wsx file which, judging by this irate comment, is very frustrating : )

Time for some Add-in Express magic! If you have the Add-in Express VDProj to WiX Converter installed, all you need to do is right-click on your setup project in the Visual Studio Solution Explorer and select Convert to WiX project.

Right-click on your setup project in the Visual Studio Solution Explorer and select Convert to WiX project

This will then auto-magically add a ready to use WiX setup project to your solution.

A ready to use WiX setup project is generated for your solution

The new WiX Setup project will be an exact replica of your old Visual Studio Installer project. It will automatically add all custom actions, registry settings, launch conditions and UI’s to the WiX source file (Product.wxs).

All you need to do is build your new WiX Setup project and you’re ready to deploy! The VDProj to WiX Converter is one of those products that are actually hard to write about since it is so simple and easy to use and it literally explains itself. Not surprising it could only have been built by the same team that brought you the best product for MS Office development… Add-in Express!

Thank you for reading. Until next time, keep coding!

You can find more details here:


Post a comment

Have any questions? Ask us right now!