Visual Studio 2008 Setup Projects

This is going to be fairly heavy on the tech side, so you’ve been warned…

A couple weeks ago I converted the Chef code to Visual Studio 2008 – not a new .net version, just upgraded the solution and project files to the new format so I could start using the new IDE. I ran into just one small problem that was easily fixed when the conversion ran, that being a namespace getting mangled in one of the .designer.cs files that kept the code from compiling clean. Like I said, no biggie.

A little history

I have been working on the 1.3 release off and on, so over the weekend I was getting things prepared to actually release it. I ran a build like usual and, like usual, the output was a setup.exe and a .msi installer. For those that are unaware, Visual Studio setup projects output a .msi – but you can also have the setup check for and install prerequisite software (the .net framework for instance). This feature is achieved by what is called a boostrapper, the setup.exe which eventually starts the .msi once the prereq’s have been installed. In order to provide a single download for the internet, I then take these two files and wrap them in a Winzip Self Extracting Executable, using Winzip Self Extractor.

The problem

So I went to test the installer out in one of my virtual machines and found that the msi blew up right in the middle saying it was not a valid .msi. I ran it a few more times, and got the same error. Then it hit me what was going on.

Usually (Visual Studio 2005 and earlier), setup.exe starts up, does its magic, kicks off the .msi and then waits around for it to finish. The Self Extractor package I created waits for setup.exe to complete before deleting the two files from the user’s machine. Apparently, Microsoft decided to change how setup.exe behaves with VS ’08 (and document it nowhere)- it no longer waits around for the .msi to finish its job. Nope, it just shuts right down as soon as the prerequisite check has completed, leaving the Self Extractor clueless as to when it’s actually OK to delete the two install files. It deletes them out from underneath the msiexec doing the installation.

The solution

Personally, this is the final blow to the Visual Studio Setup Project. I have wrestled with its shortcomings far, far too long. There are always a ton of quirks, and Microsoft never seems to really support them like they should. So soon I will be purchasing a copy of a Advanced Installer and put this mess behind me. Damn you, .vdproj!

Anyone still here?

3 thoughts on “Visual Studio 2008 Setup Projects

  1. Still hanging. Interesting issue. I wonder if Microsoft has one of their wonderful, undocumented, hidden switches that you can set on the project to get the setup to work like it did before?


  2. That wouldn’t surprise me at all. Maybe if I had a Microsoft Buddy I could ask them.

    Talk about an annoying problem to track down.


Comments are closed.