Installer Fun

31. December 2009 Uncategorized 0

I typed up a rather long rant about how much I hate dealing with installers. There were a few features that I was lamenting not being easy and affordable. Then, as is often the case with me, my rant proved to be a humbling experience as I realized I was doing something wrong.

What started the whole thing was trying to use the Setup & Deployment project in Visual Studio. For some reason, I couldn’t get the upgrade to work. My trial version was not getting overwritten by the full version no matter how many times I built it or what I changed the version number to. So I started looking at alternatives. Frankly what is out there isn’t better when it comes to ease. I got the furthest with WiX, but after spending about an hour on it and only being about 1/10th of the way done, I went back to the deployment project.

I confirmed that my trial version was not being overwritten, and that the individual files were not being overwritten. That’s when I discovered that having:

[assembly: AssemblyFileVersion(“2.0.*”)]

Didn’t do what I thought it would in Visual Studio 2008. If you put the “2.0.*” for the AssemblyVersion, it gets updated with every build, not so with the file. But then someone over at Stack Overflow mentioned in a comment that if you comment out this line, the File version will copy the Assembly version.

I tried it, and it did copy the assembly version. So I tried rebuilding my MSI. Installed it. Built the Full version MSI, installed it, and lo and behold, the full version finally updated.

So if you’ve tried all the other suggestions (like making sure RemovePreviousVersions = true) then make sure your file versions are getting updated. The setup program won’t overwrite a file, unless the FILE version is older than what is being installed.