Get a Visual Studio 2010 .NET Setup Project to Update a Previous Installation

Here is a good post about getting an Visual Studion Setup project to generate a .msi that will update a previous installation rather than demanding that the existing install be uninstalled before it can be reinstalled:


I followed the steps in the ‘How to update your product’ section.


The only catch is that the setup project will only update files that have had their version number changed even if the files them selves _have_ changed. To ensure that all files are included in the installation package, I had to make sure that all of the projects in my solution changed their version numbers on each build, to do this I edited each project’s AssemblyInfo.cs file and replaced:


[assembly: AssemblyVersion("")]
[assembly: AssemblyFileVersion("")]


[assembly: AssemblyVersion("1.0.*")]
//[assembly: AssemblyFileVersion("")]

This causes a new version to be generated on each build and forces the set-up project to include them in the installation package!