C# Project Deployment – Building Installer for Multiple Environments

cdeploymentinstaller

I would like to propose a solution to our companies problem with building consistent installers for different environments. Our current process is to build an installer for test, perform testing, update app config, build installer for production.

Unfortunately this has lead to issues in the past where the installer was not properly updated etc. What can I suggest as a best practice to mitigate this problem?

Best Answer

Automate it

This is always the solution for "people are screwing up a continuous and repeatable process". Automate it.

Don't bother building a "test version" and testing it, AND THEN changing some config manually... AND THEN... building a "release" version (and waiting for it). Build both at the same time. It's the same as if you were doing a full debug/release build.

Take a look at the MSBuild Community Tasks and Jenkins CI.

Make your build system work for you. Modern build systems can do a fair bit very easily these days.

Test your release version

Seriously. What good is testing if you're not going to test what customers get? (this excludes automation that runs on instrumented builds, of course)

Related Topic