Visual Studio setup projects (installer) experience report – level 200

Recently, my team needed to produce an installer for our software package.  We wanted a neat setup package that installed prerequisites as well (.Net 2.0, and SQL Express 2005).  We decided to try out the Visual Studio 2005 setup project.  Here’s my experience report:

  • Creation of the project was easy, but added files to include wasn’t so easy.  The setup project was default output of other projects as deployment artifacts.  This assumes a developer is building the GA release on a workstation.  My team uses a clean build server for all builds.
  • Adding custom steps was nontrivial.  There were no hook points where I could pass in a command line to run.  I ended up creating a C# class derived from “Installer” just to Process.Start() a shell command.  Once I had that, I ran the shell commands necessary to set up the software.
  • Creating a start menu shortcut was very difficult.  It appeared that it could create one for default project output, but again, I already had my GA release candidate.  I just needed to package it up for install.  I ended up creating another C# custom action to run Windows Script Object to create a .lnk shortcut file.
  • Prerequisite installs worked like a breeze.  The installer detected the need for .Net 2.0, and Sql express and installed both seamlessly without unnecessary questions to the user.  Very pleased with this.
  • The uninstall is good.  I have opposite steps for my custom actions, and the uninstall performs well.  Users get the standard experience of uninstalling from Control Panel.
  • I have the option of including file a raw, loose file or bundled into a single .msi file. I opted for loose files to keep the install package flexible.
  • PAIN POINT: I wasn’t able to automate the creation of the setup package.  The .vdproj file is not an MSBuild project file, and it requires Visual Studio just to build that project.  This means that I have to create the installer from a developer’s machine, not my build server.  This might be a deal-breaker for me, I haven’t decided yet.  It’s very important that everything be automated, and the only alternative is to install visual studio on the build machine (I’m not going to do that).

Overall, with a few caveats, the setup project is doing it’s job, and we’re shipping.  We’ll use it for the time being, but I’ll keep my eye on Nullsoft, Wise, and InstallShield.