?

Log in

No account? Create an account
Gavin Greig [userpic]

Convert or die

September 1st, 2005 (10:38 pm)

It's kind of disappointing to discover that MSBuild doesn't support Visual Studio setup projects. Although it's fairly well known that MSBuild won't cope with C++ projects, I was a little more suprised to find that this was also the case for setup projects.

Setup projects often feel like the poor cousin in development. Many developers don't really want to know about the installation story at all, and virtually run away in horror when they take a look at the complexity of developing for Windows Installer/MSI.

There are good reasons for the apparent complexity of Windows Installer - in fact, it could reasonably be argued that it makes developing installations easier, by making it harder to ignore the good practices that developers "should" be following when using other installer technologies. However, many developers see the superficial complexity and duck out.

That's a shame, because there are further benefits which may only become obvious in time. Administrators like the database-driven MSI installs because they're much more manageable than traditional executable installers. From the developer's point of view, patching and upgrading are much better supported and easier to do than used to be the case when you had to write everything about the upgrade process yourself.

I think most developers are coming over to Windows Installer now - I was pleasantly surprised by the results of the poll I suggested at CodeProject in early 2004 - but it seems like it's taking longer than it needed to, and I think part of the problem is poor tool support.

Visual Studio setup projects are probably the easiest way of producing MSI and MSM installers, but they are limited in their functionality. If you're developing a serious application, there's a reasonable chance that you may find you have to resort to a dedicated (expensive!) setup authoring tool, like the ones sold by InstallShield/Macrovision or Wise.

In the last year or so, another possibility has existed in the form of WiX, an open source solution originally developed at Microsoft. It's free, but has no pretty user interface to help the novice user out. That may be a benefit or a weakness, depending on where you're coming at it from.

Other solutions exist - cheaper commercial tools, and ClickOnce, for example - but they either don't have the reputation, or, for perfectly good reasons, they are too limited to do everything that a typical install needs.

To encourage the use of Windows Installer, it should be easy to produce reasonably capable installers from within Visual Studio without having to buy a third party tool. Given that installation is a crucial part of the software experience, I don't think this is an unreasonable thing to expect.

To be fair, Visual Studio does some of this, but I don't think it does quite enough to be convincing - I constantly feel that the setup projects are just a little too lightweight to really be of any use. Finding out that they can't be built by MSBuild just tends to exacerbate that.

So, it looks like we're either back to using InstallShield projects and the InstallShield command-line compiler - which means we're back to having one member of the team working on installers, rather than being able to spread the responsibility and knowledge - or we have to move to WiX, which isn't a terribly appealing idea either, as it's a whole new domain-specific language to learn.

It will probably be InstallShield, but I was pleased to find a converter tool by James Geurt that will generate WiX files from a Visual Studio setup project (VDProjConverter), so WiX isn't written off yet. The tool is a bit difficult to find, as most of the available links are broken, but this appears to be the place to go for any possible updates (click on the folder next to "Installer.Tools" for the download).

The new icon is the conversion of the Robot Maria from Fritz Lang's Metropolis, for no other reason than because it's cool.