1

We are setting up a new Azure DevOps pipeline to deploy our (awful) legacy software to our private server. Our goal is to use a modified Git Flow process to build and deploy our software for the Dev, Stage, and then Production (or Release) servers. We are using Cake scripts and Powershell scripts for the building of the different pieces of our software.

One of the requirements from my Software Manager is to build MSI packages for our software (at least for the Production builds when we version a new release). There are two problems that arise from this:

1) Back end software is made up of several projects with all kinds of weird dependencies off of each other (and on external SSIS project which we need to consider as a "black box" outside of our project that I have no control over), and 1 executable which uses most, but not all of the DLLs from the building of the other projects.

The front end software is a Sitecore project which is simply a bunch of DLLs and files that need to be copied from one place to another with an IIS restart to refresh the servers.

The back end and the front end will likely have separate Setup projects. But in each setup project, do I just add in all of the built projects' output to the Application Folder and hope for the best that they all get put in the right output folders on MSI install?

2) How do I instantiate the build of the Setup project (the project which builds the installer) from Cake Build and/or Powershell? I want to make sure this only runs for the Release builds that we build from the master branch. Is there an Azure tool I need to be made aware of.

Please be understanding as this is my first full DevOps implementation, I haven't built an .NET installer package in 10 years since school, and my Powershell skills suck (came from a Web development/Linux world).

Ross Gustafson
  • 1,182
  • 3
  • 16
  • 32
  • A lot of things indeed. In the interest of efficiency I normally use [FinalBuilder](https://www.finalbuilder.com) for automation and build. It is commercial. Essentially a graphical shell capable of calling just about "anything" via whatever mechanism that is needed (command line, COM, etc...). Just faster - my subjective opinion. Takes you all the way from source code check out, to build, to setup distribution, to uploads and email sending, etc... WiX is good, there is a learning curve if you do not know it. There are [several devployment tools](https://stackoverflow.com/a/50229840/129130). – Stein Åsmul Mar 20 '19 at 12:40

1 Answers1

4

Windows Installer XML (WiX Toolset) is a language / compiler that builds MSIs. It has MSBuild / Visual Studio integration support. It can easily be built in an Azure DevOps pipeline and doesn't require Cake or Powershell to do do.

I have an open source project called Industrial Strength Windows Installer XML (IsWiX) which builds on top of WiX and provides project templates and graphical designers to assist with most of the WiX development. When you go past what IsWiX provides you can still author the WiX directly to meet your needs. I have some tutorials at:

https://github.com/iswix-llc/iswix-tutorials

The IsWiX project templates have built in versioning and major upgrade patterns that automatically integrate with Azure DevOps. It's all explained in the tutorial.

Your taking on a pretty big task. Consulting services are available for those interested.

Christopher Painter
  • 54,556
  • 6
  • 63
  • 100
  • Yeah so I spent some time looking into WiX yesterday and I think that is the solution. From my understanding, Microsoft has all but fully depreciated the old Setup Project. WiX seems to also have some Cake support and can be built from MSBuild anyway. Yeah this may be a large undertaking, but this is how we learn. – Ross Gustafson Mar 21 '19 at 13:05
  • They killed it and then brought it back. I don't recommend it to be honest. Just to let you know WiX / MSI has a steep learning curve. Back in 2003 it took me 6 months to stop banging my head against the wall and believe it was the right path and 12 months to get that been there done that feeling. Took me about 5 years to feel like I was an expert. – Christopher Painter Mar 21 '19 at 13:13
  • Yeah I see there is asteep learning curve. There is a tutorial I have started with Pluralsight and I will likely use IsWix. – Ross Gustafson Mar 21 '19 at 14:23
  • Agree with Chris, but it is MSI itself that is overly complex, not really WiX in and of itself. You face the same problems with all tools. [Here is some advice on common MSI problems](https://stackoverflow.com/q/45840086/129130). Far too messy to be any good, but it should be better than nothing? Unless it is just confusing. I don't know. – Stein Åsmul Mar 21 '19 at 14:23
  • Maybe also try [quick start suggestions for WiX](https://stackoverflow.com/a/25005864/129130). Also messy, but seems to help. I will have to update my [MSI tools list](https://stackoverflow.com/a/50229840/129130) to include IsWix properly. – Stein Åsmul Mar 21 '19 at 14:25
  • @RossGustafson I'm curious, were you ever able to make use of IsWiX? – Christopher Painter Jan 17 '20 at 14:24
  • @ChristopherPainter no this was abandoned by us because of the time sink and difficulty. We manage version through Azure DevOps and GitVersion. We only deploy to our own internal servers which saw the need of an installer wasn't necessary. – Ross Gustafson Jan 17 '20 at 15:33